Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication() *Application
func (*Application) Close ¶
func (app *Application) Close() error
func (*Application) Listen ¶
func (app *Application) Listen(addr string) error
func (*Application) Use ¶
func (app *Application) Use(fn HandlerFunc)
type Context ¶
type Context struct { Req *http.Request Res http.ResponseWriter Log logrus.FieldLogger Util *ContextUtil // contains filtered or unexported fields }
func NewContext ¶
func NewContext(w http.ResponseWriter, r *http.Request) *Context
type ContextUtil ¶ added in v1.1.0
type ContextUtil struct {
// contains filtered or unexported fields
}
func NewContextUtil ¶ added in v1.1.0
func NewContextUtil(ctx *Context) *ContextUtil
func (*ContextUtil) ParseBodyJson ¶ added in v1.1.0
func (u *ContextUtil) ParseBodyJson(v interface{}) error
func (*ContextUtil) ParseBodyJsonIterator ¶ added in v1.1.0
func (u *ContextUtil) ParseBodyJsonIterator() (jsoniter.Any, error)
func (*ContextUtil) ResponseJson ¶ added in v1.1.0
func (u *ContextUtil) ResponseJson(v interface{}) error
type HandlerFunc ¶
type HandlerFunc = func(ctx *Context)
Click to show internal directories.
Click to hide internal directories.