configgenerator

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const CustomConfigBlockDivider = "#________******kubedb.com/inline-config******________#"

Variables

This section is empty.

Functions

func ConvertMapInToString

func ConvertMapInToString(config *orderedmap.OrderedMap) string

func ConvertStringInToMap

func ConvertStringInToMap(configString string, separators []string) (configData *orderedmap.OrderedMap)

func MergeAndOverWriteMap

func MergeAndOverWriteMap(config *orderedmap.OrderedMap, incomingConfig *orderedmap.OrderedMap) *orderedmap.OrderedMap

Types

type CustomConfigGenerator

type CustomConfigGenerator struct {
	CurrentConfig      string   // current config string
	RequestedConfig    string   // the requested change that comes from inline custom config
	ConfigBlockDivider string   // This is the divider  String between default custom config and inline config
	KeyValueSeparators []string // KeyValueSeparators is the array with which character a key and value can be separated. for example: a=b. here key `a` and value `b` Separator is '='. This array must need to have one or more value
}

func (*CustomConfigGenerator) GetMergedConfigString

func (generator *CustomConfigGenerator) GetMergedConfigString() (string, error)

GetMergedConfigString func return new config string where the current config string and requested config strings are merged

type ValueGenerator

type ValueGenerator struct {
	Value     string
	Separator string
}

Jump to

Keyboard shortcuts

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