Documentation ¶
Index ¶
Constants ¶
View Source
const (
JsonContentType = `application/json`
)
Variables ¶
View Source
var (
UniversalDeserializer = serializer.NewCodecFactory(runtime.NewScheme()).UniversalDeserializer()
)
Functions ¶
func AdmitFuncHandler ¶
AdmitFuncHandler takes an admitFunc and wraps it into a http.Handler by means of calling serveAdmitFunc.
Types ¶
type AdmitFunc ¶
type AdmitFunc func(context.Context, *admission.AdmissionRequest) ([]PatchOperation, error)
AdmitFunc is a callback for admission controller logic. Given an AdmissionRequest, it returns the sequence of patch operations to be applied in case of success, or the error that will be shown when the operation is rejected.
type PatchOperation ¶
type PatchOperation struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value,omitempty"` }
PatchOperation is an operation of a JSON patch, see https://tools.ietf.org/html/rfc6902 .
Click to show internal directories.
Click to hide internal directories.