Documentation ¶
Overview ¶
Package url handles expansion of the download URL for the config.
Index ¶
- func AllVariables() map[string]*Variable
- func MapValues(ctx context.Context, st state.State, variableNames []string) (map[string]string, error)
- func Populate(ctx context.Context, downloadURL string, st state.State) (string, error)
- func PopulateVariables(ctx context.Context, downloadURL string, st state.State, variables []*Variable) (string, error)
- type Value
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllVariables ¶
AllVariables is a map of all supported variables.
func MapValues ¶
func MapValues(ctx context.Context, st state.State, variableNames []string) (map[string]string, error)
MapValues maps variable names to values.
Types ¶
type Value ¶
type Value interface { // Get the value. Get() string // RegisterWatch handles registering a watch for the variable. RegisterWatch(ctx context.Context, st state.State, ch chan<- state.Event) error // EventHandler is called for each watch event, returns when the variable value is ready. EventHandler(event state.Event) (bool, error) }
Value of a variable.
func SerialNumberValue ¶
func SerialNumberValue() Value
SerialNumberValue is a value for SerialNumber variable.
type Variable ¶
type Variable struct { // Key is the variable name. Key string // MatchOnArg is set for variables which are match on the arg name with empty value. // // Required to support legacy `?uuid=` style of the download URL. MatchOnArg bool // Value is the variable value. Value Value // contains filtered or unexported fields }
Variable represents a variable substitution in the download URL.
Click to show internal directories.
Click to hide internal directories.