This commit is contained in:
2018-12-20 00:33:32 +02:00
parent 6767813879
commit c45ea0ecc8
2 changed files with 42 additions and 16 deletions

View File

@ -0,0 +1,26 @@
{-# Language NoImplicitPrelude #-}
{-# Language DeriveGeneric #-}
{-# Language DuplicateRecordFields #-}
module Configuration where
import ClassyPrelude
import Dhall (Interpret)
data Pg = Pg { username :: Text
, password :: Text
, host :: Text
, database :: Text }
deriving (Show, Generic)
data Store = Filestore { path :: Text }
| IPFS { common :: Text }
deriving (Show, Generic)
data Config = Config { database :: Pg
, store :: Store }
deriving (Show, Generic)
instance Interpret Pg
instance Interpret Store
instance Interpret Config