constants

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 0 Imported by: 0

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

type StatusMessage struct {
	Code    int32
	Message string
}

StatusMessage 状态和提示信息的结构体

Jump to

Keyboard shortcuts

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