property

package
v0.9.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: BSD-3-Clause Imports: 4 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableExternalResolvers

func EnableExternalResolvers(resolverTypes string) error

func ExternalPropertyResolverProcessor

func ExternalPropertyResolverProcessor(properties map[string]interface{}) error

func RegisterExternalResolver added in v0.9.4

func RegisterExternalResolver(resolverType string, resolver ExternalResolver) error

func ResolveExternally

func ResolveExternally(propertyName string) (interface{}, bool)

func SetDefaultManager

func SetDefaultManager(manager *Manager)

Types

type ExternalResolver added in v0.9.4

type ExternalResolver interface {
	// Should return value and true if the given key exists in the external configuration otherwise should return nil and false.
	LookupValue(key string) (interface{}, bool)
}

Resolver used to resolve property value from external configuration like env, file etc

func GetExternalResolver

func GetExternalResolver(resolverType string) ExternalResolver

type Manager

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

func DefaultManager

func DefaultManager() *Manager

func NewManager

func NewManager(properties map[string]interface{}) *Manager

func (*Manager) Finalize

func (m *Manager) Finalize(processors ...PostProcessor) error

func (*Manager) GetProperty

func (m *Manager) GetProperty(name string) (interface{}, bool)

type PostProcessor

type PostProcessor func(properties map[string]interface{}) error

Jump to

Keyboard shortcuts

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