1
0
vault-redux/vault/router_access.go

20 lines
451 B
Go
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
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
}