configresolver

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadOsEnv

func ReadOsEnv() map[string]string

Types

type Option

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

func WithKey

func WithKey(key string) Option

func WithPriority

func WithPriority(priority int) Option

type Resolver

type Resolver interface {
	Key() string
	Priority() int
	Resolve(path []string, valueType reflect.Type) (interface{}, bool, error)
}

func NewEnv

func NewEnv(e map[string]string, options ...Option) Resolver

func NewFromOsEnv

func NewFromOsEnv(options ...Option) Resolver

func NewFromYamlFile

func NewFromYamlFile(path string, ignoreMissing bool, options ...Option) (Resolver, error)

func NewMap

func NewMap(m map[string]interface{}, options ...Option) Resolver

Jump to

Keyboard shortcuts

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