VAULT-7256 - Add CustomMetadata to Namespace type (#16491)

* remove CustomMetadata type

* add custom metadata to namespace struct
This commit is contained in:
Chris Capurso
2022-07-29 10:04:57 -04:00
committed by GitHub
parent 11b5e071c6
commit acac6c49e2
3 changed files with 18 additions and 18 deletions

View File

@@ -12,8 +12,9 @@ import (
type contextValues struct{}
type Namespace struct {
ID string `json:"id"`
Path string `json:"path"`
ID string `json:"id"`
Path string `json:"path"`
CustomMetadata map[string]string `json:"custom_metadata"`
}
func (n *Namespace) String() string {
@@ -28,8 +29,9 @@ var (
contextNamespace contextValues = struct{}{}
ErrNoNamespace error = errors.New("no namespace")
RootNamespace *Namespace = &Namespace{
ID: RootNamespaceID,
Path: "",
ID: RootNamespaceID,
Path: "",
CustomMetadata: make(map[string]string),
}
)