Documentation ¶
Overview ¶
Package values is a set of value types to use in provisioning. They add custom unmarshaling logic that puts the string values through os.ExpandEnv. Usage:
type Data struct { Field StringValue `yaml:"field"` // Instead of string }
d := &Data{} // unmarshal into d d.Field.Value() // returns the final interpolated value from the yaml file
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolValue ¶
type BoolValue struct { Raw string // contains filtered or unexported fields }
BoolValue represents a string value in a YAML config that can be overridden by environment variables
func (*BoolValue) UnmarshalYAML ¶
UnmarshalYAML converts YAML into an *BoolValue
type Int64Value ¶
type Int64Value struct { Raw string // contains filtered or unexported fields }
Int64Value represents a string value in a YAML config that can be overridden by environment variables
func (*Int64Value) UnmarshalYAML ¶
func (val *Int64Value) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML converts YAML into an *Int64Value
func (*Int64Value) Value ¶
func (val *Int64Value) Value() int64
Value returns the wrapped int64 value
type IntValue ¶
type IntValue struct { Raw string // contains filtered or unexported fields }
IntValue represents a string value in a YAML config that can be overridden by environment variables
func (*IntValue) UnmarshalYAML ¶
UnmarshalYAML converts YAML into an *IntValue
type JSONSliceValue ¶
type JSONSliceValue struct { Raw []map[string]interface{} // contains filtered or unexported fields }
func (*JSONSliceValue) UnmarshalYAML ¶
func (val *JSONSliceValue) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML converts YAML into an *JSONSliceValue
func (*JSONSliceValue) Value ¶
func (val *JSONSliceValue) Value() []map[string]interface{}
Value returns the wrapped []interface{} value
type JSONValue ¶
type JSONValue struct { Raw map[string]interface{} // contains filtered or unexported fields }
JSONValue represents a string value in a YAML config that can be overridden by environment variables
func (*JSONValue) UnmarshalYAML ¶
UnmarshalYAML converts YAML into an *JSONValue
type StringMapValue ¶
StringMapValue represents a string value in a YAML config that can be overridden by environment variables
func (*StringMapValue) UnmarshalYAML ¶
func (val *StringMapValue) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML converts YAML into an *StringMapValue
func (*StringMapValue) Value ¶
func (val *StringMapValue) Value() map[string]string
Value returns the wrapped map[string]string value
type StringValue ¶
type StringValue struct { Raw string // contains filtered or unexported fields }
StringValue represents a string value in a YAML config that can be overridden by environment variables
func (*StringValue) UnmarshalYAML ¶
func (val *StringValue) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML converts YAML into an *StringValue
func (*StringValue) Value ¶
func (val *StringValue) Value() string
Value returns the wrapped string value