Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SourceKey = "source" ContextKey = "extra" ErrorKeys = []string{"error", "err"} RequestKey = "request" RequestIgnoreHeaders = false )
Functions ¶
Types ¶
type Option ¶
type Option struct { // log level (default: debug) Level slog.Leveler // URL Endpoint string Timeout time.Duration // default: 10s // optional: customize webhook event builder Converter Converter // optional: custom marshaler Marshaler func(v any) ([]byte, error) // optional: fetch attributes from context AttrFromContext []func(ctx context.Context) []slog.Attr // optional: see slog.HandlerOptions AddSource bool ReplaceAttr func(groups []string, a slog.Attr) slog.Attr }
func (Option) NewWebhookHandler ¶
Click to show internal directories.
Click to hide internal directories.