HookManager defines the interface for managing hooks.
| 63 | |
| 64 | // HookManager defines the interface for managing hooks. |
| 65 | type HookManager interface { |
| 66 | RegisterHook(ctx context.Context, hook *Hook) error |
| 67 | UpdateHook(ctx context.Context, hookID string, hook *Hook) error |
| 68 | DeleteHook(ctx context.Context, hookID string) error |
| 69 | GetHook(ctx context.Context, hookID string) (*Hook, error) |
| 70 | ListHooks(ctx context.Context, hookType HookType) ([]*Hook, error) |
| 71 | ExecuteHooks(ctx context.Context, hooks []*Hook, hookType HookType, transactionID string, data interface{}) error |
| 72 | ExecutePreHooks(ctx context.Context, transactionID string, data interface{}) error |
| 73 | ExecutePostHooks(ctx context.Context, transactionID string, data interface{}) error |
| 74 | ProcessHookTask(ctx context.Context, task *asynq.Task) error |
| 75 | } |
| 76 | |
| 77 | // HookTaskPayload represents the payload for a queued hook task. |
| 78 | type HookTaskPayload struct { |
no outgoing calls
no test coverage detected