global

package
v0.0.0-...-d62a2a9 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeFormat = "2006-01-02 15:04:05"
	MaxLimit   = 1000
)
View Source
const (
	SecondsPerMinute = 60
	SecondsPerHour   = 60 * SecondsPerMinute
	SecondsPerDay    = 24 * SecondsPerHour
	SecondsPerWeek   = 7 * SecondsPerDay
	DaysPer400Years  = 365*400 + 97
	DaysPer100Years  = 365*100 + 24
	DaysPer4Years    = 365*4 + 1
)
View Source
const (
	OperateSuccess    = "操作成功"
	CreatedSuccess    = "创建成功"
	SaveSuccess       = "保存成功"
	UploadSuccess     = "添加附件成功"
	QuerySuccess      = "查询成功"
	DeleteSuccess     = "删除成功"
	LoginSuccess      = "登录成功"
	DeleteUserSuccess = "删除管理员成功"
	CreateKeySuccess  = "生成密钥成功"
	SetSuccess        = "设置成功"
)
View Source
const (
	OperateFailed    = "操作失败"
	CreatedFailed    = "创建失败"
	UploadFailed     = "上传文件失败,请重试"
	SaveFailed       = "保存失败,请重试"
	DeleteFailed     = "删除失败,请重试"
	QueryFailed      = "查询失败"
	LoginTypeErr     = "当前登录方式不允许"
	DataNotFound     = "数据不存在"
	LoginFail        = "登录失败,请检查用户名和密码是否输入正确"
	UserNotFound     = "用户不存在"
	UserHasAddFailed = "新增失败"
	UKeyHasAddAdmin  = "当前KEY已注册,新增失败"
	LoginTokenErr    = "登录超时,请重新登录"
	LoginTokenNull   = "请重新登录"
	Unauthorized     = "未认证"
	AuthForbidden    = "无权访问"
	InitDown         = "初始化已完成"
	DeleteUserFail   = "删除管理员失败,请重试"
	CreateKeyFail    = "生成密钥失败,请重试"
	SetFail          = "设置失败,请重试"
)
View Source
const LogMsg = "hss" //日志收集关键信息标识
View Source
const PageSizeDefault = 10 //默认每页显示数量
View Source
const Version = "2.8.0"

Variables

View Source
var (
	RequestParamErr   = errors.New("invalid request param")
	ServerErr         = errors.New("server error")
	RequestErrExt     = errors.New("上传包格式错误")
	UsernameHasExists = errors.New("该用户名已存在")
	TokenExpired      = errors.New("token is expired or error")
	UserNotExisted    = errors.New("user not existed")
	AdminPasswordErr  = errors.New("password error")
	AdminDisabledErr  = errors.New("admin account disabled")
)
View Source
var (
	DBNullErr   = errors.New("缺少数据库实例")
	InitDataErr = errors.New("初始化数据失败")
)

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