config

package
v0.0.0-...-6edf9ef Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidEnvPrefix = errors.New("invalid env prefix")
)

Functions

func IsDevelopment

func IsDevelopment() bool

Types

type AppConfig

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

func NewAppConfig

func NewAppConfig(envPrefix string, defaults []DefaultValue) *AppConfig

func (*AppConfig) GetConfigValues

func (r *AppConfig) GetConfigValues(s interface{}) error

func (*AppConfig) InitializeAppConfig

func (r *AppConfig) InitializeAppConfig() error

type DefaultValue

type DefaultValue struct {
	Name  string
	Flag  string
	Value interface{}
}

func ExtractConfigValues

func ExtractConfigValues(config interface{}) ([]DefaultValue, error)

Jump to

Keyboard shortcuts

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