Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusSuccess = "Success" StatusError = "Error" StatusSnBlank = "SnBlank" StatusCodeInvalid = "CodeInvalid" StatusAppIdInvalid = "AppIdInvalid" StatusDeviceInfoErr = "DeviceInfoError" StatusOpenIdInvalid = "OpenIdInvalid" )
定义常量来表示 StatusCodes 的键
Variables ¶
View Source
var StatusCodes = map[string]StatusMessage{
"Success": {
Code: 1,
Message: "操作成功",
},
"Error": {
Code: 0,
Message: "操作失败",
},
"SnBlank": {
Code: 0,
Message: "sn 不能为空",
},
"CodeInvalid": {
Code: 0,
Message: "Code无效的代码",
},
"AppIdInvalid": {
Code: 0,
Message: "无效的 AppId",
},
"DeviceInfoError": {
Code: 0,
Message: "设备暂未开通",
},
"OpenIdInvalid": {
Code: 0,
Message: "无效的 OpenId",
},
}
StatusCodes 定义状态和提示信息
Functions ¶
This section is empty.
Types ¶
type StatusMessage ¶
StatusMessage 状态和提示信息的结构体
Click to show internal directories.
Click to hide internal directories.