23 lines
645 B
Go
23 lines
645 B
Go
package modules
|
|
|
|
import (
|
|
"go_dreamfactory/lego/core"
|
|
"go_dreamfactory/pb"
|
|
cfg "go_dreamfactory/sys/configure/structs"
|
|
|
|
"github.com/golang/protobuf/proto"
|
|
)
|
|
|
|
type (
|
|
//业务模块基类接口 定义所有业务模块都可以使用的接口
|
|
IModule interface {
|
|
core.IModule
|
|
//向指定用户发送消息
|
|
SendMsgToUser(mainType, subType string, msg proto.Message, user *pb.Cache_UserData) (err error)
|
|
//向多个用户发送消息
|
|
SendMsgToUsers(mainType, subType string, msg proto.Message, user ...*pb.Cache_UserData) (err error)
|
|
//校验消耗资源
|
|
CheckConsumeRes(uid string, res []*cfg.Game_atn) (code pb.ErrorCode)
|
|
}
|
|
)
|