common

package
v0.0.0-...-5781841 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Nil                = "" //无msg,非正常情况,需要debug
	SuccessMsg         = "success"
	CheckAuthErrMsg    = "权限不足,请先登录"
	TokenRevokedErrMsg = "已在其他地方登陆"
	TokenExpireErrMsg  = "登陆过期"
	QueryBindErrMsg    = "query参数解析错误"
	ReqIllegal         = "非法的Req"
	AccountErrMsg      = "账号或密码错误"
	InternalErrMsg     = "服务内部错误"
	TokenRevokeMsg     = "token revoked"
	CodeErrMsg         = "验证码错误"
	CodeMinuteErrMsg   = "1分钟只能发送一条短信"
	MemHasErrMsg       = "用户已存在"
	DetailMaxErrMsg    = "已达每日阅读上限"
	// req check
	ReqAccountErrMsg   = "帐号不能为空"
	ReqMobileErrMsg    = "非法的手机号"
	ReqMobileHasErrMsg = "手机号已存在"
	ReqEmailErrMsg     = "非法的邮箱"
	ReqOverLen         = "参数长度过长"
	//wechat
	WechatOfficialErrMsg = "微信服务错误"
	WechatPayErrMsg      = "微信支付失败"
	WechatOrderReqErrMsg = "非法的订单请求"
	WechatQRLoginErrMsg  = "尚未微信扫码登录"
	//	SEO
	SEOErrMsg = "SEO500"
)
View Source
const (
	DefaultConfFileName = "xxx_conf.yaml"
)

Variables

View Source
var Quit = vege.NewQuit()

server quit 控制器

Functions

func GetWebMsgCode

func GetWebMsgCode(errMsg string) string

Types

type WebError

type WebError struct {
	// contains filtered or unexported fields
}

func GetWebErrorFromErrMsg

func GetWebErrorFromErrMsg(errMsg string) *WebError

func (*WebError) Code

func (err *WebError) Code() string

func (*WebError) Error

func (err *WebError) Error() string

Jump to

Keyboard shortcuts

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