webhook

package
v0.0.0-...-a53be28 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterForManager

func RegisterForManager(
	mgr manager.Manager,
	obj runtime.Object,
	handler admission.Handler,
	webhookType string,
) error

func RegisterMutatingHandler

func RegisterMutatingHandler(mgr manager.Manager, exemplar runtime.Object, m Mutator) error

func RegisterValidatingHandler

func RegisterValidatingHandler(mgr manager.Manager, exemplar runtime.Object, v Validator) error

Types

type Mutator

type Mutator interface {
	Mutate(ctx context.Context, log logr.Logger, obj runtime.Object) (runtime.Object, error)
}

type RecoveringWrapper

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

func (RecoveringWrapper) Handle

type ValidationError

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

func NewValidationError

func NewValidationError(inner error) *ValidationError

func NewValidationErrorf

func NewValidationErrorf(format string, args ...interface{}) *ValidationError

func (*ValidationError) Error

func (v *ValidationError) Error() string

func (*ValidationError) Is

func (v *ValidationError) Is(err error) bool

func (*ValidationError) Unwrap

func (v *ValidationError) Unwrap() error

type Validator

type Validator interface {
	ValidateCreation(ctx context.Context, log logr.Logger, obj runtime.Object) error
	ValidateUpdate(ctx context.Context, log logr.Logger, current, old runtime.Object) error
	ValidateDeletion(ctx context.Context, log logr.Logger, obj runtime.Object) error
}

Jump to

Keyboard shortcuts

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