Versions in this module Expand all Collapse all v0 v0.12.5 Mar 24, 2026 Changes in this version + const APIVersion + const DefaultTimeout + const MaxResponseSize + const MaxTimeout + const SignatureHeader + const TimestampHeader + func SignPayload(secret []byte, timestamp int64, payload []byte) string + func VerifySignature(secret []byte, timestamp int64, payload []byte, signature string) bool + type Client struct + func NewClient(cfg Config, webhookType Type, hmacSecret []byte) (*Client, error) + func (c *Client) Call(ctx context.Context, req *Request) (*Response, error) + func (c *Client) CallMutating(ctx context.Context, req *Request) (*MutatingResponse, error) + type Config struct + FailurePolicy FailurePolicy + HMACSecretRef string + Name string + TLSConfig *TLSConfig + Timeout time.Duration + URL string + func (c *Config) Validate() error + type FailurePolicy string + const FailurePolicyFail + const FailurePolicyIgnore + type InvalidResponseError struct + StatusCode int + func NewInvalidResponseError(webhookName string, err error, statusCode int) *InvalidResponseError + func (e *InvalidResponseError) Error() string + type MutatingResponse struct + Patch json.RawMessage + PatchType string + type NetworkError struct + func NewNetworkError(webhookName string, err error) *NetworkError + func (e *NetworkError) Error() string + type Request struct + Context *RequestContext + MCPRequest json.RawMessage + Principal *auth.PrincipalInfo + Timestamp time.Time + UID string + Version string + type RequestContext struct + BackendServer string + Namespace string + ServerName string + SourceIP string + Transport string + type Response struct + Allowed bool + Code int + Details map[string]string + Message string + Reason string + UID string + Version string + type TLSConfig struct + CABundlePath string + ClientCertPath string + ClientKeyPath string + InsecureSkipVerify bool + type TimeoutError struct + func NewTimeoutError(webhookName string, err error) *TimeoutError + func (e *TimeoutError) Error() string + type Type string + const TypeMutating + const TypeValidating + type WebhookError struct + Err error + WebhookName string + func (e *WebhookError) Error() string + func (e *WebhookError) Unwrap() error