constants

package
v0.0.0-...-1bf96ee Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Check_host_resource_shell = "" /* 513-byte string literal not displayed */

	Get_host_port_shell = "" /* 229-byte string literal not displayed */

	Get_host_disk_shell = "" /* 246-byte string literal not displayed */

	DownLoad_slave_shell = "wget http://$zihao_ip/download/deploySlave.sh && sh deploySlave.sh $zihao_ip $zihao_hostId"
)
View Source
const (
	Checking     = iota + 1 // 审核中
	Check_Ok                // 通过
	Check_Fail              // 未通过
	Check_Unpaid            // 未付费
	Check_Finish            // 帖子完成状态
	Check_Down              // 帖子下架
)

帖子的状态

View Source
const (
	Shop_Checking = iota + 1 // 审核中
	Shop_Ok                  // 通过
	Shop_Fail                // 未通过
	Shop_
)

店铺状态

View Source
const (
	CHAT_STATUS_UNREAD = iota + 1 // 未读
	CHAT_STATUS_READ              // 已读
)

聊天消息状态

View Source
const (
	CHAT_TYPEZ_SYSTEM = iota + 1 // 系统类型
	CHAT_TYPEZ_O2O               // 聊天消息类型
)

聊天消息类型

View Source
const (
	REDIS_ADMIN_FORMAT = "admin.token.id:%s"
	REDIS_USER_FORMAT  = "user.token.id:%s"
)

resid

View Source
const (
	WS_TOPIC_LOGINED = "LOGINED" // 已登录
	WS_TOPIC_CHAT    = "CHAT"
	WS_TOPIC_INING   = "INING" // 在聊天界面,同步的消息,意思是在聊天可以直接发送消息
	WS_TOPIC_UNREAD  = "UNREAD"
)

websocket topic define

View Source
const (
	CODE_OK        = 200
	CODE_FAILUR    = 500
	CODE_FORBIDDEN = 403
	CODE_NOTFOUNT  = 404
)
View Source
const (
	DOMAIN_COMMON = "DOMAIN.COMMON" // 公共
)
View Source
const IMAGE_PREFIX = "http://pxjp230z7.bkt.clouddn.com/"

访问七牛云的图片前缀

View Source
const UID = "uid"
View Source
const UINFO = "uinfo"

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code int
const (
	CODE_USER_PHONE_FAILUR Code = iota + 1000
	CODE_USER_PHONE_DUPLICATE
	CODE_USER_PASSWORD_FAILUR
	CODE_USER_REGISTE_OK
	CODE_USER_REGISTE_FAILUR
	CODE_USER_LOGIN_OK
	CODE_USER_NOT_ENABLED
)
const (
	CODE_SYS_OK Code = iota + 2000
	CODE_SYS_FAILUR
	CODE_SYS_ERROR
	CODE_SYS_PARSE_PARAMS_ERROR
)
const (
	CODE_TOKEN_CREATE_FAILUR Code = iota + 3000
	CODE_TOKEN_EXPIRE             // token过期,如:redis没有用户的token,jwt解析token过期
	CODE_TOKEN_EMPTY              // 请求头中没有携带token,或为空串
	CODE_TOKEN_INVALID            // 无效token,比如:伪造token,算法错误,header的关键字错误等等
	CODE_TOKEN_CACHE_ERROR        // 令牌缓存错误,redis
	CODE_TOKEN_NOT_MAPCLAIMS      // 令牌不是MapClaims类型
)
const (
	CODE_PERMISSION_NIL Code = iota + 4000 // 没有权限
)

func (Code) String

func (code Code) String() string

定义系统内部消息,模拟枚举类型

Jump to

Keyboard shortcuts

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