response

package
v0.0.0-...-8412fec Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success = 200
	Error   = 500

	RegisterEmailSendFailed = 10001 // 用户注册邮件发送失败
	PasswordIsNotIdentity   = 10002 // 密码不一致

	GetSmMsApiTokenFailed = 10003 // 获取sm.ms api token 失败
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonResponse

type JsonResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func ToJsonResponse

func ToJsonResponse(code int, message string, data ...interface{}) *JsonResponse

ToJsonResponse 封装统一格式api返回的信息

func (*JsonResponse) ToJson

func (res *JsonResponse) ToJson(c *gin.Context)

Jump to

Keyboard shortcuts

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