config

package
v0.0.0-...-997c607 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateRawConfigKeys

func ValidateRawConfigKeys(attributes map[string]interface{}, knownKeys []string) error

Types

type AbstractConfig

type AbstractConfig[T AbstractItem] struct {
	Config map[string]T
}

func ConfigFromAttributes

func ConfigFromAttributes[T AbstractItem](attributes map[string]interface{}, defaultItem T) (*AbstractConfig[T], error)

ConfigFromAttributes - Merges given attributes into a usable config, all types are updated with the provided default config item

type AbstractItem

type AbstractItem = any

type RawConfig

type RawConfig = AbstractConfig[*RawConfigItem]

type RawConfigItem

type RawConfigItem struct {
	Extras    map[string]any `mapstructure:",remain"`
	Telemetry int
}

Jump to

Keyboard shortcuts

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