The official container registry implementation distribution/distribution has an interface driver.StorageDriver, which is the battle tested implementation for integrating with storage drivers. They have plenty of implementations (aws, gcp, azure, filesystem, etc). It would be nice if we could adopt same interface for our container registry instead of doing our very hacky implementation.
Reference Documentation:
https://github.com/distribution/distribution/blob/main/registry/storage/driver/storagedriver.go#L41