Documentation ¶
Index ¶
- func SendDataResponse(ctx *fasthttp.RequestCtx, service string, desc string, data interface{}) error
- func SendErrorResponse(ctx *fasthttp.RequestCtx, service string, reason string) error
- func SendImageResponse(ctx *fasthttp.RequestCtx, fileName string) error
- type DataResponse
- type ErrorResponse
- type IndexResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendDataResponse ¶
func SendDataResponse(ctx *fasthttp.RequestCtx, service string, desc string, data interface{}) error
SendDataResponse send error response
func SendErrorResponse ¶
func SendErrorResponse(ctx *fasthttp.RequestCtx, service string, reason string) error
SendErrorResponse send error response
func SendImageResponse ¶
func SendImageResponse(ctx *fasthttp.RequestCtx, fileName string) error
SendImageResponse send error response
Types ¶
type DataResponse ¶
type DataResponse struct { Service string `json:"mod"` Description string `json:"description"` Time string `json:"time"` Host string `json:"host"` Method string `json:"method"` Data interface{} `json:"data"` Result bool `json:"result"` HashType string `json:"hash_type"` Hash string `json:"hash"` }
DataResponse Some data response
type ErrorResponse ¶
type ErrorResponse struct { Service string `json:"service"` Result bool `json:"result"` Reason string `json:"reason"` }
ErrorResponse 403 response
type IndexResponse ¶
IndexResponse / response
Click to show internal directories.
Click to hide internal directories.