open-vault/vault/namespaces.go
Brian Kassouf 81a86f48e8
Backport some OSS changes (#10267)
* Backport some OSS changes

* go mod vendor
2020-10-29 16:47:34 -07:00

23 lines
458 B
Go

package vault
import (
"context"
"github.com/hashicorp/vault/helper/namespace"
)
var (
NamespaceByID func(context.Context, string, *Core) (*namespace.Namespace, error) = namespaceByID
)
const (
mountTypeNSCubbyhole = "ns_cubbyhole"
)
func namespaceByID(ctx context.Context, nsID string, c *Core) (*namespace.Namespace, error) {
if nsID == namespace.RootNamespaceID {
return namespace.RootNamespace, nil
}
return nil, namespace.ErrNoNamespace
}