pcmt-config-schema/schema.dhall
2023-05-06 01:24:31 +02:00

27 lines
781 B
Haskell

let Schema =
-- | define a configuration schema.
{ Type =
{ Host : Text
, Port : Natural
, AppName : Text
, LiveMode : Bool
, DevelMode : Bool
, Session : { CookieName : Optional Text, CookieSecret : Text }
, Logger : { Json : Bool, Fmt : Optional Text }
, Registration : { Allowed : Bool }
}
, default =
-- | have sane defaults.
{ Host = ""
, Port = 3000
, AppName = "pcmt"
, LiveMode = False
, DevelMode = False
, Session = { CookieName = None Text, CookieSecret = "secretz" }
, Logger = { Json = True, Fmt = None Text }
, Registration.Allowed = True
}
}
in Schema