Documentation ¶
Index ¶
- Constants
- type HTTPServerConfig
- type HttpServer
- type Impl
- func (hs *Impl) RegisterRouter(path string, handler func(*ghttp.GRegisterController) error, req interface{}, ...)
- func (hs *Impl) RegisterRouterWithRawHttpHandler(path string, handler func(w http.ResponseWriter, r *http.Request), ...)
- func (hs *Impl) RegisterWSRouter(path string, handler func(*ghttp.GRegisterWSController))
- func (hs *Impl) Run(ctx context.Context)
- func (hs *Impl) UseGloryMW(filters ...ghttp.Filter)
- func (hs *Impl) UseMW(filters ...negroni.Handler)
Constants ¶
View Source
const SDID = "HttpServer-Impl"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServerConfig ¶
type HTTPServerConfig struct {
Port int `yaml:"port"`
}
type HttpServer ¶
type HttpServer interface { RegisterRouter(path string, handler func(*ghttp.GRegisterController) error, req interface{}, rsp interface{}, method string, filters []ghttp.Filter) RegisterWSRouter(path string, handler func(*ghttp.GRegisterWSController)) RegisterRouterWithRawHttpHandler(path string, handler func(w http.ResponseWriter, r *http.Request), method string) Run(ctx context.Context) }
type Impl ¶
type Impl struct {
// contains filtered or unexported fields
}
func (*Impl) RegisterRouter ¶
func (hs *Impl) RegisterRouter(path string, handler func(*ghttp.GRegisterController) error, req interface{}, rsp interface{}, method string, filters []ghttp.Filter)
RegisterRouter user API
func (*Impl) RegisterRouterWithRawHttpHandler ¶
func (hs *Impl) RegisterRouterWithRawHttpHandler(path string, handler func(w http.ResponseWriter, r *http.Request), method string)
RegisterRouterWithRawHttpHandler user API
func (*Impl) RegisterWSRouter ¶
func (hs *Impl) RegisterWSRouter(path string, handler func(*ghttp.GRegisterWSController))
RegisterWSRouter user API
func (*Impl) UseGloryMW ¶
Click to show internal directories.
Click to hide internal directories.