webhook

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Timeout         = time.Second * 5
	HeaderSignature = "X-Signature"
)

Variables

View Source
var (
	ErrInvalidInput      = errors.New("invalid input")
	ErrInvalidStatusCode = errors.New("invalid status code")
)

Functions

func Send

func Send(ctx context.Context, destination, secret string, data any) error

func SignRequest

func SignRequest(req *http.Request, body []byte, secret string) error

func ValidateHMAC

func ValidateHMAC(body []byte, secret, signature string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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