mirror of
https://github.com/project-zot/zot.git
synced 2024-12-30 22:34:13 -05:00
ce4924f841
Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
30 lines
869 B
Go
30 lines
869 B
Go
package ociutils
|
|
|
|
import (
|
|
godigest "github.com/opencontainers/go-digest"
|
|
|
|
"zotregistry.dev/zot/pkg/extensions/monitoring"
|
|
zLog "zotregistry.dev/zot/pkg/log"
|
|
"zotregistry.dev/zot/pkg/storage"
|
|
"zotregistry.dev/zot/pkg/storage/local"
|
|
stypes "zotregistry.dev/zot/pkg/storage/types"
|
|
"zotregistry.dev/zot/pkg/test/mocks"
|
|
)
|
|
|
|
func GetDefaultImageStore(rootDir string, log zLog.Logger) stypes.ImageStore {
|
|
return local.NewImageStore(rootDir, false, false, log,
|
|
monitoring.NewMetricsServer(false, log),
|
|
mocks.MockedLint{
|
|
LintFn: func(repo string, manifestDigest godigest.Digest, imageStore stypes.ImageStore) (bool, error) {
|
|
return true, nil
|
|
},
|
|
},
|
|
mocks.CacheMock{},
|
|
)
|
|
}
|
|
|
|
func GetDefaultStoreController(rootDir string, log zLog.Logger) stypes.StoreController {
|
|
return storage.StoreController{
|
|
DefaultStore: GetDefaultImageStore(rootDir, log),
|
|
}
|
|
}
|