Documentation ¶
Index ¶
- type Engine
- func (e *Engine) GetBeanByName(name string) (framework.Bean, bool)
- func (e *Engine) GetCommand(ctx context.Context) *cobra.Command
- func (e *Engine) GetConfigByName(name string) (framework.Config, bool)
- func (e *Engine) Run(ctx context.Context) error
- func (e *Engine) RunCommand(ctx context.Context) error
- func (e *Engine) UseBean(name string, conf framework.Config, bean framework.Bean) error
- func (e *Engine) UseBeanWithConfig(name string, confBean framework.Bean) error
- func (e *Engine) UseConfig(name string, conf framework.Config) error
- func (e *Engine) UseConfigs(confs map[string]framework.Config) error
- func (e *Engine) UseRouterGroups(grprouters router.GroupsRouters)
- func (e *Engine) UseRouters(routers router.Routers)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the framework's instance, it contains the configs, beans and app infos. Create an instance of Engine, by using New()/Default()
func Default ¶
Default returns an Engine instance with a gin bean, the gin server has logger and metrics already attached.
func (*Engine) GetConfigByName ¶
func (*Engine) RunCommand ¶
Run starts the Uitron framework. Note: if there is no bean in beans, Run will not block the calling goroutine.
func (*Engine) UseBeanWithConfig ¶
func (*Engine) UseRouterGroups ¶
func (e *Engine) UseRouterGroups(grprouters router.GroupsRouters)
UseRouterGroups is a shortcut for setting default gin routers
func (*Engine) UseRouters ¶
UseRouters is a shortcut for setting default gin routers
Click to show internal directories.
Click to hide internal directories.