open-vault/vault/router_access.go
2018-09-17 23:03:00 -04:00

17 lines
380 B
Go

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)
}