Documentation ¶
Index ¶
- func AppendProvider(f func() providerInterface.ServiceProvider)
- func GetAllProvider() []func() providerInterface.ServiceProvider
- type Register
- type ServiceProvider
- func (this *ServiceProvider) AddCommand(cmd *command.Command)
- func (this *ServiceProvider) AddCommands(cmds []any)
- func (this *ServiceProvider) AddGroup(conf map[string]string, fn func(*router.RouterGroup))
- func (this *ServiceProvider) AddRoute(fn func(*router.Engine))
- func (this *ServiceProvider) AddViewFunc(name string, fn any)
- func (this *ServiceProvider) Boot()
- func (this *ServiceProvider) CallBootedCallback()
- func (this *ServiceProvider) CallBootingCallback()
- func (this *ServiceProvider) GetApp() iapp.App
- func (this *ServiceProvider) GetRoute() *router.Engine
- func (this *ServiceProvider) LoadViewsFrom(path string, namespace string)
- func (this *ServiceProvider) MergeConfigFrom(path string, key string)
- func (this *ServiceProvider) Publishes(obj any, paths map[string]string, group string)
- func (this *ServiceProvider) Register()
- func (this *ServiceProvider) WithApp(app any)
- func (this *ServiceProvider) WithBooted(f func())
- func (this *ServiceProvider) WithBooting(f func())
- func (this *ServiceProvider) WithRoute(route *router.Engine)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Register ¶
type Register struct {
// contains filtered or unexported fields
}
*
- 注册器 *
- @create 2021-9-8
- @author deatil
func (*Register) Append ¶
func (this *Register) Append(f func() providerInterface.ServiceProvider)
注册
func (*Register) GetAll ¶
func (this *Register) GetAll() []func() providerInterface.ServiceProvider
*
- 获取全部
type ServiceProvider ¶
type ServiceProvider struct { // 启动 app App iapp.App // 路由 Route *router.Engine // 启动前 BootingCallback func() // 启动后 BootedCallback func() }
*
- 服务提供者 *
- @create 2021-7-11
- @author deatil
func (*ServiceProvider) AddCommand ¶
func (this *ServiceProvider) AddCommand(cmd *command.Command)
添加脚本
func (*ServiceProvider) AddGroup ¶
func (this *ServiceProvider) AddGroup(conf map[string]string, fn func(*router.RouterGroup))
添加路由分组
func (*ServiceProvider) AddRoute ¶
func (this *ServiceProvider) AddRoute(fn func(*router.Engine))
添加路由
func (*ServiceProvider) AddViewFunc ¶
func (this *ServiceProvider) AddViewFunc(name string, fn any)
添加视图用方法
func (*ServiceProvider) CallBootedCallback ¶
func (this *ServiceProvider) CallBootedCallback()
启动后回调
func (*ServiceProvider) CallBootingCallback ¶
func (this *ServiceProvider) CallBootingCallback()
启动前回调
func (*ServiceProvider) LoadViewsFrom ¶
func (this *ServiceProvider) LoadViewsFrom(path string, namespace string)
注册视图
func (*ServiceProvider) MergeConfigFrom ¶
func (this *ServiceProvider) MergeConfigFrom(path string, key string)
配置信息
Click to show internal directories.
Click to hide internal directories.