Documentation
¶
Index ¶
- func Convert(value any, t reflect.Type) (reflect.Value, Error)
- func ConvertNumeric[T2, T1 IntegerConstraint | FloatConstraint](value T1) T2
- func ConvertNumericString[T IntegerConstraint | FloatConstraint](value T) string
- func ConvertStringNumeric[T IntegerConstraint | FloatConstraint](value string) (T, Error)
- func Validate(obj any) Error
- type Config
- func (this *Config) ActiveProfiles() []string
- func (this *Config) AddConfigFS(fsys fs.FS) Error
- func (this *Config) AddDefaultConfigFS(fsys fs.FS) Error
- func (this *Config) AddOverride(key, value string) Error
- func (this *Config) CopyDefaultConfig(from, to string) Error
- func (this *Config) CopyDefaultConfigForProfile(from, to, profile string) Error
- func (this *Config) GetConfigValue(key string) (string, Error)
- func (this *Config) GetSubConfig(key string) (*Config, Error)
- func (this *Config) InitConfig() Error
- func (this *Config) LoadConfig(config map[string]any) Error
- func (this *Config) LoadConfigAt(config map[string]any, root string) Error
- func (this *Config) LoadConfigForProfile(config map[string]any, profile string) Error
- func (this *Config) LoadConfigForProfileAt(config map[string]any, profile, root string) Error
- func (this *Config) LoadDefaultConfig(config map[string]any) Error
- func (this *Config) LoadDefaultConfigAt(config map[string]any, root string) Error
- func (this *Config) Reset()
- func (this *Config) SetActiveProfiles(profiles []string) Error
- func (this *Config) Unmarshal(obj any) Error
- type InvalidTypeKeyError
- type KeyNotFoundError
- type YamlConfigFSLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertNumeric ¶
func ConvertNumeric[T2, T1 IntegerConstraint | FloatConstraint](value T1) T2
func ConvertNumericString ¶
func ConvertNumericString[T IntegerConstraint | FloatConstraint](value T) string
func ConvertStringNumeric ¶
func ConvertStringNumeric[T IntegerConstraint | FloatConstraint](value string) (T, Error)
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewConfigFor ¶
func (*Config) ActiveProfiles ¶
func (*Config) AddConfigFS ¶
func (*Config) AddDefaultConfigFS ¶
func (*Config) AddOverride ¶
func (*Config) CopyDefaultConfig ¶
func (*Config) CopyDefaultConfigForProfile ¶
func (*Config) GetConfigValue ¶
func (*Config) GetSubConfig ¶
func (*Config) InitConfig ¶
func (this *Config) InitConfig() Error
func (*Config) LoadConfig ¶
func (*Config) LoadConfigAt ¶
func (*Config) LoadConfigForProfile ¶
func (*Config) LoadConfigForProfileAt ¶
func (*Config) LoadDefaultConfig ¶
func (*Config) LoadDefaultConfigAt ¶
func (*Config) SetActiveProfiles ¶
type InvalidTypeKeyError ¶
type InvalidTypeKeyError struct {
*DefaultError
}
func NewInvalidTypeKeyError ¶
func NewInvalidTypeKeyError(key, component string) *InvalidTypeKeyError
type KeyNotFoundError ¶
type KeyNotFoundError struct {
*DefaultError
}
func NewKeyNotFoundError ¶
func NewKeyNotFoundError(key, component string) *KeyNotFoundError
type YamlConfigFSLoader ¶
type YamlConfigFSLoader struct{}
func (*YamlConfigFSLoader) ParseConfigurationFilesystem ¶
Click to show internal directories.
Click to hide internal directories.