上传comm定义文件优化
This commit is contained in:
parent
0a9e855257
commit
4372d4d283
12
comm/core.go
12
comm/core.go
@ -14,6 +14,7 @@ const (
|
|||||||
SC_ServiceGateRouteComp core.S_Comps = "SC_GateRouteComp" //s_comps.ISC_GateRouteComp
|
SC_ServiceGateRouteComp core.S_Comps = "SC_GateRouteComp" //s_comps.ISC_GateRouteComp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//模块名定义处
|
||||||
const (
|
const (
|
||||||
SM_GateModule core.M_Modules = "gateway" //gate模块 网关服务模块
|
SM_GateModule core.M_Modules = "gateway" //gate模块 网关服务模块
|
||||||
SM_WebModule core.M_Modules = "web" //web模块
|
SM_WebModule core.M_Modules = "web" //web模块
|
||||||
@ -23,6 +24,7 @@ const (
|
|||||||
SM_FriendModule core.M_Modules = "friend" //好友模块
|
SM_FriendModule core.M_Modules = "friend" //好友模块
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//RPC服务接口定义处
|
||||||
const ( //Rpc
|
const ( //Rpc
|
||||||
Rpc_GatewayRoute core.Rpc_Key = "Rpc_GatewayRoute" //网关路由
|
Rpc_GatewayRoute core.Rpc_Key = "Rpc_GatewayRoute" //网关路由
|
||||||
Rpc_GatewayAgentBuild core.Rpc_Key = "Rpc_GatewayAgentBuild" //代理绑定 绑定用户Id
|
Rpc_GatewayAgentBuild core.Rpc_Key = "Rpc_GatewayAgentBuild" //代理绑定 绑定用户Id
|
||||||
@ -33,25 +35,19 @@ const ( //Rpc
|
|||||||
Rpc_GatewayAgentClose core.Rpc_Key = "Rpc_GatewayAgentClose" //代理关闭 关闭用户连接
|
Rpc_GatewayAgentClose core.Rpc_Key = "Rpc_GatewayAgentClose" //代理关闭 关闭用户连接
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//事件类型定义处
|
||||||
const (
|
const (
|
||||||
Event_UserLogin core.Event_Key = "Event_UserLogin" //登录事件
|
Event_UserLogin core.Event_Key = "Event_UserLogin" //登录事件
|
||||||
Event_CreateUser core.Event_Key = "Event_CreateUser" //创建角色事件
|
Event_CreateUser core.Event_Key = "Event_CreateUser" //创建角色事件
|
||||||
Event_UserOffline core.Event_Key = "Event_UserOffline" //用户离线事件
|
Event_UserOffline core.Event_Key = "Event_UserOffline" //用户离线事件
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 服务网关组件接口定义
|
||||||
type ISC_GateRouteComp interface {
|
type ISC_GateRouteComp interface {
|
||||||
core.IServiceComp
|
core.IServiceComp
|
||||||
RegisterRoute(methodName string, comp reflect.Value, msg reflect.Type, fn reflect.Method)
|
RegisterRoute(methodName string, comp reflect.Value, msg reflect.Type, fn reflect.Method)
|
||||||
}
|
}
|
||||||
|
|
||||||
type Imail interface {
|
|
||||||
CreateNewMail(uId string)
|
|
||||||
}
|
|
||||||
|
|
||||||
type IPack interface {
|
|
||||||
//GetRewaredItems(uId string, itmes map[uint32]uint32)
|
|
||||||
}
|
|
||||||
|
|
||||||
//用户会话
|
//用户会话
|
||||||
type IUserSession interface {
|
type IUserSession interface {
|
||||||
GetSessionId() string
|
GetSessionId() string
|
||||||
|
16
comm/imodule.go
Normal file
16
comm/imodule.go
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package comm
|
||||||
|
|
||||||
|
/*
|
||||||
|
业务模块 对外接口定义处
|
||||||
|
*/
|
||||||
|
|
||||||
|
type (
|
||||||
|
//邮件业务模块对外接口定义 提供给其他模块使用的
|
||||||
|
Imail interface {
|
||||||
|
CreateNewMail(uId string)
|
||||||
|
}
|
||||||
|
//背包模块对外接口定义 提供给其他模块使用的
|
||||||
|
IPack interface {
|
||||||
|
//GetRewaredItems(uId string, itmes map[uint32]uint32)
|
||||||
|
}
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user