 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admission ¶
type Admission interface {
	Name() string
	Kind() meta.GroupVersionKind
	Resource() meta.GroupVersionResource
	Validate(goHttp.ResponseWriter, *goHttp.Request)
	Mutate(goHttp.ResponseWriter, *goHttp.Request)
}
    type AdmissionRequestType ¶
type AdmissionRequestType int
const ( AdmissionRequestValidate AdmissionRequestType = iota AdmissionRequestMutate )
type Admissions ¶
type Admissions []Admission
type CanHandleFunc ¶
type CanHandleFunc[T meta.Object] func(ctx context.Context, log logging.Logger, t AdmissionRequestType, request *admission.AdmissionRequest, old, new T) bool
type Handler ¶
type Handler[T meta.Object] interface { CanHandle(ctx context.Context, log logging.Logger, t AdmissionRequestType, request *admission.AdmissionRequest, old, new T) bool }
type MutateFunc ¶
type MutateFunc[T meta.Object] func(ctx context.Context, log logging.Logger, t AdmissionRequestType, request *admission.AdmissionRequest, old, new T) (MutationResponse, error)
type MutationHandler ¶
type MutationHandler[T meta.Object] interface { Handler[T] Mutate(ctx context.Context, log logging.Logger, t AdmissionRequestType, request *admission.AdmissionRequest, old, new T) (MutationResponse, error) }
type MutationResponse ¶
type MutationResponse struct {
	ValidationResponse
	Patch patch.Items
}
    func (MutationResponse) AsResponse ¶
func (v MutationResponse) AsResponse() (*admission.AdmissionResponse, error)
type ValidateFunc ¶
type ValidateFunc[T meta.Object] func(ctx context.Context, log logging.Logger, t AdmissionRequestType, request *admission.AdmissionRequest, old, new T) (ValidationResponse, error)
type ValidationHandler ¶
type ValidationHandler[T meta.Object] interface { Handler[T] Validate(ctx context.Context, log logging.Logger, t AdmissionRequestType, request *admission.AdmissionRequest, old, new T) (ValidationResponse, error) }
type ValidationResponse ¶
func NewValidationResponse ¶
func NewValidationResponse(allowed bool, msg string, args ...any) ValidationResponse
func (ValidationResponse) AsResponse ¶
func (v ValidationResponse) AsResponse() (*admission.AdmissionResponse, error)
 Click to show internal directories. 
   Click to hide internal directories.