hookutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonCreated        = "Created"
	ReasonCreateFailed   = "CreateFailed"
	ReasonAlreadyExists  = "AlreadyExists"
	ReasonUpdated        = "Updated"
	ReasonUpdateFailed   = "UpdateFailed"
	ReasonDeleted        = "Deleted"
	ReasonDeleteFailed   = "DeleteFailed"
	ReasonInvalidWebhook = "InvalidWebhook"
	ReasonNotExist       = "NotExist"
	ReasonTriggered      = "Triggered"
	ReasonTriggerFailed  = "TriggerFailed"
	ReasonFailed         = "Failed"
)

Variables

View Source
var ErrInvalidAction = errors.New("invalid action")
View Source
var TriggerHandlerSet = wire.NewSet(
	wire.Struct(new(TriggerHandler), "*"),
)

TriggerHandlerSet provides a TriggerHandler. nolint: gochecknoglobals

Functions

func FilterByConditions

func FilterByConditions(conditions []string, input string) bool

func FilterWebhook

func FilterWebhook(filter *v1beta1.EventSourceFilter, input []string) bool

func NewEventRecorder

func NewEventRecorder(mgr manager.Manager) record.EventRecorder

func NewFieldIndexer

func NewFieldIndexer(mgr manager.Manager) client.FieldIndexer

func NewHandler

func NewHandler(handler httputil.Handler) http.Handler

func ValidateJSONSchema

func ValidateJSONSchema(schemaJSON, docJSON *extv1.JSON) (*extv1.JSON, error)

Types

type RenderedTrigger

type RenderedTrigger struct {
	ResourceTemplate *v1beta1.ResourceTemplate
	Trigger          *v1beta1.Trigger
}

type TriggerHandler

type TriggerHandler struct {
	Client   client.Client
	Recorder record.EventRecorder
}

func NewTriggerHandler

func NewTriggerHandler(mgr manager.Manager) *TriggerHandler

func (*TriggerHandler) Handle

func (t *TriggerHandler) Handle(ctx context.Context, options *TriggerOptions) error

type TriggerNotFoundError

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

func (TriggerNotFoundError) Error

func (t TriggerNotFoundError) Error() string

func (TriggerNotFoundError) Unwrap

func (t TriggerNotFoundError) Unwrap() error

type TriggerOptions

type TriggerOptions struct {
	Source        client.Object
	Triggers      []v1beta1.EventSourceTrigger
	DefaultAction string
	Action        string
	Event         interface{}
}

type ValidationErrors

type ValidationErrors []string

func (ValidationErrors) Error

func (v ValidationErrors) Error() string

Jump to

Keyboard shortcuts

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