Skip to content

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 a storage.Repository as input instead of the repositroy path. Previously, the validation logic was split across ValidateRepository() and GetRepoPath().
  • We can provide better error reporting in ValidateRepository(). This will be done in a follow-up merge request.
  • We can replace service.ValidateRepository() with locator.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.

Merge request reports