Documentation ¶
Index ¶
- Constants
- Variables
- func ResponseFail(ctx *fasthttp.RequestCtx, statusCode int, data []byte)
- func ResponseFailDefault(ctx *fasthttp.RequestCtx, statusCode int, msg string)
- func ResponseSuccess(ctx *fasthttp.RequestCtx, statusCode int, data []byte)
- func ResponseSuccessDefault(ctx *fasthttp.RequestCtx, statusCode int, msg string)
- func ResponseSuccessOK(ctx *fasthttp.RequestCtx, data []byte)
- func ResponseSuccessOKDefault(ctx *fasthttp.RequestCtx, msg string)
- type Client
- type StandardResponse
Constants ¶
View Source
const ( GET = "GET" POST = "POST" PUT = "PUT" DELETE = "DELETE" )
Variables ¶
View Source
var ErrClientBadRequest = errors.New("bad request") // Final status
Clients replies
Functions ¶
func ResponseFail ¶
func ResponseFail(ctx *fasthttp.RequestCtx, statusCode int, data []byte)
func ResponseFailDefault ¶
func ResponseFailDefault(ctx *fasthttp.RequestCtx, statusCode int, msg string)
func ResponseSuccess ¶
func ResponseSuccess(ctx *fasthttp.RequestCtx, statusCode int, data []byte)
func ResponseSuccessDefault ¶
func ResponseSuccessDefault(ctx *fasthttp.RequestCtx, statusCode int, msg string)
func ResponseSuccessOK ¶
func ResponseSuccessOK(ctx *fasthttp.RequestCtx, data []byte)
func ResponseSuccessOKDefault ¶
func ResponseSuccessOKDefault(ctx *fasthttp.RequestCtx, msg string)
Types ¶
type Client ¶
func CreateClient ¶
type StandardResponse ¶
type StandardResponse struct {
Message string `json:"message,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.