summaryrefslogtreecommitdiff
path: root/registry-scanner/pkg/cache/cache.go
diff options
context:
space:
mode:
authorIshita Sequeira <46771830+ishitasequeira@users.noreply.github.com>2024-11-13 08:57:55 -0500
committerGitHub <noreply@github.com>2024-11-13 08:57:55 -0500
commitcde58c56ff0981df884433eeea76d747f4b809de (patch)
tree6fb745e6995e3bc3fe87be90524a4d39ebe3531a /registry-scanner/pkg/cache/cache.go
parent1d04e9aa3e237530336bc0693eaaa7f6de7b66e1 (diff)
refactor: Add registry pkg registry scanner (#933)
Signed-off-by: Ishita Sequeira <ishiseq29@gmail.com>
Diffstat (limited to 'registry-scanner/pkg/cache/cache.go')
-rw-r--r--registry-scanner/pkg/cache/cache.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/registry-scanner/pkg/cache/cache.go b/registry-scanner/pkg/cache/cache.go
new file mode 100644
index 0000000..1ceef66
--- /dev/null
+++ b/registry-scanner/pkg/cache/cache.go
@@ -0,0 +1,20 @@
+package cache
+
+import (
+ "github.com/argoproj-labs/argocd-image-updater/registry-scanner/pkg/tag"
+)
+
+type ImageTagCache interface {
+ HasTag(imageName string, imageTag string) bool
+ GetTag(imageName string, imageTag string) (*tag.ImageTag, error)
+ SetTag(imageName string, imgTag *tag.ImageTag)
+ ClearCache()
+ NumEntries() int
+}
+
+// KnownImage represents a known image and the applications using it, without
+// any version/tag information.
+type KnownImage struct {
+ ImageName string
+ // Applications []string
+}