Documentation ¶
Index ¶
- func MethodNotAllowed(ctx *fasthttp.RequestCtx)
- func NotFound(ctx *fasthttp.RequestCtx)
- func PanicHandler(ctx *fasthttp.RequestCtx, rcv interface{})
- func SetRestError(ctx *fasthttp.RequestCtx, err error, errCode int)
- type HttpRouter
- type HttpServer
- type RestError
- type RestErrorArg
- type RestErrorArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MethodNotAllowed ¶
func MethodNotAllowed(ctx *fasthttp.RequestCtx)
func NotFound ¶
func NotFound(ctx *fasthttp.RequestCtx)
func PanicHandler ¶
func PanicHandler(ctx *fasthttp.RequestCtx, rcv interface{})
func SetRestError ¶
func SetRestError(ctx *fasthttp.RequestCtx, err error, errCode int)
Types ¶
type HttpRouter ¶
type HttpRouter struct {
fasthttprouter.Router
}
type HttpServer ¶
func NewHttpServer ¶
func NewHttpServer(routing *HttpRouter, logger log.Logger, params map[string]interface{}) (*HttpServer, error)
func (*HttpServer) Start ¶
func (h *HttpServer) Start(quitSignal <-chan bool) error
func (*HttpServer) Stop ¶
func (h *HttpServer) Stop() error
type RestError ¶
type RestError struct { Method string `json:"method,omitempty"` ErrorString string `json:"errorString,omitempty"` ErrorCode int `json:"errorCode"` Arguments RestErrorArgs `json:"arguments,omitempty"` }
type RestErrorArg ¶
type RestErrorArgs ¶
type RestErrorArgs struct { Query string `json:"query,omitempty"` Keys []RestErrorArg `json:"keys,omitempty"` }
Click to show internal directories.
Click to hide internal directories.