common

package
v0.0.0-...-a32abf6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// headers
	Authorization = "authorization" // 认证header token

	LiveAppName = "live"

	//schema
	HttpPrefix  = "http://"
	HttpsPrefix = "https://"

	// db signal
	PermissionFindChildren       = "Shard_PermissionFindChildren"
	PermissionRoleFindChildrenId = "Shard_PermissionRoleFindChildrenId"
	RolePermissionFindChildrenId = "Shard_RolePermissionFindChildrenId"

	// route  separator
	RouteSeparator = "||"

	MessageSplitSymbol = "[::]"

	//
	TimeFullFormat  = "2006-01-02 15:04:05"
	TimeCrushFormat = "20060102150405"

	// redis key
	RedisRoutesKey = "shard_routes_%v"
	AdminLoginKey  = "shard_admin_login_%v"
	UserLoginKey   = "shard_user_login_%v"

	// backlash
	Backlash = "/"

	// prefix
	BackendPrefix = "backend"
	ApiPrefix     = "api"

	// version
	V1 = "v1"

	// params
	UriId            = ":id"
	UriAuthorization = ":authorization"

	Socket = "socket"

	WechatStorageFilePath = "storage"

	// router
	UriEmpty    = ""
	UriLogin    = "login"
	Logout      = "logout"
	Routes      = "routes"
	UriAvatar   = "avatar"
	Admins      = "admins"
	Password    = "password"
	Balance     = "balance"
	Reset       = "reset"
	Adjust      = "adjust"
	Change      = "change"
	Permissions = "permissions"
	Oss         = "oss"
	Token       = "token"
	Upload      = "upload"
	Users       = "users"
	User        = "user"
	Roles       = "roles"
	Check       = "check"
	File        = "file"
	Host        = "host"
	Live        = "live"
	Meeting     = "meeting"
	Barrage     = "barrage"
	Log         = "log"
	Task        = "task"
	Stop        = "stop"
	Start       = "start"
	Run         = "run"
	Room        = "room"
	Watch       = "watch"
	Empty       = "empty"
	Wechat      = "wechat"
	Qrcode      = "qrcode"
	Push        = "push"
	Join        = "join"
	Offset      = "offset"
	Status      = "status"
	Avatar      = "avatar"
	Rules       = "rules"
	Bots        = "bots"
	Timer       = "timer"
	Reply       = "reply"
	Functions   = "functions"
)
View Source
const (
	Ok = "ok"
)

Variables

View Source
var (
	AuthFailed       = "AuthFailed"
	TaskIsRunning    = "TaskIsRunning"
	TaskIsNotRunning = "TaskIsNotRunning"
	UsernameExisted  = "UsernameExisted"
	NameIsExisted    = "NameIsExisted"
	ActPWdError      = "ActPWdError"
	NotOwner         = "NotOwner"
	ParamsError      = "ParamsError"
	DBError          = "DBError"
	NotFound         = "NotFound"
	SetPasswordError = "SetPasswordError"
	CopierError      = "CopierError"
	LoginFailed      = "LoginFailed"
	UploadFileFailed = "UploadFileFailed"
	SystemError      = "SystemError"
	RoomExisted      = "RoomExisted"
	RoomJoinFailed   = "RoomJoinFailed"
	PushFailed       = "PushFailed"
	NotChange        = "NotChange"
	TaskAddFailed    = "TaskAddFailed"
	TaskStopFailed   = "TaskStopFailed"
	AmountLtZero     = "AmountLtZero"
	BalanceLess      = "BalanceLess"
	NoPermission     = "NoPermission"
	TaskRunFailed    = "TaskRunFailed"
	Living           = "Living"
)
View Source
var (
	IdErr                                       = errors.New("IdErr")
	TaskRunErr                                  = errors.New("TaskRunErr")
	RequestErr                                  = errors.New("RequestErr")
	NoPermissionErr                             = errors.New("NoPermission")
	ExpiryTimeShouldNotBeLessThanOneDayErr      = errors.New("ExpiryTimeShouldNotBeLessThanOneDay")      // 过期时间不得小于1天
	ExpiryTimeShouldNotBeLessThanCurrentTimeErr = errors.New("ExpiryTimeShouldNotBeLessThanCurrentTime") // 过期时间不得小于当前时间

)

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