config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 5 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 *Installer),
) miruken.Feature

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

Types

type Factory

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

Factory of configurations using assigned Provider.

func (*Factory) NewConfiguration

func (f *Factory) NewConfiguration(
	_ *struct {
		miruken.Provides
		miruken.Singleton
		Load
	}, provides *miruken.Provides,
) (any, error)

NewConfiguration return a new configuration instance populated by the assigned Provider.

type Installer

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

Installer enables configuration support.

func (*Installer) Install

func (v *Installer) Install(setup *miruken.SetupBuilder) error

type Load

type Load struct {
	Path string
	Flat bool
}

Load asserts a configuration is loaded.

func (*Load) InitWithTag

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

func (*Load) Matches

func (l *Load) Matches(metadata *miruken.BindingMetadata) bool

func (*Load) Require

func (l *Load) Require(metadata *miruken.BindingMetadata)

func (*Load) Required

func (l *Load) Required() 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