Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data CreateEventTriggerQuery (b :: BackendType)
- cteqTriggerOnReplication :: forall b. Lens' (CreateEventTriggerQuery b) TriggerOnReplication
- cteqCleanupConfig :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe AutoTriggerLogCleanupConfig)
- cetqWebhookFromEnv :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe Text)
- cetqWebhook :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe InputWebhook)
- cetqUpdate :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe (SubscribeOpSpec b))
- cetqTable :: forall b. Lens' (CreateEventTriggerQuery b) (TableName b)
- cetqSource :: forall b. Lens' (CreateEventTriggerQuery b) SourceName
- cetqRetryConf :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe RetryConf)
- cetqResponseTrasnform :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe MetadataResponseTransform)
- cetqRequestTransform :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe RequestTransform)
- cetqReplace :: forall b. Lens' (CreateEventTriggerQuery b) Bool
- cetqName :: forall b. Lens' (CreateEventTriggerQuery b) TriggerName
- cetqInsert :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe (SubscribeOpSpec b))
- cetqHeaders :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe [HeaderConf])
- cetqEnableManual :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe Bool)
- cetqDelete :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe (SubscribeOpSpec b))
- data DeleteEventTriggerQuery (b :: BackendType)
- data RedeliverEventQuery (b :: BackendType)
- data InvokeEventTriggerQuery (b :: BackendType)
- class Monad m => MonadEventLogCleanup m where
- runLogCleaner :: SourceCache -> TriggerLogCleanupConfig -> m (Either QErr EncJSON)
- generateCleanupSchedules :: AnyBackend SourceInfo -> TriggerName -> AutoTriggerLogCleanupConfig -> m (Either QErr ())
- updateTriggerCleanupSchedules :: Logger Hasura -> InsOrdHashMap SourceName BackendSourceMetadata -> InsOrdHashMap SourceName BackendSourceMetadata -> SchemaCache -> m (Either QErr ())
- runCreateEventTriggerQuery :: forall b m r. (BackendMetadata b, BackendEventTrigger b, QErrM m, UserInfoM m, CacheRWM m, MetadataM m, MonadIO m, MonadEventLogCleanup m, MonadReader r m, Has (Logger Hasura) r) => CreateEventTriggerQuery b -> m EncJSON
- runDeleteEventTriggerQuery :: forall b m. (BackendEventTrigger b, MonadError QErr m, CacheRWM m, MonadIO m, MetadataM m) => DeleteEventTriggerQuery b -> m EncJSON
- runRedeliverEvent :: forall b m. (BackendEventTrigger b, MonadIO m, CacheRM m, QErrM m, MetadataM m) => RedeliverEventQuery b -> m EncJSON
- runInvokeEventTrigger :: forall b m. (MonadIO m, QErrM m, CacheRM m, MetadataM m, MonadTrace m, UserInfoM m, BackendEventTrigger b) => InvokeEventTriggerQuery b -> m EncJSON
- newtype ResolveHeaderError = ResolveHeaderError {
- unResolveHeaderError :: [Text]
- getHeaderInfosFromConf :: QErrM m => Environment -> [HeaderConf] -> m [EventHeaderInfo]
- getHeaderInfosFromConfEither :: Environment -> [HeaderConf] -> Either ResolveHeaderError [EventHeaderInfo]
- getWebhookInfoFromConf :: QErrM m => Environment -> WebhookConf -> m WebhookConfInfo
- buildEventTriggerInfo :: forall b m. (Backend b, QErrM m) => Environment -> SourceName -> TableName b -> EventTriggerConf b -> m (EventTriggerInfo b, Seq SchemaDependency)
- getTriggersMap :: SourceMetadata b -> InsOrdHashMap TriggerName (EventTriggerConf b)
- getSourceTableAndTriggers :: SourceMetadata b -> [(TableName b, TriggerName)]
- getTriggerNames :: SourceMetadata b -> HashSet TriggerName
- getTableNameFromTrigger :: forall b. Backend b => SchemaCache -> SourceName -> TriggerName -> Maybe (TableName b)
- runCleanupEventTriggerLog :: (MonadEventLogCleanup m, MonadError QErr m, CacheRWM m) => TriggerLogCleanupConfig -> m EncJSON
- runEventTriggerResumeCleanup :: forall m. (MonadIO m, QErrM m, CacheRWM m, MetadataM m) => TriggerLogCleanupToggleConfig -> m EncJSON
- runEventTriggerPauseCleanup :: (MonadError QErr m, CacheRWM m, MonadIO m, MetadataM m) => TriggerLogCleanupToggleConfig -> m EncJSON
- getAllEventTriggersWithCleanupConfig :: TableInfo b -> [(TriggerName, AutoTriggerLogCleanupConfig)]
- getAllETWithCleanupConfigInTableMetadata :: TableMetadata b -> [(TriggerName, AutoTriggerLogCleanupConfig)]
- runGetEventLogs :: forall b m. (MonadIO m, CacheRM m, MonadError QErr m, BackendEventTrigger b, MetadataM m) => GetEventLogs b -> m EncJSON
- runGetEventInvocationLogs :: forall b m. (MonadIO m, CacheRM m, MonadError QErr m, BackendEventTrigger b, MetadataM m) => GetEventInvocations b -> m EncJSON
- runGetEventById :: forall b m. (MonadIO m, CacheRM m, MonadError QErr m, BackendEventTrigger b, MetadataM m) => GetEventById b -> m EncJSON
Documentation
data CreateEventTriggerQuery (b :: BackendType) Source #
Instances
Backend b => FromJSON (CreateEventTriggerQuery b) Source # | |
Defined in Hasura.RQL.DDL.EventTrigger parseJSON :: Value -> Parser (CreateEventTriggerQuery b) Source # parseJSONList :: Value -> Parser [CreateEventTriggerQuery b] Source # |
cteqTriggerOnReplication :: forall b. Lens' (CreateEventTriggerQuery b) TriggerOnReplication Source #
cteqCleanupConfig :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe AutoTriggerLogCleanupConfig) Source #
cetqWebhookFromEnv :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe Text) Source #
cetqWebhook :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe InputWebhook) Source #
cetqUpdate :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe (SubscribeOpSpec b)) Source #
cetqSource :: forall b. Lens' (CreateEventTriggerQuery b) SourceName Source #
cetqRetryConf :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe RetryConf) Source #
cetqResponseTrasnform :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe MetadataResponseTransform) Source #
cetqRequestTransform :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe RequestTransform) Source #
cetqReplace :: forall b. Lens' (CreateEventTriggerQuery b) Bool Source #
cetqName :: forall b. Lens' (CreateEventTriggerQuery b) TriggerName Source #
cetqInsert :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe (SubscribeOpSpec b)) Source #
cetqHeaders :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe [HeaderConf]) Source #
cetqEnableManual :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe Bool) Source #
cetqDelete :: forall b. Lens' (CreateEventTriggerQuery b) (Maybe (SubscribeOpSpec b)) Source #
data DeleteEventTriggerQuery (b :: BackendType) Source #
Instances
FromJSON (DeleteEventTriggerQuery b) Source # | |
Defined in Hasura.RQL.DDL.EventTrigger parseJSON :: Value -> Parser (DeleteEventTriggerQuery b) Source # parseJSONList :: Value -> Parser [DeleteEventTriggerQuery b] Source # |
data RedeliverEventQuery (b :: BackendType) Source #
Instances
FromJSON (RedeliverEventQuery b) Source # | |
Defined in Hasura.RQL.DDL.EventTrigger parseJSON :: Value -> Parser (RedeliverEventQuery b) Source # parseJSONList :: Value -> Parser [RedeliverEventQuery b] Source # |
data InvokeEventTriggerQuery (b :: BackendType) Source #
Instances
Backend b => FromJSON (InvokeEventTriggerQuery b) Source # | |
Defined in Hasura.RQL.DDL.EventTrigger parseJSON :: Value -> Parser (InvokeEventTriggerQuery b) Source # parseJSONList :: Value -> Parser [InvokeEventTriggerQuery b] Source # |
class Monad m => MonadEventLogCleanup m where Source #
This typeclass have the implementation logic for the event trigger log cleanup.
TODO: this doesn't belong here in the DDL folder, but should be part of Hasura.Eventing. It could even be made a Service, since the whole point of it is to implement features differently between OSS and Pro.
runLogCleaner :: SourceCache -> TriggerLogCleanupConfig -> m (Either QErr EncJSON) Source #
generateCleanupSchedules :: AnyBackend SourceInfo -> TriggerName -> AutoTriggerLogCleanupConfig -> m (Either QErr ()) Source #
updateTriggerCleanupSchedules :: Logger Hasura -> InsOrdHashMap SourceName BackendSourceMetadata -> InsOrdHashMap SourceName BackendSourceMetadata -> SchemaCache -> m (Either QErr ()) Source #
updateTriggerCleanupSchedules
is primarily used to update the
cleanup schedules associated with an event trigger in case the cleanup
config has changed while replacing the metadata.
In case, i. a source has been dropped - We don't need to clear the cleanup schedules because the event log cleanup table is dropped as part of the post drop source hook. ii. a table or an event trigger has been dropped/updated - Older cleanup events will be deleted first and in case of an update, new cleanup events will be generated and inserted into the table. iii. a new event trigger with cleanup config has been added - Generate the cleanup events and insert it. iv. a new source has been added - Generate the cleanup events and insert it. v. the cron schedule for event trigger cleanup config has changed - Delete cleanup events with older cron schedule and generate cleanup events with new cron schedule.
Instances
runCreateEventTriggerQuery :: forall b m r. (BackendMetadata b, BackendEventTrigger b, QErrM m, UserInfoM m, CacheRWM m, MetadataM m, MonadIO m, MonadEventLogCleanup m, MonadReader r m, Has (Logger Hasura) r) => CreateEventTriggerQuery b -> m EncJSON Source #
runDeleteEventTriggerQuery :: forall b m. (BackendEventTrigger b, MonadError QErr m, CacheRWM m, MonadIO m, MetadataM m) => DeleteEventTriggerQuery b -> m EncJSON Source #
runRedeliverEvent :: forall b m. (BackendEventTrigger b, MonadIO m, CacheRM m, QErrM m, MetadataM m) => RedeliverEventQuery b -> m EncJSON Source #
runInvokeEventTrigger :: forall b m. (MonadIO m, QErrM m, CacheRM m, MetadataM m, MonadTrace m, UserInfoM m, BackendEventTrigger b) => InvokeEventTriggerQuery b -> m EncJSON Source #
newtype ResolveHeaderError Source #
Instances
Show ResolveHeaderError Source # | |
Defined in Hasura.RQL.DDL.EventTrigger showsPrec :: Int -> ResolveHeaderError -> ShowS # show :: ResolveHeaderError -> String # showList :: [ResolveHeaderError] -> ShowS # | |
ToTxt ResolveHeaderError Source # | |
Defined in Hasura.RQL.DDL.EventTrigger toTxt :: ResolveHeaderError -> Text Source # |
getHeaderInfosFromConf :: QErrM m => Environment -> [HeaderConf] -> m [EventHeaderInfo] Source #
getHeaderInfosFromConfEither :: Environment -> [HeaderConf] -> Either ResolveHeaderError [EventHeaderInfo] Source #
getWebhookInfoFromConf :: QErrM m => Environment -> WebhookConf -> m WebhookConfInfo Source #
buildEventTriggerInfo :: forall b m. (Backend b, QErrM m) => Environment -> SourceName -> TableName b -> EventTriggerConf b -> m (EventTriggerInfo b, Seq SchemaDependency) Source #
getSourceTableAndTriggers :: SourceMetadata b -> [(TableName b, TriggerName)] Source #
getTableNameFromTrigger :: forall b. Backend b => SchemaCache -> SourceName -> TriggerName -> Maybe (TableName b) Source #
runCleanupEventTriggerLog :: (MonadEventLogCleanup m, MonadError QErr m, CacheRWM m) => TriggerLogCleanupConfig -> m EncJSON Source #
runEventTriggerResumeCleanup :: forall m. (MonadIO m, QErrM m, CacheRWM m, MetadataM m) => TriggerLogCleanupToggleConfig -> m EncJSON Source #
runEventTriggerPauseCleanup :: (MonadError QErr m, CacheRWM m, MonadIO m, MetadataM m) => TriggerLogCleanupToggleConfig -> m EncJSON Source #
getAllEventTriggersWithCleanupConfig :: TableInfo b -> [(TriggerName, AutoTriggerLogCleanupConfig)] Source #
Collects and returns all the event triggers with cleanup config
getAllETWithCleanupConfigInTableMetadata :: TableMetadata b -> [(TriggerName, AutoTriggerLogCleanupConfig)] Source #
runGetEventLogs :: forall b m. (MonadIO m, CacheRM m, MonadError QErr m, BackendEventTrigger b, MetadataM m) => GetEventLogs b -> m EncJSON Source #
runGetEventInvocationLogs :: forall b m. (MonadIO m, CacheRM m, MonadError QErr m, BackendEventTrigger b, MetadataM m) => GetEventInvocations b -> m EncJSON Source #
runGetEventById :: forall b m. (MonadIO m, CacheRM m, MonadError QErr m, BackendEventTrigger b, MetadataM m) => GetEventById b -> m EncJSON Source #