Versions in this module Expand all Collapse all v1 v1.0.2 Feb 24, 2023 Changes in this version type RouteHub + func GetRouteHub() *RouteHub v1.0.1 Dec 25, 2022 Changes in this version type EzHandler + func (this *EzHandler) SAdd(weight int, name string, action EzAction) *EzHandler v1.0.0 Dec 11, 2022 Changes in this version + func AddAfterHandler(name string, action EzAction) + func AddBeforeHandler(name string, action EzAction) + func AddFinisher(name string, action EzAction) + func AddPreparer(name string, action EzAction) + func Dispatch(operation *Operation) + func PublicHandle(handler *EzHandler, operation *Operation) + func Run() + type EzAction func(operation *Operation) + type EzFunc func(operation *Operation) + type EzHandler struct + Action *EzAction + ActionSort []string + Actions map[string]map[string]*EzAction + CurAction *EzAction + IsStop bool + Matcher string + Public map[string]*PublicData + Router *Router + StatusCode int + func Do(router *Router, action EzAction) *EzHandler + func NewEzHandler(router *Router, action *EzAction) *EzHandler + func (this *EzHandler) Add(weight int, name string, action EzAction) *EzHandler + func (this *EzHandler) Get(dataName string) interface{} + func (this *EzHandler) Run(operation *Operation) + func (this *EzHandler) Set(dataName string, data interface{}) + type Input struct + Form url.Values + Json []byte + Request *http.Request + Url string + UrlData map[string]string + func GetInputFromRequest(req *http.Request) *Input + func NewInput() *Input + func (this *Input) Get(key string) *InputAnyThing + func (this *Input) GetFromGetPost(key string) *InputAnyThing + func (this *Input) GetFromJson(key string) *InputAnyThing + func (this *Input) GetFromUrl(key string) *InputAnyThing + type InputAnyThing struct + Receive interface{} + func NewInputAnyThing(v interface{}) *InputAnyThing + func (this *InputAnyThing) IsBool(def ...bool) bool + func (this *InputAnyThing) IsFloat32(def ...float32) float32 + func (this *InputAnyThing) IsFloat64(def ...float64) float64 + func (this *InputAnyThing) IsInt(def ...int) int + func (this *InputAnyThing) IsInt16(def ...int16) int16 + func (this *InputAnyThing) IsInt32(def ...int32) int32 + func (this *InputAnyThing) IsInt64(def ...int64) int64 + func (this *InputAnyThing) IsInt8(def ...int8) int8 + func (this *InputAnyThing) IsMap() map[string]interface{} + func (this *InputAnyThing) IsString(def ...string) string + func (this *InputAnyThing) IsUint(def ...uint) uint + func (this *InputAnyThing) IsUint16(def ...uint16) uint16 + func (this *InputAnyThing) IsUint32(def ...uint32) uint32 + func (this *InputAnyThing) IsUint64(def ...uint64) uint64 + func (this *InputAnyThing) IsUint8(def ...uint8) uint8 + type JsonOut struct + Code int + Data interface{} + Message string + func NewJsonOut(p ...interface{}) *JsonOut + type Operation struct + ChainKey string + Handler *EzHandler + Input *Input + IsStop bool + Logger *core.Logger + Output *Output + Timer *core.Timer + func GetOperationFromContext(ctx context.Context) *Operation + func NewOperation(resp http.ResponseWriter, req *http.Request) *Operation + func (this *Operation) CreateContext() context.Context + func (this *Operation) FillJson(model interface{}) error + func (this *Operation) Get(key string) *InputAnyThing + func (this *Operation) GetHeader() http.Header + func (this *Operation) GetPublic(dataName string) interface{} + func (this *Operation) Html(data string) + func (this *Operation) JsonOut(data interface{}) + func (this *Operation) SetHeader(key string, value string) + func (this *Operation) SetPublic(dataName string, data interface{}) + func (this *Operation) Stop() + func (this *Operation) StopHandle() + type Output struct + Body []byte + Response http.ResponseWriter + Writer *bytes.Buffer + func (this *Output) Byte(data []byte) + func (this *Output) Html(data string) + func (this *Output) Json(data interface{}) + type PublicData struct + Chan chan int + Read int + V interface{} + Write int + type RouteHub struct + AfterHandler map[string]*EzAction + BeforeHandler map[string]*EzAction + DirectRouter map[string]*EzHandler + Finisher map[string]*EzAction + Preparer map[string]*EzAction + RegxRouter map[string]*EzHandler + func NewRouteHub() *RouteHub + func (this *RouteHub) AddDirectRoute(router *Router, action *EzAction) *EzHandler + func (this *RouteHub) AddRegxRoute(router *Router, action *EzAction) *EzHandler + type Router struct + Group string + Prefix string + Suffix string + Url string + type ServerHandler struct + func NewServerHandler() *ServerHandler + func (this *ServerHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request)