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
|
|
|
|
2017-10-23 22:35:28 +03:00
|
|
|
package vault
|
|
|
|
|
2018-09-18 06:03:00 +03:00
|
|
|
import "context"
|
|
|
|
|
2017-10-23 22:35:28 +03:00
|
|
|
// RouterAccess provides access into some things necessary for testing
|
|
|
|
type RouterAccess struct {
|
|
|
|
c *Core
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewRouterAccess(c *Core) *RouterAccess {
|
|
|
|
return &RouterAccess{c: c}
|
|
|
|
}
|
|
|
|
|
2018-09-18 06:03:00 +03:00
|
|
|
func (r *RouterAccess) StoragePrefixByAPIPath(ctx context.Context, path string) (string, bool) {
|
|
|
|
return r.c.router.MatchingStoragePrefixByAPIPath(ctx, path)
|
2017-10-23 22:35:28 +03:00
|
|
|
}
|