Documentation
¶
Overview ¶
Package parameters defines data structure for the data-driven renderer
Parameters is a tree structure and can be created from a YAML files or 'key=value' pairs.
Index ¶
Constants ¶
const (
// RootKey is an special configuration key key used by e.g. the Base and Root functions
RootKey = "root"
)
Variables ¶
var ( // VarArgRegexp defines the extra variable parameter format VarArgRegexp = matcher.Must(`^(?P<name>\S+)=(?P<value>[\S ]*)$`) )
Functions ¶
This section is empty.
Types ¶
type Parameters ¶
type Parameters map[string]interface{}
Parameters is a map used to render the templates with
func All ¶
func All(configPaths, vars []string) (Parameters, error)
All creates a configuration from one or more configuration file paths and one or more extra variables in addition to base configuration
func Base ¶
func Base() (Parameters, error)
Base creates a basic configuration required for some of the functions, it is recommended to use it
func FromFiles ¶
func FromFiles(configPaths []string) (Parameters, error)
FromFiles creates a configuration from one or more configuration file paths
func FromVars ¶
func FromVars(extraParams []string) (Parameters, error)
FromVars creates a configuration from one or more extra variables (key=value), see also VarArgRegexp
func Merge ¶
func Merge(parameters ...Parameters) (Parameters, error)
Merge creates a new parameters from one or more parameter sets, to be used with other helper functions
func (Parameters) Validate ¶
func (parameters Parameters) Validate() error
Validate checks the internal state and returns error if necessary