Documentation ¶
Index ¶
- Constants
- type Api
- type Context
- func (ctx *Context) Abort()
- func (ctx *Context) AbortWithError(code int, msg string)
- func (ctx *Context) BindJSON(obj interface{}) (err error)
- func (ctx *Context) ClientIP() string
- func (ctx *Context) Continue()
- func (ctx *Context) Error(code int, msg string)
- func (ctx *Context) Get(key string) (value interface{}, ok bool)
- func (ctx *Context) GetBool(key string) (b bool)
- func (ctx *Context) GetFloat32(key string) (i float32)
- func (ctx *Context) GetFloat64(key string) (i float64)
- func (ctx *Context) GetInBody() string
- func (ctx *Context) GetInHeader(key string) string
- func (ctx *Context) GetInt(key string) (i int)
- func (ctx *Context) GetInt32(key string) (i int32)
- func (ctx *Context) GetInt64(key string) (i int64)
- func (ctx *Context) GetOutBody() string
- func (ctx *Context) GetOutHeader(key string) string
- func (ctx *Context) GetString(key string) (s string)
- func (ctx *Context) GetUint(key string) (i uint)
- func (ctx *Context) GetUint32(key string) (i uint32)
- func (ctx *Context) GetUint64(key string) (i uint64)
- func (ctx *Context) JSON(data interface{})
- func (ctx *Context) Method() string
- func (ctx *Context) Path() string
- func (ctx *Context) Set(key string, value interface{})
- func (ctx *Context) SetInHeader(key, value string)
- func (ctx *Context) SetOutBody(body string)
- func (ctx *Context) SetOutHeader(key, value string)
- type HandlerFunc
- type HandlerFuncChain
- type IGroup
- type IRoute
- type Input
- type OJson
- type Output
- type RouteInfo
- type Router
- func (router *Router) BasePath() string
- func (router *Router) Group(relativePath string, handlers ...HandlerFunc) *Router
- func (router *Router) LastUse(middleware ...HandlerFunc) *Router
- func (router *Router) Post(relativePath string, handlers ...HandlerFunc) *Router
- func (router *Router) Use(middleware ...HandlerFunc) *Router
- type Validate
Constants ¶
View Source
const Version = "v1.0.3"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { Router // contains filtered or unexported fields }
func (*Api) Use ¶
func (api *Api) Use(middleware ...HandlerFunc) *Router
type Context ¶
type Context struct { Input Input Output Output KV map[string]interface{} // contains filtered or unexported fields }
func (*Context) AbortWithError ¶
func (*Context) GetFloat32 ¶
func (*Context) GetFloat64 ¶
func (*Context) GetInHeader ¶
func (*Context) GetOutBody ¶
func (*Context) GetOutHeader ¶
func (*Context) SetInHeader ¶
func (*Context) SetOutBody ¶
func (*Context) SetOutHeader ¶
type HandlerFunc ¶
type HandlerFunc func(ctx *Context)
func DefaultRecovery ¶
func DefaultRecovery() HandlerFunc
func Logger ¶
func Logger() HandlerFunc
func Recovery ¶
func Recovery() HandlerFunc
type HandlerFuncChain ¶
type HandlerFuncChain []HandlerFunc
type Output ¶
type Output struct { Response http.ResponseWriter // contains filtered or unexported fields }
func (*Output) RenderJson ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Group ¶
func (router *Router) Group(relativePath string, handlers ...HandlerFunc) *Router
func (*Router) LastUse ¶
func (router *Router) LastUse(middleware ...HandlerFunc) *Router
func (*Router) Post ¶
func (router *Router) Post(relativePath string, handlers ...HandlerFunc) *Router
func (*Router) Use ¶
func (router *Router) Use(middleware ...HandlerFunc) *Router
Source Files ¶
Click to show internal directories.
Click to hide internal directories.