config

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2022 License: LGPL-2.1 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigEnvPrefix string = "RADIAN"
View Source
const DefaultJsonConfigPath string = "config.json"
View Source
const DefaultTagConfigName = "config"
View Source
const DefaultTagConfigRequiredName = "required"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigAdapter added in v0.2.3

type ConfigAdapter struct {
	// contains filtered or unexported fields
}

func NewConfigAdapter added in v0.2.3

func NewConfigAdapter() *ConfigAdapter

func (*ConfigAdapter) GetAdapter added in v0.2.3

func (a *ConfigAdapter) GetAdapter(path []string) (*ConfigAdapter, error)

func (*ConfigAdapter) GetValue added in v0.2.3

func (a *ConfigAdapter) GetValue(path []string) (any, error)

func (*ConfigAdapter) LoadFromArgs added in v0.2.3

func (a *ConfigAdapter) LoadFromArgs(prefix string) error

func (*ConfigAdapter) LoadFromEnv added in v0.2.3

func (a *ConfigAdapter) LoadFromEnv(prefix string) error

func (*ConfigAdapter) LoadFromFileJson added in v0.2.3

func (a *ConfigAdapter) LoadFromFileJson(filePath string) error

func (*ConfigAdapter) LoadFromJson added in v0.2.3

func (a *ConfigAdapter) LoadFromJson(cfgStr []byte) error

func (*ConfigAdapter) SetValue added in v0.2.3

func (a *ConfigAdapter) SetValue(path []string, val any) error

func (*ConfigAdapter) Unmarshal added in v0.2.3

func (a *ConfigAdapter) Unmarshal(v interface{}) error

func (*ConfigAdapter) UnmarshalPath added in v0.2.3

func (a *ConfigAdapter) UnmarshalPath(path []string, v interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL