Documentation ¶
Overview ¶
Package webhook holds shared code related to routing for webhook admission.
Index ¶
- type Handler
- type HandlerFunc
- type Request
- type Response
- type RouteMatch
- func (r *RouteMatch) DryRun(dryRun bool) *RouteMatch
- func (r *RouteMatch) Group(group string) *RouteMatch
- func (r *RouteMatch) Handle(handler Handler) *RouteMatch
- func (r *RouteMatch) HandleFunc(handler HandlerFunc) *RouteMatch
- func (r *RouteMatch) Kind(kind string) *RouteMatch
- func (r *RouteMatch) Name(name string) *RouteMatch
- func (r *RouteMatch) Namespace(namespace string) *RouteMatch
- func (r *RouteMatch) Operation(operation v1.Operation) *RouteMatch
- func (r *RouteMatch) Resource(resource string) *RouteMatch
- func (r *RouteMatch) SubResource(sr string) *RouteMatch
- func (r *RouteMatch) Type(objType runtime.Object) *RouteMatch
- func (r *RouteMatch) Version(version string) *RouteMatch
- type Router
- func (r *Router) DryRun(dryRun bool) *RouteMatch
- func (r *Router) Group(group string) *RouteMatch
- func (r *Router) Handle(handler Handler) *RouteMatch
- func (r *Router) HandleFunc(hf HandlerFunc) *RouteMatch
- func (r *Router) Kind(kind string) *RouteMatch
- func (r *Router) Name(name string) *RouteMatch
- func (r *Router) Namespace(namespace string) *RouteMatch
- func (r *Router) Operation(operation v1.Operation) *RouteMatch
- func (r *Router) Resource(resource string) *RouteMatch
- func (r *Router) ServeHTTP(rw http.ResponseWriter, req *http.Request)
- func (r *Router) SubResource(subResource string) *RouteMatch
- func (r *Router) Type(objType runtime.Object) *RouteMatch
- func (r *Router) Version(version string) *RouteMatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
The Handler type is an adapter to allow admission checking on a given request. Handlers should update the response to control admission.
type HandlerFunc ¶
HandlerFunc type is used to add regular functions as Handler.
type Request ¶
Request wrapper for an AdmissionRequest.
func (*Request) DecodeObject ¶
DecodeObject decodes the Object in the request into a new runtime.Object of type specified by Type(). If Type() was not set the runtime.Object will be of type *unstructured.Unstructured.
type Response ¶
type Response struct {
v1.AdmissionResponse
}
Response a wrapper for AdmissionResponses object
type RouteMatch ¶
type RouteMatch struct {
// contains filtered or unexported fields
}
RouteMatch type matching of admission Request to Handlers.
func (*RouteMatch) DryRun ¶
func (r *RouteMatch) DryRun(dryRun bool) *RouteMatch
DryRun matches admission request with the matching DryRun value.
func (*RouteMatch) Group ¶
func (r *RouteMatch) Group(group string) *RouteMatch
Group matches admission request with the matching Group value.
func (*RouteMatch) Handle ¶
func (r *RouteMatch) Handle(handler Handler) *RouteMatch
Handle sets the Handler to be called for matching admission request.
func (*RouteMatch) HandleFunc ¶
func (r *RouteMatch) HandleFunc(handler HandlerFunc) *RouteMatch
HandleFunc sets the handler to be called for matching admission request.
func (*RouteMatch) Kind ¶
func (r *RouteMatch) Kind(kind string) *RouteMatch
Kind matches admission request with the matching Kind value.
func (*RouteMatch) Name ¶
func (r *RouteMatch) Name(name string) *RouteMatch
Name matches admission request with the matching Name value.
func (*RouteMatch) Namespace ¶
func (r *RouteMatch) Namespace(namespace string) *RouteMatch
Namespace matches admission request with the matching Namespace value.
func (*RouteMatch) Operation ¶
func (r *RouteMatch) Operation(operation v1.Operation) *RouteMatch
Operation matches admission request with the matching Operation value.
func (*RouteMatch) Resource ¶
func (r *RouteMatch) Resource(resource string) *RouteMatch
Resource matches admission request with the matching Resource value.
func (*RouteMatch) SubResource ¶
func (r *RouteMatch) SubResource(sr string) *RouteMatch
SubResource matches admission request with the matching SubResource value.
func (*RouteMatch) Type ¶
func (r *RouteMatch) Type(objType runtime.Object) *RouteMatch
Type specifies the runtime.Object to use for decoding.
func (*RouteMatch) Version ¶
func (r *RouteMatch) Version(version string) *RouteMatch
Version matches admission request with the matching Version value.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router manages request and the calling of matching handlers.
func (*Router) DryRun ¶
func (r *Router) DryRun(dryRun bool) *RouteMatch
DryRun matches admission request with the matching DryRun value.
func (*Router) Group ¶
func (r *Router) Group(group string) *RouteMatch
Group matches admission request with the matching Group value.
func (*Router) Handle ¶
func (r *Router) Handle(handler Handler) *RouteMatch
Handle sets the Handler to be called for matching admission request.
func (*Router) HandleFunc ¶
func (r *Router) HandleFunc(hf HandlerFunc) *RouteMatch
HandleFunc sets the handler to be called for matching admission request.
func (*Router) Kind ¶
func (r *Router) Kind(kind string) *RouteMatch
Kind matches admission request with the matching Kind value.
func (*Router) Name ¶
func (r *Router) Name(name string) *RouteMatch
Name matches admission request with the matching Name value.
func (*Router) Namespace ¶
func (r *Router) Namespace(namespace string) *RouteMatch
Namespace matches admission request with the matching Namespace value.
func (*Router) Operation ¶
func (r *Router) Operation(operation v1.Operation) *RouteMatch
Operation matches admission request with the matching Operation value.
func (*Router) Resource ¶
func (r *Router) Resource(resource string) *RouteMatch
Resource matches admission request with the matching Resource value.
func (*Router) ServeHTTP ¶
func (r *Router) ServeHTTP(rw http.ResponseWriter, req *http.Request)
ServeHTTP inspects the http.Request and calls the Admit function on all matching handlers.
func (*Router) SubResource ¶
func (r *Router) SubResource(subResource string) *RouteMatch
SubResource matches admission request with the matching SubResource value.
func (*Router) Type ¶
func (r *Router) Type(objType runtime.Object) *RouteMatch
Type specifies the runtime.Object to use for decoding.
func (*Router) Version ¶
func (r *Router) Version(version string) *RouteMatch
Version matches admission request with the matching Version value.