config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 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 TagConfigName = "config"
View Source
const TagConfigRequiredName = "required"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigAdapter added in v0.2.3

type ConfigAdapter struct {
	*adapter.BaseAdapter
	// contains filtered or unexported fields
}

func NewConfigAdapter added in v0.2.3

func NewConfigAdapter(name string) *ConfigAdapter

func (*ConfigAdapter) Close added in v0.2.5

func (a *ConfigAdapter) Close() error

func (*ConfigAdapter) GetAdapter added in v0.2.3

func (a *ConfigAdapter) GetAdapter(path ...string) (*ConfigAdapter, error)

func (*ConfigAdapter) GetAdapterOrNil added in v0.3.0

func (a *ConfigAdapter) GetAdapterOrNil(path ...string) *ConfigAdapter

func (*ConfigAdapter) GetString added in v0.2.5

func (a *ConfigAdapter) GetString(path ...string) (string, error)

func (*ConfigAdapter) GetStringOrDefault added in v0.2.5

func (a *ConfigAdapter) GetStringOrDefault(defaultValue string, path ...string) string

func (*ConfigAdapter) GetValue added in v0.2.3

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

func (*ConfigAdapter) GetValueOrDefault added in v0.2.5

func (a *ConfigAdapter) GetValueOrDefault(defaultValue any, path ...string) any

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(val any, path ...string) error

func (*ConfigAdapter) Setup added in v0.2.5

func (a *ConfigAdapter) Setup() (err error)

func (*ConfigAdapter) Unmarshal added in v0.2.3

func (a *ConfigAdapter) Unmarshal(destination interface{}, skipRequired bool) error

func (*ConfigAdapter) UnmarshalPath added in v0.2.3

func (a *ConfigAdapter) UnmarshalPath(destination interface{}, skipRequired bool, path ...string) error

Jump to

Keyboard shortcuts

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