config

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(files ...string)

Types

type Cipher added in v1.2.2

type Cipher interface {
	Decrypt(string) (string, error)
}

type Config added in v1.1.0

type Config interface {
	Get(key string) (interface{}, bool)
	GetOr(key string, defaultValue interface{}) interface{}
}

type ConfigurationEnvironment added in v1.1.0

type ConfigurationEnvironment struct{}

func (*ConfigurationEnvironment) Get added in v1.1.0

func (p *ConfigurationEnvironment) Get(key string) (interface{}, bool)

func (*ConfigurationEnvironment) GetBool added in v1.1.0

func (p *ConfigurationEnvironment) GetBool(key string) (bool, bool)

func (*ConfigurationEnvironment) GetBoolOr added in v1.1.0

func (p *ConfigurationEnvironment) GetBoolOr(key string, defaultValue bool) bool

func (*ConfigurationEnvironment) GetInt added in v1.1.0

func (p *ConfigurationEnvironment) GetInt(key string) (int, bool)

func (*ConfigurationEnvironment) GetIntOr added in v1.1.0

func (p *ConfigurationEnvironment) GetIntOr(key string, defaultValue int) int

func (*ConfigurationEnvironment) GetOr added in v1.1.0

func (p *ConfigurationEnvironment) GetOr(key string, defaultValue interface{}) interface{}

func (*ConfigurationEnvironment) GetString added in v1.1.0

func (p *ConfigurationEnvironment) GetString(key string) (string, bool)

func (*ConfigurationEnvironment) GetStringOr added in v1.1.0

func (p *ConfigurationEnvironment) GetStringOr(key string, defaultValue string) string

type DecryptEnvironment added in v1.2.2

type DecryptEnvironment struct {
	Cipher Cipher
}

func (*DecryptEnvironment) Get added in v1.2.2

func (p *DecryptEnvironment) Get(key string) (interface{}, bool)

func (*DecryptEnvironment) GetBool added in v1.2.2

func (p *DecryptEnvironment) GetBool(key string) (bool, bool)

func (*DecryptEnvironment) GetBoolOr added in v1.2.2

func (p *DecryptEnvironment) GetBoolOr(key string, defaultValue bool) bool

func (*DecryptEnvironment) GetInt added in v1.2.2

func (p *DecryptEnvironment) GetInt(key string) (int, bool)

func (*DecryptEnvironment) GetIntOr added in v1.2.2

func (p *DecryptEnvironment) GetIntOr(key string, defaultValue int) int

func (*DecryptEnvironment) GetOr added in v1.2.2

func (p *DecryptEnvironment) GetOr(key string, defaultValue interface{}) interface{}

func (*DecryptEnvironment) GetString added in v1.2.2

func (p *DecryptEnvironment) GetString(key string) (string, bool)

func (*DecryptEnvironment) GetStringOr added in v1.2.2

func (p *DecryptEnvironment) GetStringOr(key string, defaultValue string) string

type TypedConfig added in v1.1.0

type TypedConfig interface {
	Config
	GetInt(key string) (int, bool)
	GetBool(key string) (bool, bool)
	GetString(key string) (string, bool)
	GetIntOr(key string, defaultValue int) int
	GetBoolOr(key string, defaultValue bool) bool
	GetStringOr(key string, defaultValue string) string
}

Jump to

Keyboard shortcuts

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