mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
Added storage interface
This commit is contained in:
committed by
Ramkumar Chinchani
parent
20f4051446
commit
7d077eaf5a
@@ -115,7 +115,7 @@ func (c *Controller) Run() error {
|
||||
if len(c.Config.Storage.SubPaths) > 0 {
|
||||
subPaths := c.Config.Storage.SubPaths
|
||||
|
||||
subImageStore := make(map[string]*storage.ImageStore)
|
||||
subImageStore := make(map[string]storage.ImageStore)
|
||||
|
||||
// creating image store per subpaths
|
||||
for route, storageConfig := range subPaths {
|
||||
|
||||
+1
-1
@@ -1237,6 +1237,6 @@ func WriteDataFromReader(w http.ResponseWriter, status int, length int64, mediaT
|
||||
}
|
||||
|
||||
// will return image storage corresponding to subpath provided in config.
|
||||
func (rh *RouteHandler) getImageStore(name string) *storage.ImageStore {
|
||||
func (rh *RouteHandler) getImageStore(name string) storage.ImageStore {
|
||||
return rh.c.StoreController.GetImageStore(name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user