{"modulePath":"github.com/AliceO2Group/Control","version":"v1.51.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package gera\n\nPackage gera implements a hierarchical key-value store.\n\nA gera.Map uses a map\\[string]interface{} as backing store, and it can wrap other gera.Map instances. Values in child maps override any value provided by a gera.Map that's wrapped in the hierarchy.\n\nThe name is reminiscent of hiera, as in hierarchical, but it was deemed desirable to avoid future confusion with the Hiera KV store used by Puppet, a different product altogether, so instead of the ancient Greek root, \"gera\" comes from the Italian root instead where \"hi\" becomes a soft \"g\".\n\n## Functions\n\n```go\nfunc FlattenStack[K comparable, V any](maps ...Map[K, V]) (flattened map[K]V, err error)\n```\n\n## Types\n\n```go\ntype Map[K comparable, V any] interface {\n\tWrap(m Map[K, V]) Map[K, V]\n\tIsHierarchyRoot() bool\n\tHierarchyContains(m Map[K, V]) bool\n\tUnwrap() Map[K, V]\n\n\tHas(key K) bool\n\tLen() int\n\n\tGet(key K) (V, bool)\n\tSet(key K, value V) bool\n\tDel(key K) bool\n\n\t// Flattened should return a flat representation of the tree in the root direction,\n\t// where children kv pairs overwrite parent kv pairs.\n\tFlattened() (map[K]V, error)\n\t// FlattenedParent should return a flat representation of the tree in the root direction,\n\tFlattenedParent() (map[K]V, error)\n\tWrappedAndFlattened(m Map[K, V]) (map[K]V, error)\n\n\tRaw() map[K]V\n\tCopy() Map[K, V]\n\tRawCopy() map[K]V\n}\n```\n\n```go\ntype WrapMap[K comparable, V any] struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc MakeMap[K comparable, V any]() *WrapMap[K, V]\n```\n\n```go\nfunc MakeMapWithMap[K comparable, V any](fromMap map[K]V) *WrapMap[K, V]\n```\n\n```go\nfunc MakeMapWithMapCopy[K comparable, V any](fromMap map[K]V) *WrapMap[K, V]\n```\n\n```go\nfunc (w *WrapMap[K, V]) Copy() Map[K, V]\n```\n\n```go\nfunc (w *WrapMap[K, V]) Del(key K) (ok bool)\n```\n\n```go\nfunc (w *WrapMap[K, V]) Flattened() (map[K]V, error)\n```\n\n```go\nfunc (w *WrapMap[K, V]) FlattenedParent() (map[K]V, error)\n```\n\n```go\nfunc (w *WrapMap[K, V]) Get(key K) (value V, ok bool)\n```\n\n```go\nfunc (w *WrapMap[K, V]) Has(key K) bool\n```\n\n```go\nfunc (w *WrapMap[K, V]) HierarchyContains(m Map[K, V]) bool\n```\n\n```go\nfunc (w *WrapMap[K, V]) IsHierarchyRoot() bool\n```\n\n```go\nfunc (w *WrapMap[K, V]) Len() int\n```\n\n```go\nfunc (w *WrapMap[K, V]) MarshalYAML() (interface{}, error)\n```\n\n```go\nfunc (w *WrapMap[K, V]) Raw() map[K]V\n```\n\n```go\nfunc (w *WrapMap[K, V]) RawCopy() map[K]V\n```\n\n```go\nfunc (w *WrapMap[K, V]) Set(key K, value V) (ok bool)\n```\n\n```go\nfunc (w *WrapMap[K, V]) UnmarshalYAML(unmarshal func(interface{}) error) error\n```\n\n```go\nfunc (w *WrapMap[K, V]) Unwrap() Map[K, V]\n```\nUnwraps this map from its parent. Returns a pointer to the former parent which was just unwrapped.\n\n```go\nfunc (w *WrapMap[K, V]) WithMarshalYAML(marshalYAML func(w Map[K, V]) (interface{}, error)) *WrapMap[K, V]\n```\n\n```go\nfunc (w *WrapMap[K, V]) WithUnmarshalYAML(unmarshalYAML func(w Map[K, V], unmarshal func(interface{}) error) error) *WrapMap[K, V]\n```\n\n```go\nfunc (w *WrapMap[K, V]) Wrap(m Map[K, V]) Map[K, V]\n```\nWraps this map around the gera.Map m, which becomes the new parent. Returns a pointer to the composite map (i.e. to itself in its new state).\n\n```go\nfunc (w *WrapMap[K, V]) WrappedAndFlattened(m Map[K, V]) (map[K]V, error)\n```\n\n","path":"github.com/AliceO2Group/Control/common/gera","name":"gera","synopsis":"Package gera implements a hierarchical key-value store.","isRedistributable":true}
