Documentation ¶
Index ¶
- Constants
- func GetBool(key string) bool
- func GetFloat(key string) float64
- func GetInt(key string) int
- func GetString(key string) string
- func GetStringSlice(key string) []string
- type Component
- type Conf
- type ConfWithToml
- func (conf *ConfWithToml) Decode() error
- func (conf *ConfWithToml) GetBaseConf() map[string]interface{}
- func (conf *ConfWithToml) Path() string
- func (conf *ConfWithToml) Pattern() string
- func (conf *ConfWithToml) PrimitiveDecodeComponent(cpts ...Component) error
- func (conf *ConfWithToml) PrimitiveDecodeServer(svrs ...Server) error
- func (conf *ConfWithToml) SetConfig(cfg string)
- type ConfigMate
- type Option
- type Server
- type SetConfig
- type ToyBox
Constants ¶
View Source
const ( Toml = "toml" Yaml = "yaml" Json = "json" )
View Source
const Version = "v1.2.2"
Variables ¶
This section is empty.
Functions ¶
func GetStringSlice ¶
Types ¶
type ConfWithToml ¶
func (*ConfWithToml) Decode ¶
func (conf *ConfWithToml) Decode() error
func (*ConfWithToml) GetBaseConf ¶
func (conf *ConfWithToml) GetBaseConf() map[string]interface{}
func (*ConfWithToml) Path ¶
func (conf *ConfWithToml) Path() string
func (*ConfWithToml) Pattern ¶
func (conf *ConfWithToml) Pattern() string
func (*ConfWithToml) PrimitiveDecodeComponent ¶
func (conf *ConfWithToml) PrimitiveDecodeComponent(cpts ...Component) error
func (*ConfWithToml) PrimitiveDecodeServer ¶
func (conf *ConfWithToml) PrimitiveDecodeServer(svrs ...Server) error
func (*ConfWithToml) SetConfig ¶
func (conf *ConfWithToml) SetConfig(cfg string)
type ConfigMate ¶
type ConfigMate interface { PrimitiveDecodeComponent(cpts ...Component) error PrimitiveDecodeServer(svrs ...Server) error }
func GetConfMate ¶
func GetConfMate() ConfigMate
func NewConfig ¶
func NewConfig() ConfigMate
type Option ¶
type Option func(*ToyBox)
func WithConfigMate ¶
func WithConfigMate(mate ConfigMate) Option
func WithLoadConf ¶
type ToyBox ¶
type ToyBox struct {
// contains filtered or unexported fields
}
func (*ToyBox) AppendComponent ¶
func (*ToyBox) AppendServer ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.