package bailian import ( "yunyan/comm" "yunyan/modules" "yunyan/lego/core" ) func NewModule() core.IModule { return new(Bailian) } type Bailian struct { modules.ModuleBase api *apiComp options *Options } func (this *Bailian) GetType() core.M_Modules { return comm.ModuleBailian } func (this *Bailian) NewOptions() (options core.IModuleOptions) { return new(Options) } func (this *Bailian) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { this.options = options.(*Options) if err = this.ModuleBase.Init(service, module, options); err != nil { return } return } func (this *Bailian) Start() (err error) { return this.ModuleBase.Start() } func (this *Bailian) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) }