Documentation ¶
Index ¶
- Variables
- func Defer()
- func GlobalConfig() *globalConfig
- func Init(conf Config, dao Dao, configCenter ...conf_center.ConfigCenter)
- func ParseTagSetting(str string, sep string, settings any)
- func RegisterDeferFunc(deferf ...func())
- func Start(conf Config, dao Dao, configCenter ...conf_center.ConfigCenter) func()
- type AfterInject
- type AfterInjectConfig
- type AfterInjectConfigWithRoot
- type AfterInjectWithRoot
- type BeforeInject
- type BeforeInjectWithRoot
- type BuiltinConfig
- type Config
- type Dao
- type EmbeddedPresets
- type Encoder
- type FlagTagSettings
- type InitTagSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var EmbeddedPresetsType = reflect.TypeOf((*EmbeddedPresets)(nil)).Elem()
Functions ¶
func GlobalConfig ¶
func GlobalConfig() *globalConfig
func Init ¶ added in v0.0.35
func Init(conf Config, dao Dao, configCenter ...conf_center.ConfigCenter)
func init(){ initialize.Init(conf, dao) }
func ParseTagSetting ¶
ParseTagSetting default sep ;
func RegisterDeferFunc ¶
func RegisterDeferFunc(deferf ...func())
func Start ¶
func Start(conf Config, dao Dao, configCenter ...conf_center.ConfigCenter) func()
func main(){ defer initialize.Start(conf, dao)() }
Types ¶
type AfterInject ¶ added in v0.0.33
type AfterInject interface {
AfterInject()
}
type AfterInjectConfig ¶ added in v0.0.33
type AfterInjectConfig interface {
AfterInjectConfig()
}
type AfterInjectConfigWithRoot ¶ added in v0.0.33
type AfterInjectConfigWithRoot interface {
AfterInjectConfigWithRoot(*rootconf.RootConfig)
}
type AfterInjectWithRoot ¶ added in v0.0.33
type AfterInjectWithRoot interface {
AfterInjectWithRoot(*rootconf.RootConfig)
}
type BeforeInject ¶ added in v0.0.33
type BeforeInject interface {
BeforeInject()
}
type BeforeInjectWithRoot ¶ added in v0.0.33
type BeforeInjectWithRoot interface {
BeforeInjectWithRoot(*rootconf.RootConfig)
}
type BuiltinConfig ¶
type Config ¶
type Config interface { // 注入之前设置默认值 BeforeInject // 注入之后初始化 AfterInject }
type Dao ¶
type Dao interface { BeforeInject // 注入config后执行 AfterInjectConfig // 注入dao后执行 AfterInject }
type EmbeddedPresets ¶
type EmbeddedPresets struct { }
func (EmbeddedPresets) AfterInject ¶ added in v0.0.33
func (u EmbeddedPresets) AfterInject()
func (EmbeddedPresets) AfterInjectConfig ¶ added in v0.0.33
func (u EmbeddedPresets) AfterInjectConfig()
func (EmbeddedPresets) BeforeInject ¶ added in v0.0.33
func (u EmbeddedPresets) BeforeInject()
type FlagTagSettings ¶
type InitTagSettings ¶
type InitTagSettings struct { ConfigName string `meta:"config"` DefaultValue string `meta:"default"` }
func ParseInitTagSettings ¶
func ParseInitTagSettings(str string) *InitTagSettings
Source Files ¶
Click to show internal directories.
Click to hide internal directories.