Documentation ¶
Index ¶
- Variables
- func HandleMutatingFun(f Mutatingfun) func(ctx *Ctx)
- func HandleVlidatingFun(f ValidateFun) func(ctx *Ctx)
- type AdminMiddleWare
- type Ctx
- type Hook
- func (h *Hook) HandleFun(ctx *Ctx) (err error)
- func (h *Hook) Mutating(url string, f Mutatingfun)
- func (h *Hook) NextMiddleware(ctx *Ctx) (err error)
- func (h *Hook) Query() UrlParams
- func (h *Hook) Registry(kind metav1.GroupVersionKind, resource runtime.Object)
- func (h *Hook) Route(url string, f func(ctx *Ctx))
- func (h *Hook) Run(addr, certFile, keyFile string)
- func (h *Hook) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *Hook) Validating(url string, f ValidateFun)
- type MiddleWare
- type Mutatingfun
- type RST
- type Reponse
- type ResourceHook
- type ResourceMiddleWare
- type TypeError
- type UrlParams
- type ValidateFun
Constants ¶
This section is empty.
Variables ¶
View Source
var Index = &index{ v1.GroupVersionKind{ Group: "core", Version: "v1", Kind: "Pods", }: &v12.Pod{}, }
Functions ¶
func HandleMutatingFun ¶
func HandleMutatingFun(f Mutatingfun) func(ctx *Ctx)
func HandleVlidatingFun ¶
func HandleVlidatingFun(f ValidateFun) func(ctx *Ctx)
Types ¶
type AdminMiddleWare ¶
type AdminMiddleWare struct { }
func (*AdminMiddleWare) Process_request ¶
func (w *AdminMiddleWare) Process_request(ctx *Ctx)
func (*AdminMiddleWare) Process_response ¶
func (w *AdminMiddleWare) Process_response(ctx *Ctx)
type Ctx ¶
type Ctx struct { //context.WithTimeout context.Context context.CancelFunc Object runtime.Object Old_Object runtime.Object Raw_Object runtime.Object ChangeObject runtime.Object Adm_obj v1.AdmissionReview Validate_result RST HandlerFunc interface{} MiddlewareIndex int Request *http.Request // contains filtered or unexported fields }
func NewContext ¶
type Hook ¶
type Hook struct { HandlerFun map[string]func(ctx *Ctx) Middleware []MiddleWare // contains filtered or unexported fields }
func Default ¶
func Default(middlewares ...MiddleWare) *Hook
func (*Hook) Mutating ¶
func (h *Hook) Mutating(url string, f Mutatingfun)
func (*Hook) NextMiddleware ¶
func (*Hook) Registry ¶
func (h *Hook) Registry(kind metav1.GroupVersionKind, resource runtime.Object)
func (*Hook) Validating ¶
func (h *Hook) Validating(url string, f ValidateFun)
type MiddleWare ¶
type Reponse ¶
type Reponse struct { http.ResponseWriter StatuCode int // contains filtered or unexported fields }
type ResourceHook ¶
type ResourceMiddleWare ¶
type ResourceMiddleWare struct { }
func (*ResourceMiddleWare) Process_request ¶
func (w *ResourceMiddleWare) Process_request(ctx *Ctx)
func (*ResourceMiddleWare) Process_response ¶
func (w *ResourceMiddleWare) Process_response(ctx *Ctx)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.