storage: Refactor `ValidateRepository()` to be a receiver function
This merge request refactors ValidateRepository()
to become a receiver function on the storage.Locator
interface. This allows for multiple things:
- We can unify all validation of the repository into
ValidateRepository()
as it now accepts astorage.Repository
as input instead of the repositroy path. Previously, the validation logic was split acrossValidateRepository()
andGetRepoPath()
. - We can provide better error reporting in
ValidateRepository()
. This will be done in a follow-up merge request. - We can replace
service.ValidateRepository()
withlocator.ValidateRepository()
in our RPCs to tighten parameter verification. This allows for more thorough error checking and more consistent error messages. This will be done in a follow-up merge request.