handler

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmissionReview

type AdmissionReview interface {
	// HandleReview handles the facade.AdmissionReview using the logr.Logger
	HandleReview(logger logr.Logger, review facade.AdmissionReview) error
	// HandlerType returns the Type to identify the web hook
	HandlerType() Type
}

AdmissionReview is a handler for v1beta1.AdmissionReview

type Mutator

type Mutator interface {
	AdmissionReview
	// AddMutator adds a mutation.Mutator to be used to mutate the v1beta1.AdmissionRequest
	AddMutator(mutator mutation.Mutator) error
}

Mutator is a AdmissionReview for mutating an object in v1beta1.AdmissionRequest

func NewMutator

func NewMutator() Mutator

NewMutator creates a new Mutator and the provided metering.Summary for metering

type Type

type Type string

Type denotes a type name for the handler

const (
	// TypeValidation marks a handler for validation
	TypeValidation Type = "validation"
	// TypeMutation marks a handler mutation
	TypeMutation Type = "mutation"
	// TypeOther marks a handler which does neither (like unmarshalling)
	TypeOther Type = "other"
)

type UnmarshalReqObj

type UnmarshalReqObj interface {
	codec.SchemeRegistry
	AdmissionReview
}

UnmarshalReqObj is an AdmissionReview which handles the deserialization of the object in v1beta1.AdmissionRequest

func NewUnmarshalReqObj

func NewUnmarshalReqObj() UnmarshalReqObj

NewUnmarshalReqObj creates a new UnmarshalReqObj using a new runtime.Scheme

type Validator

type Validator interface {
	AdmissionReview
	// AddValidator adds a validation.Validator to be used to validate the v1beta1.AdmissionRequest
	AddValidator(validator validation.Validator) error
}

Validator is an AdmissionReview for validating an object in v1beta1.AdmissionRequest

func NewValidator

func NewValidator() Validator

NewValidator creates a new Validator

Jump to

Keyboard shortcuts

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