env

package
v0.0.10-dev Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customizer

type Customizer interface {
	CustomizeEnvironment(environment Environment) error
}

type Environment

type Environment interface {
	ActiveProfiles() []string
	DefaultProfiles() []string
	IsProfileActive(profile string) bool

	SetActiveProfiles(profiles ...string) error
	AddActiveProfile(profile ...string) error
	SetDefaultProfiles(profiles ...string) error
	Merge(parent Environment)

	Variables() Variables
	PropertySources() *property.Sources
	PropertyResolver() property.Resolver
}

func New

func New() Environment

func WithSources

func WithSources(sources *property.Sources) Environment

type EnvironmentPropertySource

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

func NewPropertySource

func NewPropertySource() *EnvironmentPropertySource

func (*EnvironmentPropertySource) ContainsProperty

func (s *EnvironmentPropertySource) ContainsProperty(name string) bool

func (*EnvironmentPropertySource) Name

func (*EnvironmentPropertySource) Property

func (s *EnvironmentPropertySource) Property(name string) (any, bool)

func (*EnvironmentPropertySource) PropertyNames

func (s *EnvironmentPropertySource) PropertyNames() []string

func (*EnvironmentPropertySource) PropertyOrDefault

func (s *EnvironmentPropertySource) PropertyOrDefault(name string, defaultValue any) any

func (*EnvironmentPropertySource) Source

func (s *EnvironmentPropertySource) Source() any

type Variables

type Variables map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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