go_dreamfactory/comm/const.go
2022-07-01 16:30:57 +08:00

89 lines
2.9 KiB
Go

package comm
import "go_dreamfactory/lego/core"
type LogHandleType string
const (
LogHandleType_Insert LogHandleType = "insert"
LogHandleType_Update LogHandleType = "update"
LogHandleType_Delete LogHandleType = "delete"
)
const (
SC_ServiceGateRouteComp core.S_Comps = "SC_GateRouteComp" //s_comps.ISC_GateRouteComp
)
const (
Service_Gateway = "gateway"
Service_Worker = "worker"
Service_DB = "dbservice"
)
//ERR
const (
MainTypeNotify = "notify" //通知
SubTypeErrorNotify = "errornotify" //错误通知
)
//模块名定义处
const (
ModuleGate core.M_Modules = "gateway" //gate模块 网关服务模块
ModuleWeb core.M_Modules = "web" //web模块
ModuleUser core.M_Modules = "user" //用户模块
ModulePack core.M_Modules = "pack" //背包模块
ModuleMail core.M_Modules = "mail" //邮件模块
ModuleFriend core.M_Modules = "friend" //好友模块
ModuleLogModel core.M_Modules = "model" //日志模块
ModuleEquipment core.M_Modules = "equipment" //装备模块
ModuleHero core.M_Modules = "hero" //英雄模块
ModuleForum core.M_Modules = "forum" //论坛模块
ModuleItems core.M_Modules = "items" //道具模块
)
//RPC服务接口定义处
const ( //Rpc
Rpc_GatewayRoute core.Rpc_Key = "Rpc_GatewayRoute" //网关路由
Rpc_GatewayAgentBind core.Rpc_Key = "Rpc_GatewayAgentBind" //代理绑定 绑定用户Id
Rpc_GatewayAgentUnBind core.Rpc_Key = "Rpc_GatewayAgentUnBind" //代理解绑 解绑用户Id
Rpc_GatewayAgentSendMsg core.Rpc_Key = "Rpc_GatewayAgentSendMsg" //代理发送消息 向用户发送消息
Rpc_GatewaySendBatchMsg core.Rpc_Key = "Rpc_GatewaySendBatchMsg" //向多个用户发送消息
Rpc_GatewaySendRadioMsg core.Rpc_Key = "Rpc_GatewaySendRadioMsg" //广播消息
Rpc_GatewayAgentClose core.Rpc_Key = "Rpc_GatewayAgentClose" //代理关闭 关闭用户连接
Rpc_NoticeUserClose core.Rpc_Key = "Rpc_NoticeUserClose" //通知用户离线
)
//事件类型定义处
const (
EventUserLogin core.Event_Key = "Event_UserLogin" //登录事件
EventCreateUser core.Event_Key = "Event_CreateUser" //创建角色事件
EventUserOffline core.Event_Key = "Event_UserOffline" //用户离线事件
)
const (
DBServiceStatus string = "DBService_status"
)
const (
Hp string = "hp" //生命
Atk string = "atk" //攻击
Def string = "def" //防御
HpPro string = "hppro" //生命附加值
AtkPro string = "atkpro" //攻击附加值
DefPro string = "defpro" //防御附加值
Speed string = "speed" //速度
)
const (
CardTypeHero int32 = 1 //英雄卡
CardTypeStar int32 = 2 //升星卡
CardTypeLevel int32 = 3 //升级卡
CardTypeSkill int32 = 4 //技能升级卡
CardTypeMonster int32 = 5 //怪物卡
)
const (
ResGold = "gold" //金币
ResExp = "exp" //经验
)