Documentation ¶
Index ¶
- Variables
- func Struct(value interface{}) error
- func Verify(ctx *Context, rules Rules) (err error)
- type Context
- func (ctx *Context) FindDefaultInt(key string, defaultValue int) int
- func (ctx *Context) FindDefaultInt64(key string, defaultValue int64) int64
- func (ctx *Context) FindDefaultString(key, defaultValue string) string
- func (ctx *Context) FindInt(key string) int
- func (ctx *Context) FindInt64(key string) int64
- func (ctx *Context) FindString(key string) string
- func (ctx *Context) Valid(recipient interface{}) error
- func (ctx *Context) ValidFiled(rules Rules) error
- type HandleFunc
- type Kid
- type LogFormatter
- type LogFormatterParams
- type LoggerConfig
- type Middleware
- type Option
- type Options
- type RouterGroup
- func (group *RouterGroup) DELETE(path string, handler HandleFunc, middlewares ...Middleware)
- func (group *RouterGroup) GET(path string, handler HandleFunc, middlewares ...Middleware)
- func (group *RouterGroup) Group(path string, middlewares ...Middleware) *RouterGroup
- func (group *RouterGroup) POST(path string, handler HandleFunc, middlewares ...Middleware)
- func (group *RouterGroup) PUT(path string, handler HandleFunc, middlewares ...Middleware)
- func (group *RouterGroup) UseMiddle(middlewares ...Middleware)
- type Rules
Constants ¶
This section is empty.
Variables ¶
View Source
var Validator = validator.New()
Functions ¶
Types ¶
type Context ¶
func (*Context) FindDefaultInt ¶ added in v0.0.4
func (*Context) FindDefaultInt64 ¶ added in v0.0.4
func (*Context) FindDefaultString ¶ added in v0.0.4
func (*Context) FindString ¶ added in v0.0.4
func (*Context) ValidFiled ¶ added in v0.0.4
type HandleFunc ¶
type HandleFunc func(*Context) interface{}
type Kid ¶
type Kid struct { *gin.Engine RouterGroup Logger logger.Logger Options *Options // contains filtered or unexported fields }
func (*Kid) NoMethod ¶ added in v0.0.4
func (kid *Kid) NoMethod(handleFunc HandleFunc)
func (*Kid) NoRoute ¶ added in v0.0.4
func (kid *Kid) NoRoute(handleFunc HandleFunc)
type LogFormatter ¶ added in v0.0.4
type LogFormatter func(params LogFormatterParams) string
type LogFormatterParams ¶ added in v0.0.4
type LoggerConfig ¶ added in v0.0.4
type LoggerConfig struct { Formatter LogFormatter Output io.Writer SkipPaths []string }
type Middleware ¶ added in v0.0.4
type Middleware func(*Context)
func LoggerWithConfig ¶ added in v0.0.4
func LoggerWithConfig(conf LoggerConfig) Middleware
func LoggerWithFormatter ¶ added in v0.0.4
func LoggerWithFormatter(f LogFormatter) Middleware
type RouterGroup ¶
type RouterGroup struct {
*gin.RouterGroup
}
func (*RouterGroup) DELETE ¶
func (group *RouterGroup) DELETE(path string, handler HandleFunc, middlewares ...Middleware)
func (*RouterGroup) GET ¶
func (group *RouterGroup) GET(path string, handler HandleFunc, middlewares ...Middleware)
func (*RouterGroup) Group ¶
func (group *RouterGroup) Group(path string, middlewares ...Middleware) *RouterGroup
func (*RouterGroup) POST ¶
func (group *RouterGroup) POST(path string, handler HandleFunc, middlewares ...Middleware)
func (*RouterGroup) PUT ¶
func (group *RouterGroup) PUT(path string, handler HandleFunc, middlewares ...Middleware)
func (*RouterGroup) UseMiddle ¶ added in v0.0.4
func (group *RouterGroup) UseMiddle(middlewares ...Middleware)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.