27bb03bbc0
* adding copyright header * fix fmt and a test
20 lines
450 B
Go
20 lines
450 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package vault
|
|
|
|
import "context"
|
|
|
|
// RouterAccess provides access into some things necessary for testing
|
|
type RouterAccess struct {
|
|
c *Core
|
|
}
|
|
|
|
func NewRouterAccess(c *Core) *RouterAccess {
|
|
return &RouterAccess{c: c}
|
|
}
|
|
|
|
func (r *RouterAccess) StoragePrefixByAPIPath(ctx context.Context, path string) (string, bool) {
|
|
return r.c.router.MatchingStoragePrefixByAPIPath(ctx, path)
|
|
}
|