yamlconfigprovider

package
Version: v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() config.Provider

New constructs new provider and initializes this module on the fly

Types

type YamlConfigProvider

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

YamlConfigProvider is default config provider that is able to read configuration from yaml file

func (*YamlConfigProvider) GetConfigByName

func (c *YamlConfigProvider) GetConfigByName(configName string) string

GetConfigByName returns configuration value by provided key or empty string if does not exist

func (*YamlConfigProvider) GetConfigWithDefaultValue

func (c *YamlConfigProvider) GetConfigWithDefaultValue(configName string, defaultValue string) string

GetConfigWithDefaultValue returns configuration value by provided key or default value if does not exist

func (*YamlConfigProvider) OverrideWithValue

func (c *YamlConfigProvider) OverrideWithValue(configName string, valueToSet string)

OverrideWithValue allows to change programatically configuration by key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL