config

package
v0.22.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMap

type ConfigMap struct {
	Parameters map[string]interface{}
}

func (*ConfigMap) GetBool

func (c *ConfigMap) GetBool(key string) bool

GetBool returns the boolean value with the given key in the Parameters map. If not found, or the value cannot be converted to a boolean, false is returned.

func (*ConfigMap) GetBoolWithDefault

func (c *ConfigMap) GetBoolWithDefault(key string, defaultValue bool) bool

GetBoolWithDefault returns the boolean value with the given key in the Parameters map. If not found, or the value cannot be converted to a boolean, the given default value is returned.

func (*ConfigMap) GetInt

func (c *ConfigMap) GetInt(key string) int

GetInt returns the integer value with the given key in the Parameters map. If not found, or it cannot be converted into an integer, 0 is returned.

func (*ConfigMap) GetIntWithDefault

func (c *ConfigMap) GetIntWithDefault(key string, defaultValue int) int

GetIntWithDefault returns the integer value with the given key in the Parameters map. If not found, or it cannot be converted into an integer, the given default value is returned.

func (*ConfigMap) GetString

func (c *ConfigMap) GetString(key string) string

GetString returns the string value with the given key in the Parameters map. If not found, an empty string is returned.

func (*ConfigMap) GetStringWithDefault

func (c *ConfigMap) GetStringWithDefault(key string, defaultValue string) string

GetStringWithDefault returns the string value with the given key in the Parameters map. If not found, the given default value is returned.

Jump to

Keyboard shortcuts

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