serializer

package
v0.0.0-...-6149473 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OK                 = 0
	WRONG_PASSWORD     = iota + 4000 //密码错误
	DIFF_REPASSWORD                  //两次密码不一致
	INVALID_TOKEN                    //无效的token
	REGISTED_EMAIL                   //邮箱已被注册
	FAIL_REGISTER                    //注册失败
	PARAM_VALIDATE_ERR               //参数验证失败
	USER_NOT_EXSIST                  //用户不存在
	INCORRECT_PASSWD                 //密码错误
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	Code int    `json:"code"`
	Msg  string `json:"msg,omitempty"`
	Data any    `json:"data,omitempty"`
}

func Fail

func Fail(code int, msg string) Response

func Success

func Success(msg string, data any) Response

Jump to

Keyboard shortcuts

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