utils

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ser = Serializer()

Functions

func LoadResource

func LoadResource(ctx *Ctx)

func Serializer

func Serializer() runtime.Decoder

Types

type APIResource

type APIResource interface {
	String()
	Update(func(instance *APIResource, validata ...interface{}))
}

type AdmissionReviewHeadler

type AdmissionReviewHeadler struct {
	Deserializer runtime.Decoder
	Request      *http.Request
	Resource     APIResource
	Adm_obj      v1.AdmissionReview
	// contains filtered or unexported fields
}

codecs := serializer.NewCodecFactory(runtimeScheme)

func NewAdmiSsionReviewHeadler

func NewAdmiSsionReviewHeadler(request *http.Request) AdmissionReviewHeadler

func (*AdmissionReviewHeadler) Load

func (adm *AdmissionReviewHeadler) Load(resou runtime.Object)

func (*AdmissionReviewHeadler) LoadAdmissionReview

func (adm *AdmissionReviewHeadler) LoadAdmissionReview()
func (adm *AdmissionReviewHeadler) Data() v1.AdmissionReview{
	return v1.AdmissionReview{
		Request: adm.Request
	}
}

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 hook.RST
	HandlerFunc     interface{}
	MiddlewareIndex int
	// contains filtered or unexported fields
}

func New

func New(time_out time.Duration) *Ctx

func (*Ctx) Cancal

func (ctx *Ctx) Cancal()

func (*Ctx) Deadline

func (ctx *Ctx) Deadline() (deadline time.Time, ok bool)

func (*Ctx) Done

func (ctx *Ctx) Done() <-chan struct{}

func (*Ctx) Err

func (ctx *Ctx) Err() error

func (*Ctx) Value

func (ctx *Ctx) Value(key interface{}) interface{}

type Reponse

type Reponse struct {
	http.ResponseWriter
	StatuCode int
}

func (*Reponse) WriteReponse

func (res *Reponse) WriteReponse(data []byte, StatuCode int) (int, error)

Jump to

Keyboard shortcuts

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