Documentation ¶
Index ¶
- type HttpController
- func (hc *HttpController) Fail(ctx *routing.Context, err error, msg ...string) error
- func (hc *HttpController) ReadJson(ctx *routing.Context, data interface{}) error
- func (hc *HttpController) ReadParams() error
- func (hc *HttpController) Success(ctx *routing.Context, data interface{}, msg string) error
- type HttpServer
- type MethodType
- type Response
- type Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpController ¶
type HttpController struct { }
func (*HttpController) ReadJson ¶
func (hc *HttpController) ReadJson(ctx *routing.Context, data interface{}) error
func (*HttpController) ReadParams ¶
func (hc *HttpController) ReadParams() error
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func New ¶
func New(port int32) *HttpServer
func (*HttpServer) Port ¶
func (hs *HttpServer) Port() int32
func (*HttpServer) RegisterRoute ¶
func (hs *HttpServer) RegisterRoute(prefix string, routes []Route, middlewares ...routing.Handler)
func (*HttpServer) Router ¶
func (hs *HttpServer) Router() *routing.RouteGroup
func (*HttpServer) Server ¶
func (hs *HttpServer) Server()
type MethodType ¶
type MethodType string
const ( GET MethodType = "GET" POST MethodType = "POST" PUT MethodType = "PUT" DELETE MethodType = "DELETE" )
Click to show internal directories.
Click to hide internal directories.