webhook

package
v1.13.0-preview-2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Gateway

type Gateway interface {
	TrackRequestMetrics(errorMessage string)
	ProcessWebRequest(writer *http.ResponseWriter, req *http.Request, reqType string, requestPayload []byte, arctx *gwtypes.AuthRequestContext) string
	NewSourceStat(arctx *gwtypes.AuthRequestContext, reqType string) *gwstats.SourceStat
	SaveWebhookFailures([]*model.FailedWebhookPayload) error
}

type HandleT

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

func Setup

func Setup(gwHandle Gateway, stat stats.Stats, opts ...batchTransformerOption) *HandleT

func (*HandleT) Register

func (webhook *HandleT) Register(name string)

func (*HandleT) RequestHandler

func (webhook *HandleT) RequestHandler(w http.ResponseWriter, r *http.Request)

func (*HandleT) Shutdown

func (webhook *HandleT) Shutdown() error

type WebHookI

type WebHookI interface {
	RequestHandler(w http.ResponseWriter, r *http.Request)
	Register(name string)
}

type Webhook added in v1.9.0

type Webhook interface {
	RequestHandler(w http.ResponseWriter, r *http.Request)
	Register(name string)
	Shutdown() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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