Versions in this module Expand all Collapse all v1 v1.1.0 Apr 6, 2022 v1.0.0 Mar 23, 2022 Changes in this version + var ErrHttpGroupNil = errors.New("http group nil") + var ErrHttpLogNil = errors.New("log is nil") + func InitHttpServerSingle(ec *EnetConfig) error + type CommonJsonResp struct + Code int + Msg string + func CreateJsonResp(code int, msg string) CommonJsonResp + func CreateSuccessJsonResp() CommonJsonResp + type Context struct + type EnetConfig struct + Host string + L NetLog + type HandlerFunc func(c *Context) + type HttpServer struct + var HttpWeb *HttpServer + func InitHttpServer(ec *EnetConfig) (*HttpServer, error) + func (h *HttpServer) Any(path string, handlers ...HandlerFunc) + func (h *HttpServer) Close() + func (h *HttpServer) Get(path string, handlers ...HandlerFunc) + func (h *HttpServer) NewGroup(path string) *RouterGroup + func (h *HttpServer) Post(path string, handlers ...HandlerFunc) + func (h *HttpServer) Run() + type NetLog interface + Debugf func(f string, args ...interface{}) + Errorf func(f string, args ...interface{}) + Infof func(f string, args ...interface{}) + Warnf func(f string, args ...interface{}) + type RouterGroup struct + func (r *RouterGroup) Any(relativePath string, handlers ...HandlerFunc) + func (r *RouterGroup) Get(relativePath string, handlers ...HandlerFunc) + func (r *RouterGroup) Post(relativePath string, handlers ...HandlerFunc)