package
0.0.0-20250221084221-cda146333981
Repository: https://github.com/mendersoftware/go-lib-micro.git
Documentation: pkg.go.dev

# Functions

DocumentFromStruct creates a bson document from a struct in the order of the underlying data structure.
FlattenDocument consumes a struct or map and returns a flattened BSON document (bson.D) where embedded structs and maps are flattened into the root level of the map and field-names are concatenated by dots ('.').
MarshallBSONOrDocumentFromStruct marshals a structure to BSON if it implements the bson.Marshaler interface, otherwise invokes DocumentFromStruct on it.
No description provided by the author
UnwindMap takes a string map and perform mongodb $unwind aggregation operation on all array entries.

# Constants

PermutationThreshold limits the complexity of Unwound maps to the given array length.

# Variables

ErrPermutations is returned if the map contains arrays with a combined number of permutations than the threshold.

# Structs

No description provided by the author