result

package
v0.0.0-...-fe60696 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpResult

func HttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)

HttpResult http返回

Types

type ResponseError

type ResponseError struct {
	Code uint32 `json:"code"`
	Msg  string `json:"msg"`
}

func Error

func Error(errCode uint32, errMsg string) *ResponseError

type ResponseSuccess

type ResponseSuccess struct {
	Code uint32      `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

func Success

func Success(data interface{}) *ResponseSuccess

Jump to

Keyboard shortcuts

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