config

package
v1.85.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProviderGetSections

func ProviderGetSections(provider Provider, sections ...Section) (err error)

ProviderGetSections is a helper which takes a provider and series of sections and uses the Provider's API to populate the sections.

Types

type Provider

type Provider config.Provider

Provider is an abstraction over a configuration store

func NewFileProvider

func NewFileProvider(filePath string) (provider Provider, err error)

NewFileProvider returns a config Provider backed by a config file.

func NewProvider

func NewProvider(overridesConfigPath, fallbackConfigLiteral string) (
	Provider, error,
)

NewProvider returns an instance of Provider by merging a reference config string literal and the contents of an override configuration file.

func NewReaderProvider

func NewReaderProvider(reader ...io.Reader) (provider Provider, err error)

NewReaderProvider returns a config Provider backed by a config io.Reader.

func NewStringProvider

func NewStringProvider(stringConfig string) (Provider, error)

NewStringProvider returns a config Provider backed by a config string literal.

type Section

type Section struct {
	Name   string
	Target interface{}
}

Section represents a configuration section or sub-section within a file.

Jump to

Keyboard shortcuts

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