Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data AppConfig = AppConfig {
- configAppSettings :: [(Text, Text)]
- configDbAnonRole :: Text
- configDbChannel :: Text
- configDbChannelEnabled :: Bool
- configDbExtraSearchPath :: [Text]
- configDbMaxRows :: Maybe Integer
- configDbPoolSize :: Int
- configDbPoolTimeout :: NominalDiffTime
- configDbPreRequest :: Maybe QualifiedIdentifier
- configDbPreparedStatements :: Bool
- configDbRootSpec :: Maybe QualifiedIdentifier
- configDbSchemas :: NonEmpty Text
- configDbConfig :: Bool
- configDbTxAllowOverride :: Bool
- configDbTxRollbackAll :: Bool
- configDbUri :: Text
- configDbUseLegacyGucs :: Bool
- configFilePath :: Maybe FilePath
- configJWKS :: Maybe JWKSet
- configJwtAudience :: Maybe StringOrURI
- configJwtRoleClaimKey :: JSPath
- configJwtSecret :: Maybe ByteString
- configJwtSecretIsBase64 :: Bool
- configLogLevel :: LogLevel
- configOpenApiMode :: OpenAPIMode
- configOpenApiServerProxyUri :: Maybe Text
- configRawMediaTypes :: [ByteString]
- configServerHost :: Text
- configServerPort :: Int
- configServerUnixSocket :: Maybe FilePath
- configServerUnixSocketMode :: FileMode
- type Environment = Map [Char] Text
- type JSPath = [JSPathExp]
- data JSPathExp
- data LogLevel
- data OpenAPIMode
- data Proxy = Proxy {}
- toText :: AppConfig -> Text
- isMalformedProxyUri :: Text -> Bool
- readAppConfig :: [(Text, Text)] -> Maybe FilePath -> Maybe Text -> IO (Either Text AppConfig)
- readPGRSTEnvironment :: IO Environment
- toURI :: Text -> URI
- parseSecret :: ByteString -> JWKSet
Documentation
jspath expression, e.g. .property, .property[0] or ."property-dash"
data OpenAPIMode Source #
Instances
Eq OpenAPIMode Source # | |
Defined in PostgREST.Config (==) :: OpenAPIMode -> OpenAPIMode -> Bool # (/=) :: OpenAPIMode -> OpenAPIMode -> Bool # |
isMalformedProxyUri :: Text -> Bool Source #
Test whether a proxy uri is malformed or not. A valid proxy uri should be an absolute uri without query and user info, only http(s) schemes are valid, port number range is 1-65535.
For example http://postgrest.com/openapi.json https://postgrest.com:8080/openapi.json
readAppConfig :: [(Text, Text)] -> Maybe FilePath -> Maybe Text -> IO (Either Text AppConfig) Source #
Reads and parses the config and overrides its parameters from env vars, files or db settings.
readPGRSTEnvironment :: IO Environment Source #
Read environment variables that start with PGRST_
parseSecret :: ByteString -> JWKSet Source #