config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(files ...string)

Types

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 Decipherer added in v1.1.0

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

type EnciphermentEnvironment added in v1.1.0

type EnciphermentEnvironment struct {
	Cipher Decipherer
}

func (*EnciphermentEnvironment) Get added in v1.1.0

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

func (*EnciphermentEnvironment) GetBool added in v1.1.0

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

func (*EnciphermentEnvironment) GetBoolOr added in v1.1.0

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

func (*EnciphermentEnvironment) GetInt added in v1.1.0

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

func (*EnciphermentEnvironment) GetIntOr added in v1.1.0

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

func (*EnciphermentEnvironment) GetOr added in v1.1.0

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

func (*EnciphermentEnvironment) GetString added in v1.1.0

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

func (*EnciphermentEnvironment) GetStringOr added in v1.1.0

func (p *EnciphermentEnvironment) 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