Hook represents a webhook configuration.
| 34 | |
| 35 | // Hook represents a webhook configuration. |
| 36 | type 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. |
| 50 | type HookPayload struct { |
nothing calls this directly
no outgoing calls
no test coverage detected