hookutil

package
v1.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 25 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"
)

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(schema, doc *extv1.JSON) (*extv1.JSON, error)

Types

type JSONSchemaValidateError

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

func (JSONSchemaValidateError) Error

func (j JSONSchemaValidateError) Error() string

func (JSONSchemaValidateError) Unwrap

func (j JSONSchemaValidateError) Unwrap() error

type JSONSchemaValidationErrors

type JSONSchemaValidationErrors []gojsonschema.ResultError

func (JSONSchemaValidationErrors) Error

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        TriggerSource
	Triggers      []v1beta1.EventSourceTrigger
	DefaultAction v1beta1.Action
	Action        v1beta1.Action
	Event         interface{}
}

type TriggerSource

type TriggerSource interface {
	runtime.Object
	metav1.Object
}

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