webhookType

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPProvider

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

HTTPProvider

func NewHTTPProvider

func NewHTTPProvider(
	lgr *logrus.Entry,
	wbh *webhook.WebHook,
	scenarioNumber int,
) *HTTPProvider

NewHTTPProvider

func (*HTTPProvider) Send

func (h *HTTPProvider) Send() error

Send

func (*HTTPProvider) Unmarshal

func (h *HTTPProvider) Unmarshal(rawData []map[string]interface{}) error

Unmarshal

func (HTTPProvider) Validate

func (h HTTPProvider) Validate() error

Validate

type TypeProvider

type TypeProvider interface {
	// Unmarshal is a parse
	Unmarshal([]map[string]interface{}) error
	// Send
	Send() error
	// Validate
	validation.Validatable
}

TypeProvider

func Factory

func Factory(
	webhook *webhook.WebHook,
	lgr *logrus.Entry,
	scenarioNumber int,
) (TypeProvider, error)

Factory represents a pattern factory to select right provider by web hook type parameter which can be included to a description for a scenario file by example file examples/rest/create-user.yaml include the section webhook with all fields

Jump to

Keyboard shortcuts

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