2023-03-15 19:00:52 +03:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2024-01-02 21:36:20 +03:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-03-15 19:00:52 +03:00
|
|
|
|
2018-09-18 06:03:00 +03:00
|
|
|
package vault
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/hashicorp/vault/helper/namespace"
|
|
|
|
)
|
|
|
|
|
2021-04-08 19:43:39 +03:00
|
|
|
var NamespaceByID func(context.Context, string, *Core) (*namespace.Namespace, error) = namespaceByID
|
2018-09-18 06:03:00 +03:00
|
|
|
|
|
|
|
func namespaceByID(ctx context.Context, nsID string, c *Core) (*namespace.Namespace, error) {
|
|
|
|
if nsID == namespace.RootNamespaceID {
|
|
|
|
return namespace.RootNamespace, nil
|
|
|
|
}
|
|
|
|
return nil, namespace.ErrNoNamespace
|
|
|
|
}
|
2024-03-14 16:44:41 +03:00
|
|
|
|
|
|
|
var NamespaceRegister func(context.Context, *namespace.Namespace, *Core) error = namespaceRegister
|
|
|
|
|
|
|
|
func namespaceRegister(ctx context.Context, ns *namespace.Namespace, c *Core) error {
|
|
|
|
return nil
|
|
|
|
}
|