Documentation
¶
Overview ¶
middleware aop
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHttpServer ¶
func NewHttpServer(opts ...HttpServerOption) *httpServer
Types ¶
type Context ¶
type Context struct {
Req *http.Request
Resp http.ResponseWriter
Params map[string]string
RespData []byte
RespStatusCode int
MatchedRoute string
}
func (*Context) RespString ¶ added in v0.1.51
type HandleFunc ¶
type HandleFunc func(ctx *Context)
type HttpServerOption ¶ added in v0.1.21
type HttpServerOption func(s *httpServer)
func ServerWithMiddleware ¶ added in v0.1.21
func ServerWithMiddleware(ms ...MiddleWare) HttpServerOption
type MiddleWare ¶ added in v0.1.21
type MiddleWare func(next HandleFunc) HandleFunc
Click to show internal directories.
Click to hide internal directories.