response

package
v0.0.0-...-ffddd80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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

type IndexResponse struct {
	Service string `json:"service"`
	Result  bool   `json:"result"`
}

IndexResponse / response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL