wip
This commit is contained in:
parent
6767813879
commit
c45ea0ecc8
26
backend/src/Configuration.hs
Normal file
26
backend/src/Configuration.hs
Normal 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
|
||||
|
@ -29,19 +29,19 @@ library
|
||||
, RecordWildCards
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite spec
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Spec.hs
|
||||
hs-source-dirs: src
|
||||
build-depends: base >=4.10
|
||||
, classy-prelude
|
||||
, foreign-store
|
||||
, generic-lens
|
||||
, lens
|
||||
, mtl
|
||||
, text
|
||||
, transformers
|
||||
, validity
|
||||
, genvalidity-hspec
|
||||
, genvalidity-property
|
||||
, hspec
|
||||
-- test-suite spec
|
||||
-- type: exitcode-stdio-1.0
|
||||
-- main-is: Spec.hs
|
||||
-- hs-source-dirs: src
|
||||
-- build-depends: base >=4.10
|
||||
-- , classy-prelude
|
||||
-- , foreign-store
|
||||
-- , generic-lens
|
||||
-- , lens
|
||||
-- , mtl
|
||||
-- , text
|
||||
-- , transformers
|
||||
-- , validity
|
||||
-- , genvalidity-hspec
|
||||
-- , genvalidity-property
|
||||
-- , hspec
|
||||
|
Loading…
Reference in New Issue
Block a user