adfunc

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONPatch

func JSONPatch() *admissionv1.PatchType

func Setup

func Setup()

Setup initialize deserializer and register admission control handlers to the global routing handlers collection.

Types

type AdmissionFunc

type AdmissionFunc struct {
	Type AdmissionType
	Path string
	Func func(request *admissionv1.AdmissionRequest) (*admissionv1.AdmissionResponse, error)
}

AdmissionFunc defines an admission control handler

type AdmissionType

type AdmissionType string
const (
	AdmissionTypeMutating   AdmissionType = "Mutating"
	AdmissionTypeValidating AdmissionType = "Validating"
)

type Patch

type Patch struct {
	Option PatchOption `json:"op"`
	Path   string      `json:"path"`
	Value  interface{} `json:"value,omitempty"`
	From   string      `json:"from,omitempty"`
}

RFC 6902

type PatchOption

type PatchOption string
var (
	PatchOptionAdd     PatchOption = "add"
	PatchOptionRemove  PatchOption = "remove"
	PatchOptionReplace PatchOption = "replace"
	PatchOptionMove    PatchOption = "move"
	PatchOptionCopy    PatchOption = "copy"
	PatchOptionTest    PatchOption = "test"
)

Jump to

Keyboard shortcuts

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