consts

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorInit      = iota + 1 //未使用
	OperatorSeal                 //施封完成
	OperatorCheck                //巡检中
	OperatorOpen                 //拆封
	OperatorException            //异常
)
View Source
const (
	RegisterStatusInit = iota //未处理
	RegisterStatusPass        //通过
	RegisterStatusDeny        //拒绝
)

注册状态

View Source
const (
	UserEnable  = 1
	UserDisable = 0
)

账号是否可用

View Source
const (
	TokenTypeAppUser = 1 //app用户的token
	TokenTypeAdmin   = 2 //admin的token
)
View Source
const (
	PageNum  = 1
	PageSize = 10
)
View Source
const (
	ExceptionType01 = iota + 1 //封条外部有损坏
	ExceptionType02            //封条丢失
	ExceptionType03            //封条读出的封条号和外部封条号不一致
	ExceptionType04            //封条无法读出
	ExceptionType05            //其他原因
)
View Source
const (
	ExceptionConfirmed    = 1  //已确认为异常
	ExceptionNotConfirmed = -1 //没有确认为异常
)

异常是否确认

View Source
const (
	VersionTypeApp    = iota + 1 //app版本号
	VersionTypeServer            //服务器版本号
)

版本类型

View Source
const (
	SuccessCode    = 0
	SuccessMessage = "success"
)
View Source
const (
	CompanyParentFlag = -1 //总公司的标记
)
View Source
const (
	CtxKeyTokenUser = "u"
)
View Source
const (
	ReportImageEmpty = "" //上传的时候没有照片的时候用这个值
)
View Source
const (
	//token有效期
	TokenPeriodValidity = 3600 * 24 * 7
)

Variables

View Source
var (
	ErrorDB           = errors.New("db error")
	ErrorParam        = errors.New("请求解析错误")
	ErrorValidate     = errors.New("参数格式错误")
	ErrorDataNotFound = errors.New("data not found")

	ErrorUserAlreadyExist = errors.New("用户已存在")
)
View Source
var (
	AESKey = []byte("app001_seal_1209")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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