simpleProperties

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicEvaluator

func BasicEvaluator() func(*Properties) error

BasicEvaluator Try to evaluate all properties Step 1 - Update all properties using know values but ignoring defaults Step 2 - Once no more can be evaluated, select one default, and repeat step 1

2a - When selecting a default, check for properties that don't appear in the lhs of any expression
2b - If no default is available for (2a), use the first one that is available

Step 3 - Once no more evaluations can be made, fail if unevaluated properties still exist, else all good

func BootPropertyLoader

func BootPropertyLoader(path string) func(*Properties) error

BootPropertyLoader load properties from the boostrap file(s)

func GlobalPropertyLoader

func GlobalPropertyLoader(path string) func(*Properties) error

GlobalPropertyLoader load properties from the application property file(s)

func LoadCLIParameters added in v1.1.0

func LoadCLIParameters() func(*Properties) error

LoadCLIParameters loads -key=value CLI parameters

func LoadOSEnvironment

func LoadOSEnvironment() func(*Properties) error

LoadOSEnvironment load properties from the O/S environment

func ProfilePropertyLoader

func ProfilePropertyLoader(path string) func(*Properties) error

ProfilePropertyLoader load properties from the application_<profile> property file(s)

Types

type Properties

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

func DefaultProperties added in v0.0.91

func DefaultProperties() *Properties

DefaultProperties create a default properties structure. This will contain the bootstrap properties and default operations to load the properties via the default operations, call the Load method

func EmptyProperties added in v0.0.91

func EmptyProperties() *Properties

EmptyProperties create a blank properties structure with no data or operations

func (*Properties) GetBootKeys

func (p *Properties) GetBootKeys() []string

func (*Properties) GetBootProperty

func (p *Properties) GetBootProperty(key string) string

GetBootProperty get a bootstrap property (if it exists)

func (*Properties) GetEvalKeys

func (p *Properties) GetEvalKeys() []string

func (*Properties) GetEvalProperty

func (p *Properties) GetEvalProperty(key string) string

GetEvalProperty get a value from the map of evaluated properties

func (*Properties) GetExprProperty

func (p *Properties) GetExprProperty(key string) *list.List

GetExprProperty get the list of expression data associated with a value key

func (*Properties) GetKeys

func (p *Properties) GetKeys() []string

func (*Properties) GetProperty

func (p *Properties) GetProperty(key string) string

GetProperty get a global property (if it exists). will fall back to boostrap properties if not held in the global property map

func (*Properties) Load

func (p *Properties) Load() error

Load execute the list operations for property loading

Jump to

Keyboard shortcuts

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