go_dreamfactory/modules/version/module.go

48 lines
994 B
Go

package version
import (
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/core/cbase"
)
/*
模块名:web
描述:提供管理员相关的http接口
开发:李伟
*/
func NewModule() core.IModule {
m := new(Version)
return m
}
type Version struct {
cbase.ModuleBase
options *Options
service base.IRPCXService
api_comp *Api_Comp //提供weba pi服务的组件
}
// 模块名
func (this *Version) GetType() core.M_Modules {
return "version"
}
// 模块自定义参数
func (this *Version) NewOptions() (options core.IModuleOptions) {
return new(Options)
}
func (this *Version) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
this.service = service.(base.IRPCXService)
this.options = options.(*Options)
return
}
func (this *Version) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api_comp = this.RegisterComp(new(Api_Comp)).(*Api_Comp)
}