open-vault/vault/router_access.go

17 lines
380 B
Go
Raw Normal View History

2017-10-23 19:35:28 +00:00
package vault
2018-09-18 03:03:00 +00:00
import "context"
2017-10-23 19:35:28 +00: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 03:03:00 +00:00
func (r *RouterAccess) StoragePrefixByAPIPath(ctx context.Context, path string) (string, bool) {
return r.c.router.MatchingStoragePrefixByAPIPath(ctx, path)
2017-10-23 19:35:28 +00:00
}