msg

package
v0.0.0-...-269099d Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuccessCode = 1
	ErrCode     = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Code  int         `json:"code"`
	Data  interface{} `json:"data"`
	Error string      `json:"error"`
}

API Response 基础序列化器

func ErrResp

func ErrResp(errStr string) (int, Response)

Err 通用错误处理

func SuccessResp

func SuccessResp(data interface{}) (int, Response)

SuccessResp 通用处理

Jump to

Keyboard shortcuts

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