config

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	fx.In
	Specs     []Spec                    `group:"config_specs"`
	Resolvers []configresolver.Resolver `group:"config_resolvers"`
	Validate  *validator.Validate
}

type ResolvedConfig

type ResolvedConfig struct {
	NodeMap map[string]ResolvedNode
}

func (ResolvedConfig) Nodes

func (r ResolvedConfig) Nodes() []ResolvedNode

type ResolvedNode

type ResolvedNode struct {
	Spec
	IsStruct     bool
	ResolverKey  string
	Type         reflect.Type
	ParentPath   []string
	PathString   string
	StructKey    string
	Value        interface{}
	ValueRaw     interface{}
	ValueLabel   string
	DefaultLabel string
	ChildMap     map[string]ResolvedNode
}

func (ResolvedNode) Children

func (r ResolvedNode) Children() []ResolvedNode

type Result

type Result struct {
	fx.Out
	Resolved ResolvedConfig
}

func New

func New(p Params) (r Result, err error)

type Spec

type Spec struct {
	Key          string
	DefaultValue interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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