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

Struct Hook

internal/hooks/types.go:36–47  ·  view source on GitHub ↗

Hook represents a webhook configuration.

Source from the content-addressed store, hash-verified

34
35// Hook represents a webhook configuration.
36type Hook struct {
37 ID string `json:"id"` // Unique identifier for the hook
38 Name string `json:"name"` // Friendly name for the hook
39 URL string `json:"url"` // Webhook endpoint URL
40 Type HookType `json:"type"` // Type of hook (pre or post transaction)
41 Active bool `json:"active"` // Whether the hook is currently active
42 Timeout int `json:"timeout"` // Timeout in seconds for the webhook call
43 RetryCount int `json:"retry_count"` // Number of retries on failure
44 CreatedAt time.Time `json:"created_at"` // Creation timestamp
45 LastRun time.Time `json:"last_run"` // Last execution timestamp
46 LastSuccess bool `json:"last_success"` // Status of last execution
47}
48
49// HookPayload represents the data sent to webhook endpoints.
50type HookPayload struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected