config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoFilepath

func AutoFilepath() string

AutoFilepath is the automatically detected path of the currently used config file

func DefaultFilepath

func DefaultFilepath() (string, error)

DefaultFilepath returns the default in the system for the config file. It should be used if no explicit path to a config file is given.

func GetProfiles

func GetProfiles() map[string]*model.ConfigProfile

GetProfiles returns a map list of currently loaded and available profiles

func Load

func Load() error

Load tries to load the viper found config file into a map of profiles

func SetUpLoader

func SetUpLoader() error

SetUpLoader sets up the viper config framework settings

func UpdateConfigFileProfileContents

func UpdateConfigFileProfileContents(configFilepath string, configProfiles map[string]*model.ConfigProfile) error

UpdateConfigFileProfileContents overwrites the profiles in the given config filepath with the given list of profiles

Types

This section is empty.

Jump to

Keyboard shortcuts

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