config

package
v0.0.0-...-a196a74 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(target interface{}, loader SourcesProvider) error

Load loads configuration of the plugin based on strategies defined by SourcesProvider It ignores errors returned by providers and only propagates the one occurred while unmarshalling

Types

type PluginConfiguration

type PluginConfiguration struct {
	PluginName  string
	LocationURL string
}

PluginConfiguration holds common configuration for all the plugins

type Source

type Source func() ([]byte, error)

Source is a function type representing strategy for loading configuration file into []byte

type SourcesProvider

type SourcesProvider interface {
	Sources() []Source
}

SourcesProvider is an interface which provides a slice of configuration source loader functions as strategies

Jump to

Keyboard shortcuts

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