Documentation ¶
Index ¶
- func Delete(obj yaml.MapSlice, key interface{}) (yaml.MapSlice, bool)
- func Get(obj yaml.MapSlice, key interface{}) (interface{}, bool)
- func IndexOf(obj yaml.MapSlice, key interface{}) int
- func NestedBool(obj yaml.MapSlice, fields ...string) (bool, bool, error)
- func NestedField(obj yaml.MapSlice, fields ...string) (interface{}, bool, error)
- func NestedFloat64(obj yaml.MapSlice, fields ...string) (float64, bool, error)
- func NestedInt64(obj yaml.MapSlice, fields ...string) (int64, bool, error)
- func NestedMapSlice(obj yaml.MapSlice, fields ...string) (yaml.MapSlice, bool, error)
- func NestedString(obj yaml.MapSlice, fields ...string) (string, bool, error)
- func NestedStringSlice(obj yaml.MapSlice, fields ...string) ([]string, bool, error)
- func RemoveNestedField(obj yaml.MapSlice, fields ...string) (yaml.MapSlice, bool)
- func Set(obj yaml.MapSlice, key interface{}, value interface{}) (yaml.MapSlice, bool)
- func SetNestedField(obj yaml.MapSlice, value interface{}, fields ...string) (yaml.MapSlice, bool, error)
- func SetNestedMap(obj yaml.MapSlice, value yaml.MapSlice, fields ...string) (yaml.MapSlice, bool, error)
- func SetNestedSlice(obj yaml.MapSlice, value []interface{}, fields ...string) (yaml.MapSlice, bool, error)
- func SetNestedStringMap(obj yaml.MapSlice, value map[string]string, fields ...string) (yaml.MapSlice, bool, error)
- func SetNestedStringSlice(obj yaml.MapSlice, value []string, fields ...string) (yaml.MapSlice, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(obj yaml.MapSlice, key interface{}) (yaml.MapSlice, bool)
Deletes the key in the slice. Returns true if a modification was made
func Get ¶
func Get(obj yaml.MapSlice, key interface{}) (interface{}, bool)
Get returns the value of the slice with the given key
func IndexOf ¶
func IndexOf(obj yaml.MapSlice, key interface{}) int
IndexOf returns the index of the item with the given key or -1 if its not found
func NestedBool ¶
NestedBool returns the bool value of a nested field. Returns false if value is not found and an error if not a bool.
func NestedField ¶
NestedField returns a reference to a nested field. Returns false if value is not found and an error if unable to traverse obj.
func NestedFloat64 ¶
NestedFloat64 returns the float64 value of a nested field. Returns false if value is not found and an error if not a float64.
func NestedInt64 ¶
NestedInt64 returns the int64 value of a nested field. Returns false if value is not found and an error if not an int64.
func NestedMapSlice ¶
NestedMapSlice returns a yaml.MapSlice value of a nested field. Returns false if value is not found and an error if not a yaml.MapSlice.
func NestedString ¶
NestedString returns the string value of a nested field. Returns false if value is not found and an error if not a string.
func NestedStringSlice ¶
NestedStringSlice returns a copy of []string value of a nested field. Returns false if value is not found and an error if not a []interface{} or contains non-string items in the slice.
func RemoveNestedField ¶
RemoveNestedField removes the nested field from the obj.
func Set ¶
func Set(obj yaml.MapSlice, key interface{}, value interface{}) (yaml.MapSlice, bool)
Set sets the key to the given value. Returns true if a modification was made
func SetNestedField ¶
func SetNestedField(obj yaml.MapSlice, value interface{}, fields ...string) (yaml.MapSlice, bool, error)
SetNestedField sets the value of a nested field to a deep copy of the value provided. Returns an error if value cannot be set because one of the nesting levels is not a yaml.MapSlice.
func SetNestedMap ¶
func SetNestedMap(obj yaml.MapSlice, value yaml.MapSlice, fields ...string) (yaml.MapSlice, bool, error)
SetNestedMap sets the yaml.MapSlice value of a nested field. Returns an error if value cannot be set because one of the nesting levels is not a yaml.MapSlice.
func SetNestedSlice ¶
func SetNestedSlice(obj yaml.MapSlice, value []interface{}, fields ...string) (yaml.MapSlice, bool, error)
SetNestedSlice sets the slice value of a nested field. Returns an error if value cannot be set because one of the nesting levels is not a yaml.MapSlice.
func SetNestedStringMap ¶
func SetNestedStringMap(obj yaml.MapSlice, value map[string]string, fields ...string) (yaml.MapSlice, bool, error)
SetNestedStringMap sets the map[string]string value of a nested field. Returns an error if value cannot be set because one of the nesting levels is not a yaml.MapSlice.
func SetNestedStringSlice ¶
func SetNestedStringSlice(obj yaml.MapSlice, value []string, fields ...string) (yaml.MapSlice, bool, error)
SetNestedStringSlice sets the string slice value of a nested field. Returns an error if value cannot be set because one of the nesting levels is not a yaml.MapSlice.
Types ¶
This section is empty.