Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Legacy version of Freckle.App.Database that still uses XRay
Synopsis
- class MonadTracer m where
- getVaultData :: m (Maybe XRayVaultData)
- class HasStatsClient env
- class HasSqlPool app where
- getSqlPool :: app -> SqlPool
- type SqlPool = Pool SqlBackend
- makePostgresPool :: (MonadUnliftIO m, MonadLoggerIO m) => m SqlPool
- makePostgresPoolWith :: (MonadUnliftIO m, MonadLoggerIO m) => PostgresConnectionConf -> m SqlPool
- runDB :: (MonadUnliftIO m, MonadTracer m, MonadReader app m, HasSqlPool app, HasStatsClient app) => SqlPersistT m a -> m a
- runDBSimple :: (HasSqlPool app, MonadUnliftIO m, MonadReader app m) => SqlPersistT m a -> m a
- data PostgresConnectionConf = PostgresConnectionConf {}
- data PostgresPasswordSource
- data PostgresPassword
- type PostgresStatementTimeout = Timeout
- postgresStatementTimeoutMilliseconds :: PostgresStatementTimeout -> Int
- envParseDatabaseConf :: PostgresPasswordSource -> Parser Error PostgresConnectionConf
- envPostgresPasswordSource :: Parser Error PostgresPasswordSource
Documentation
class MonadTracer m where Source #
Class for reading XRayVaultData
This is named the same as the OpenTelemetry class we'll use once we move to that tracing system
getVaultData :: m (Maybe XRayVaultData) Source #
Instances
MonadTracer (AppExample app) Source # | |
Defined in Freckle.App.Test getVaultData :: AppExample app (Maybe XRayVaultData) Source # | |
MonadTracer (HandlerFor app) Source # | |
Defined in Freckle.App.Database.XRay getVaultData :: HandlerFor app (Maybe XRayVaultData) Source # | |
Applicative m => MonadTracer (AppT app m) Source # | |
Defined in Freckle.App getVaultData :: AppT app m (Maybe XRayVaultData) Source # |
class HasStatsClient env Source #
Instances
HasStatsClient StatsClient Source # | |
Defined in Freckle.App.Stats | |
HasStatsClient site => HasStatsClient (HandlerData child site) Source # | |
Defined in Freckle.App.Stats statsClientL :: Lens' (HandlerData child site) StatsClient Source # |
class HasSqlPool app where Source #
getSqlPool :: app -> SqlPool Source #
Instances
HasSqlPool SqlPool Source # | |
Defined in Freckle.App.Database getSqlPool :: SqlPool -> SqlPool Source # | |
HasSqlPool site => HasSqlPool (HandlerData child site) Source # | |
Defined in Freckle.App.Database getSqlPool :: HandlerData child site -> SqlPool Source # |
type SqlPool = Pool SqlBackend Source #
makePostgresPool :: (MonadUnliftIO m, MonadLoggerIO m) => m SqlPool Source #
makePostgresPoolWith :: (MonadUnliftIO m, MonadLoggerIO m) => PostgresConnectionConf -> m SqlPool Source #
runDB :: (MonadUnliftIO m, MonadTracer m, MonadReader app m, HasSqlPool app, HasStatsClient app) => SqlPersistT m a -> m a Source #
Run a Database action with connection stats and tracing
runDBSimple :: (HasSqlPool app, MonadUnliftIO m, MonadReader app m) => SqlPersistT m a -> m a Source #
data PostgresConnectionConf Source #
Instances
Show PostgresConnectionConf Source # | |
Defined in Freckle.App.Database | |
Eq PostgresConnectionConf Source # | |
Defined in Freckle.App.Database |
data PostgresPasswordSource Source #
Instances
Show PostgresPasswordSource Source # | |
Defined in Freckle.App.Database | |
Eq PostgresPasswordSource Source # | |
Defined in Freckle.App.Database |
data PostgresPassword Source #
Instances
Show PostgresPassword Source # | |
Defined in Freckle.App.Database | |
Eq PostgresPassword Source # | |
Defined in Freckle.App.Database (==) :: PostgresPassword -> PostgresPassword -> Bool Source # (/=) :: PostgresPassword -> PostgresPassword -> Bool Source # |
type PostgresStatementTimeout = Timeout Source #