Documentation ¶
Index ¶
- Constants
- func Errmsg(msg string) errmsg
- func Resp(p *RespCode) string
- func Resp00001() string
- func Resp00001Byte() []byte
- func Resp00001Msg(msg string) string
- func Resp00001MsgByte(msg string) string
- func Resp00002() string
- func Resp00003() string
- func Resp00004() string
- func Resp00004Byte() []byte
- func Resp00005() string
- func Resp00005Byte(msgs ...string) []byte
- func Resp00006() string
- func Resp00007() string
- func Resp00007Byte() []byte
- func Resp00008() string
- func Resp00009() string
- func Resp10000(msg string) string
- func Resp10001() string
- func Resp10002(msg string) string
- func Resp21100() string
- func Resp21101() string
- func Resp21102() string
- func Resp21103() string
- func RespByte(p *RespCode) []byte
- func RespData(data interface{}) string
- func RespDatas(datas interface{}) string
- func RespPageDatas(datas, page interface{}) string
- func RespSuccess() string
- func RespSuccessByte() []byte
- func RespSuccessMsg(msg string) string
- func RespSuccessMsgByte(msg string) string
- func SErrmsg(f string, msgs ...interface{}) errmsg
- type RespCode
Constants ¶
View Source
const ( SUCCESS errcode = "00000" //成功 SUCCESS_MSG errmsg = "成功" //成功 )
View Source
const ( ERR000_01 errcode = "00001" //通用错误 ERR000_01_MSG errmsg = "网络错误,请稍后重试!" //通用错误 ERR000_02 errcode = "00002" //无操作权限 ERR000_02_MSG errmsg = "无操作权限" //无操作权限 ERR000_03 errcode = "00003" //请求格式不正确 ERR000_03_MSG errmsg = "请求格式不正确" //请求格式不正确 ERR000_04 errcode = "00004" //无访问权限 ERR000_04_MSG errmsg = "无访问权限" //无访问权限 ERR000_05 errcode = "00005" //请登录后操作 ERR000_05_MSG errmsg = "请登录后操作" //请登录后操作 ERR000_06 errcode = "00006" //请求类型未定义 ERR000_06_MSG errmsg = "请求类型未定义" //请求类型未定义 ERR000_07 errcode = "00007" //令牌过期 ERR000_07_MSG errmsg = "令牌过期" //令牌过期 ERR000_08 errcode = "00008" //帐号已在别处登陆 ERR000_08_MSG errmsg = "帐号已在别处登陆" //帐号已在别处登陆 ERR000_09 errcode = "00009" //权限被修改请重新登录 ERR000_09_MSG errmsg = "权限被修改请重新登录" //权限被修改请重新登录 )
errcode 000_00~99
View Source
const ( ERR100_00 errcode = "10000" //弹出提醒用户 ERR100_01 errcode = "10001" //数据不存在 ERR100_01_MSG errmsg = "数据不存在" //数据不存在 ERR100_02 errcode = "10002" //提示用户,不是弹出,前端自定义提示 )
errcode 100_00~99
View Source
const ( ERR211_00 errcode = "21100" //物联网关错误 ERR211_00_MSG errmsg = "物联网关错误" //物联网关错误 ERR211_01 errcode = "21101" //编号不存在 ERR211_01_MSG errmsg = "编号不存在" //编号不存在 ERR211_02 errcode = "21102" //编号已激活 ERR211_02_MSG errmsg = "编号已激活" //编号已激活 ERR211_03 errcode = "21103" //编号已停用 ERR211_03_MSG errmsg = "编号已停用" //编号已停用 )
errcode 211_00~99
Variables ¶
This section is empty.
Functions ¶
func Resp00001Msg ¶
func Resp00001MsgByte ¶
func RespPageDatas ¶
func RespPageDatas(datas, page interface{}) string
func RespSuccess ¶
func RespSuccess() string
func RespSuccessByte ¶
func RespSuccessByte() []byte
func RespSuccessMsg ¶
func RespSuccessMsgByte ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.