You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

56 lines
1.0 KiB

/*
管理系统
*/
package agents
import (
"yunyan/comm"
"yunyan/modules"
"yunyan/lego/base"
"yunyan/lego/core"
)
// @title user模塊 API
// @version 1.0
// @description 处理用戶數據相關接口
func NewModule() core.IModule {
m := new(Agents)
return m
}
type Agents struct {
modules.ModuleBase
service base.IRPCXService //rpcx服务接口 主要client->server
options *Options
}
func (this *Agents) GetType() core.M_Modules {
return comm.ModuleAgents
}
func (this *Agents) NewOptions() (options core.IModuleOptions) {
return new(Options)
}
func (this *Agents) 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 *Agents) Start() (err error) {
if err = this.ModuleBase.Start(); err != nil {
return
}
return
}
func (this *Agents) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.RegisterComp(new(apiComp))
}