configo

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: MIT Imports: 9 Imported by: 0

README

configo

Configuration helper for golang

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigVariables = map[string]string{}

Functions

func CleanEnvCache added in v1.0.3

func CleanEnvCache()

func EnvBool

func EnvBool(key string, defaultValue bool) bool

func EnvInt

func EnvInt(key string, defaultValue int) int

func EnvString

func EnvString(key, defaultValue string) string

func LoadConfigs

func LoadConfigs(sources ...Source)

func ToStruct added in v1.0.3

func ToStruct(dest interface{}) error

Types

type Consul

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

func NewConsulSource

func NewConsulSource(co ConsulOptions) *Consul

func (*Consul) GetVariables

func (c *Consul) GetVariables() (map[string]string, error)

type ConsulOptions

type ConsulOptions struct {
	DefaultPath string
	Path        string
	Prefix      string
	Host        string
	Token       string
}

type Source

type Source interface {
	GetVariables() (map[string]string, error)
}

Jump to

Keyboard shortcuts

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