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.
43 lines
837 B
43 lines
837 B
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)
|
|
}
|
|
|