package user import ( "go_dreamfactory/comm" "go_dreamfactory/modules" "go_dreamfactory/lego/base" "go_dreamfactory/lego/core" ) const ( User_SubType_Login = "login" User_SubType_Logout = "logout" User_SubType_Create = "create" ) type Api_Comp struct { modules.MComp_GateComp service base.IRPCXService module *User hero comm.IHero } func (this *Api_Comp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { this.MComp_GateComp.Init(service, module, comp, options) this.service = service.(base.IRPCXService) this.module = module.(*User) return } func (this *Api_Comp) Start() (err error) { err = this.MComp_GateComp.Start() var module core.IModule //get module hero if module, err = this.service.GetModule(comm.SM_HeroModule); err != nil { return } this.hero = module.(comm.IHero) return }