/* 管理系统 */ package user import ( "yunyan/comm" "yunyan/modules" "yunyan/lego/base" "yunyan/lego/core" ) // @title user模塊 API // @version 1.0 // @description 处理用戶數據相關接口 func NewModule() core.IModule { m := new(User) return m } type User struct { modules.ModuleBase service base.IRPCXService //rpcx服务接口 主要client->server api *apiComp apiv2 *apiV2Comp apiv3 *apiV3Comp model *modelUserComp configmodel *modelConfigComp cache *modelCacheComp options *Options analyze comm.IAnalyze echomeet comm.IEchomeet // 会议记录能力(同进程 echomeet 模块提供,v3 配置下发用;可能为 nil) } func (this *User) GetType() core.M_Modules { return comm.ModuleUser } func (this *User) NewOptions() (options core.IModuleOptions) { return new(Options) } func (this *User) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { this.service = service.(base.IRPCXService) this.options = options.(*Options) if err = this.ModuleBase.Init(service, module, options); err != nil { return } return } func (this *User) Start() (err error) { if err = this.ModuleBase.Start(); err != nil { return } return } func (this *User) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.apiv2 = this.RegisterComp(new(apiV2Comp)).(*apiV2Comp) this.apiv3 = this.RegisterComp(new(apiV3Comp)).(*apiV3Comp) this.model = this.RegisterComp(new(modelUserComp)).(*modelUserComp) this.cache = this.RegisterComp(new(modelCacheComp)).(*modelCacheComp) this.configmodel = this.RegisterComp(new(modelConfigComp)).(*modelConfigComp) }