hooks

package
v1.388.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler for hooks.

func NewHandler

func NewHandler(hook *Webhook) *Handler

NewHandler for hooks.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(res http.ResponseWriter, req *http.Request, next http.HandlerFunc)

ServeHTTP for hooks.

type RoundTripper

type RoundTripper struct {
	http.RoundTripper
	// contains filtered or unexported fields
}

RoundTripper for hooks.

func NewRoundTripper

func NewRoundTripper(hook *Webhook, rt http.RoundTripper) *RoundTripper

NewRoundTripper for hooks.

func (*RoundTripper) RoundTrip

func (r *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip for hooks.

type Webhook added in v1.381.0

type Webhook struct {
	// contains filtered or unexported fields
}

Webhook provides a simple facade that signs and verifies the payload.

func NewWebhook added in v1.381.0

func NewWebhook(hook *hooks.Webhook, gen id.Generator) *Webhook

NewWebhook for http.

func (*Webhook) Sign added in v1.381.0

func (h *Webhook) Sign(req *http.Request) error

Sign the webhook.

func (*Webhook) Verify added in v1.381.0

func (h *Webhook) Verify(req *http.Request) error

Verify the webhook.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL