MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / HookManager

Interface HookManager

internal/hooks/types.go:65–75  ·  view source on GitHub ↗

HookManager defines the interface for managing hooks.

Source from the content-addressed store, hash-verified

63
64// HookManager defines the interface for managing hooks.
65type 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.
78type HookTaskPayload struct {

Callers 10

RegisterHookMethod · 0.65
UpdateHookMethod · 0.65
DeleteHookMethod · 0.65
GetHookMethod · 0.65
listHooksForExecutionMethod · 0.65
ListHooksMethod · 0.65

Implementers 1

redisHookManagerinternal/hooks/manager.go

Calls

no outgoing calls

Tested by

no test coverage detected