Documentation ¶
Overview ¶
gen for home toolset
Index ¶
- func AfterProvider(bean interface{}, alias string)
- func GetAllProvider() []interface{}
- func GetBean(alias string) interface{}
- func SetConfigDir(fs *embed.FS)
- type Bean
- type ConfigProvider
- type DatabaseProvider
- type FrameworkProvider
- type GroupConfig
- type LogProvider
- type MysqlProvider
- type RedisProvider
- type RouteProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AfterProvider ¶
func AfterProvider(bean interface{}, alias string)
func GetAllProvider ¶
func GetAllProvider() []interface{}
func SetConfigDir ¶
Types ¶
type ConfigProvider ¶
type ConfigProvider struct {
// contains filtered or unexported fields
}
ConfigProvider @Bean("config")
func NewConfigProvider ¶
func NewConfigProvider() *ConfigProvider
func (*ConfigProvider) Boot ¶
func (c *ConfigProvider) Boot()
func (*ConfigProvider) GetBean ¶
func (c *ConfigProvider) GetBean(alias string) interface{}
GetBean 约定大于一切, 自己接收的代码和配置结构要人工约束成一致 , 后面的字符作为默认值
func (*ConfigProvider) Init ¶
func (c *ConfigProvider) Init()
type DatabaseProvider ¶
DatabaseProvider @Bean("database")
func NewDatabaseProvider ¶
func NewDatabaseProvider() *DatabaseProvider
func (*DatabaseProvider) GetBean ¶
func (m *DatabaseProvider) GetBean(alias string) interface{}
func (*DatabaseProvider) Init ¶
func (m *DatabaseProvider) Init()
type FrameworkProvider ¶
type FrameworkProvider struct {
// contains filtered or unexported fields
}
FrameworkProvider @Bean
func NewFrameworkProvider ¶
func NewFrameworkProvider() *FrameworkProvider
type GroupConfig ¶
type GroupConfig struct {
// contains filtered or unexported fields
}
func (*GroupConfig) GetMiddleware ¶
func (g *GroupConfig) GetMiddleware() []string
func (*GroupConfig) GetPrefix ¶
func (g *GroupConfig) GetPrefix() string
func (*GroupConfig) Middleware ¶
func (g *GroupConfig) Middleware(m ...string) *GroupConfig
func (*GroupConfig) Prefix ¶
func (g *GroupConfig) Prefix(prefix string) *GroupConfig
type LogProvider ¶
LogProvider @Bean
func NewLogProvider ¶
func NewLogProvider() *LogProvider
func (*LogProvider) Init ¶
func (l *LogProvider) Init()
type MysqlProvider ¶
type MysqlProvider struct {
// contains filtered or unexported fields
}
MysqlProvider @Bean("mysql")
func NewMysqlProvider ¶
func NewMysqlProvider() *MysqlProvider
func (*MysqlProvider) GetBean ¶
func (m *MysqlProvider) GetBean(alias string) interface{}
func (*MysqlProvider) Init ¶
func (m *MysqlProvider) Init()
type RedisProvider ¶
type RedisProvider struct { *services.Config `inject:"config, database"` // contains filtered or unexported fields }
RedisProvider @Bean("redis")
func NewRedisProvider ¶
func NewRedisProvider() *RedisProvider
func (*RedisProvider) GetBean ¶
func (m *RedisProvider) GetBean(alias string) interface{}
func (*RedisProvider) Init ¶
func (m *RedisProvider) Init()
type RouteProvider ¶
type RouteProvider struct { Route map[string]map[*api.Config]func(c *gin.Context) RouteGroupConfig map[string]*GroupConfig }
RouteProvider 路由提供者 @Bean
func NewRouteProvider ¶
func NewRouteProvider() *RouteProvider
func (*RouteProvider) Group ¶
func (a *RouteProvider) Group(group string) *GroupConfig
func (*RouteProvider) Init ¶
func (a *RouteProvider) Init()
func (*RouteProvider) LoadRoute ¶
func (a *RouteProvider) LoadRoute(routes []interface{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.