configuration

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigurationFromEnv

func LoadConfigurationFromEnv(env EnvConfiguration) (*viper.Viper, error)

func LoadConfigurationFromFile

func LoadConfigurationFromFile(c FileConfiguration) *viper.Viper

Types

type EnvConfiguration

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

func NewConfigurationFromEnv

func NewConfigurationFromEnv(prefix string, keys []string) EnvConfiguration

type EnvFlagParams added in v0.2.2

type EnvFlagParams struct {
	Prefix string
	Keys   []string
}

func (EnvFlagParams) GetEnvFlag added in v0.2.2

func (p EnvFlagParams) GetEnvFlag() EnvFlags

type EnvFlags

type EnvFlags struct {
	Prefix string
	Keys   []string
}

func (EnvFlags) GetEnvConfiguration

func (f EnvFlags) GetEnvConfiguration() EnvConfiguration

func (EnvFlags) GetViper added in v0.2.4

func (f EnvFlags) GetViper() (*viper.Viper, error)

func (EnvFlags) HasKeys

func (f EnvFlags) HasKeys() bool

type FileConfiguration

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

func NewFileConfiguration

func NewFileConfiguration(file string, searchPaths []string) FileConfiguration

func (FileConfiguration) GetViperConfig

func (f FileConfiguration) GetViperConfig() (string, string)

type FileFlags

type FileFlags struct {
	Name        string
	SearchPaths []string
}

func (FileFlags) GetFileConfiguration

func (f FileFlags) GetFileConfiguration() FileConfiguration

func (FileFlags) GetViper added in v0.2.4

func (f FileFlags) GetViper() (*viper.Viper, error)

type Flags

type Flags struct {
	File FileFlags
	Env  EnvFlags
}

type Params added in v0.2.2

type Params struct {
	File        flagParams.StringVar
	SearchPaths flagParams.StringSliceVar
	Env         EnvFlagParams
}

Jump to

Keyboard shortcuts

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