上传竞技场api代码
This commit is contained in:
parent
04b0c315ab
commit
b4882bfca7
29
modules/arena/api.go
Normal file
29
modules/arena/api.go
Normal file
@ -0,0 +1,29 @@
|
||||
package arena
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
/*
|
||||
API
|
||||
*/
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
service base.IRPCXService
|
||||
module *Arena
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.MCompGate.Init(service, module, comp, options)
|
||||
this.module = module.(*Arena)
|
||||
this.service = service.(base.IRPCXService)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Start() (err error) {
|
||||
err = this.MCompGate.Start()
|
||||
return
|
||||
}
|
20
modules/arena/api_challenge.go
Normal file
20
modules/arena/api_challenge.go
Normal file
@ -0,0 +1,20 @@
|
||||
package arena
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.ArenaChallengeReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///挑战
|
||||
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
return
|
||||
}
|
20
modules/arena/api_info.go
Normal file
20
modules/arena/api_info.go
Normal file
@ -0,0 +1,20 @@
|
||||
package arena
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.ArenaInfoReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///匹配
|
||||
func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
return
|
||||
}
|
20
modules/arena/api_matche.go
Normal file
20
modules/arena/api_matche.go
Normal file
@ -0,0 +1,20 @@
|
||||
package arena
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) MatcheCheck(session comm.IUserSession, req *pb.ArenaMatcheReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///匹配
|
||||
func (this *apiComp) Matche(session comm.IUserSession, req *pb.ArenaMatcheReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
return
|
||||
}
|
Loading…
Reference in New Issue
Block a user