config

package
v0.30.113 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Feature

func Feature(
	provider Provider,
	config ...func(*Installer),
) setup.Feature

Feature creates and configures configuration support using the supplied configuration Provider.

Types

type Factory

type Factory struct {
	Provider
	// contains filtered or unexported fields
}

Factory of configurations using assigned Provider.

func (*Factory) NewConfiguration

func (f *Factory) NewConfiguration(
	_ *struct {
		args.Strict
		Load
	}, p *provides.It,
) (any, error)

NewConfiguration return a new configuration instance populated from the designated Provider.

func (*Factory) NoConstructor added in v0.30.61

func (f *Factory) NoConstructor()

NoConstructor prevents Factory from being created implicitly. The Factory is explicitly created by the Installer which assigns the Provider.

type Installer

type Installer struct {
	// contains filtered or unexported fields
}

Installer enables configuration support.

func (*Installer) Install

func (i *Installer) Install(b *setup.Builder) error

type Load

type Load struct {
	Path string
	Flat bool
}

Load restricts resolutions to configurations only.

func (*Load) Implied added in v0.28.0

func (l *Load) Implied() bool

func (*Load) InitWithTag

func (l *Load) InitWithTag(tag reflect.StructTag) error

func (*Load) Required

func (l *Load) Required() bool

func (*Load) Satisfies added in v0.21.0

func (l *Load) Satisfies(required miruken.Constraint, _ miruken.HandleContext) bool

type Provider

type Provider interface {
	Unmarshal(path string, flat bool, output any) error
}

Provider defines the api to allow configuration providers to expose their configuration information.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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