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.
35 lines
753 B
35 lines
753 B
package user
|
|
|
|
import (
|
|
"yunyan/comm"
|
|
"yunyan/modules"
|
|
|
|
"yunyan/lego/base"
|
|
"yunyan/lego/core"
|
|
)
|
|
|
|
type apiComp struct {
|
|
modules.MCompHttpGate
|
|
service base.IRPCXService
|
|
module *User
|
|
options *Options
|
|
}
|
|
|
|
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
|
this.MCompHttpGate.Init(service, module, comp, options)
|
|
this.service = service.(base.IRPCXService)
|
|
this.module = module.(*User)
|
|
this.options = options.(*Options)
|
|
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) Start() (err error) {
|
|
if err = this.MCompHttpGate.Start(); err != nil {
|
|
return
|
|
}
|
|
if m, e := this.service.GetModule(comm.ModuleAnalyze); e == nil {
|
|
this.module.analyze, _ = m.(comm.IAnalyze)
|
|
}
|
|
return
|
|
}
|
|
|