Documentation
¶
Index ¶
- func NewWorkQueue(queueName string) workqueue.RateLimitingInterface
- func RemovePaths(m map[string]any, excludedPaths []string, pathSeparator string)
- func SplitMap(m map[string]any, paths []string, excludedPaths []string, pathSeparator string) (onlyPaths map[string]any, withoutPaths map[string]any, err error)
- func SplitObject(obj []byte, paths []string, excludedPaths []string, pathSeparator string) (map[string]any, map[string]any, error)
- func StructToStruct(src any, dst any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWorkQueue ¶ added in v0.2.0
func NewWorkQueue(queueName string) workqueue.RateLimitingInterface
func RemovePaths ¶ added in v0.7.0
RemovePaths removes all of the excludedPaths passed in from m, where each excludedPath is a string representation of the path, demarcated by pathSeparator
func SplitMap ¶ added in v0.6.0
func SplitMap(m map[string]any, paths []string, excludedPaths []string, pathSeparator string) (onlyPaths map[string]any, withoutPaths map[string]any, err error)
SplitMap returns 2 maps from a given map and a slice of paths. One of the 2 output maps will include only the paths from the slice while the second returned map will include all other paths. NOTE: any path in "paths" which is not found in m will have an associated key in "onlyPaths", which is "{}" If the caller is calling this function on 2 maps for the purpose of comparing them, and if the key is not found in either one, then 'key: {}' will be returned for both, and they will be deemed equal
Also ignores any paths in the excludedPaths list which are each demarcated by "pathSeparator" value
func SplitObject ¶ added in v0.6.0
func SplitObject(obj []byte, paths []string, excludedPaths []string, pathSeparator string) (map[string]any, map[string]any, error)
SplitObject returns 2 maps from a given object as bytes array and a slice of paths. One of the 2 output maps will include only the paths from the slice while the second returned map will include all other paths.
func StructToStruct ¶ added in v0.2.0
StructToStruct converts a struct type (src) into another (dst)
Types ¶
This section is empty.