Documentation
¶
Index ¶
Constants ¶
View Source
const ( Toml = "toml" Yaml = "yaml" Json = "json" )
View Source
const (
DefaultDir = "config"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigMate ¶
type ConfigMate interface {
PrimitiveDecode(vals ...ConfigureMatcher) error
}
func NewConfig ¶
func NewConfig(opts ...Option) ConfigMate
func NewDefaultConfig ¶
func NewDefaultConfig() ConfigMate
type ConfigWithToml ¶
type ConfigWithToml struct {
// contains filtered or unexported fields
}
func (*ConfigWithToml) Decode ¶
func (ct *ConfigWithToml) Decode(dir string) error
func (*ConfigWithToml) PrimitiveDecode ¶
func (ct *ConfigWithToml) PrimitiveDecode(vals ...ConfigureMatcher) error
type Configuration ¶
type ConfigureMatcher ¶
type ConfigureMatcher interface {
Name() string
}
type Option ¶ added in v1.5.4
type Option func(opt *option)
func WithConfigDir ¶ added in v1.5.4
func WithConfiguration ¶ added in v1.5.4
func WithConfiguration(cfg Configuration) Option
Click to show internal directories.
Click to hide internal directories.