mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
Add GraphQL API for getting the information necessary to list images in the zot cli without download manifests.
If this GraphQL API is available, try that first, else fallback to the slowpath. Signed-off-by: Roxana Nemulescu <roxana.nemulescu@gmail.com>
This commit is contained in:
committed by
Andrei Aaron
parent
eb77307b63
commit
ab9a20c1ae
+7
-10
@@ -15,6 +15,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -283,16 +284,12 @@ func (p *requestsPool) doJob(ctx context.Context, job *manifestJob) {
|
||||
|
||||
image := &imageStruct{}
|
||||
image.verbose = *job.config.verbose
|
||||
image.Name = job.imageName
|
||||
image.Tags = []tags{
|
||||
{
|
||||
Name: job.tagName,
|
||||
Digest: digest,
|
||||
Size: size,
|
||||
ConfigDigest: configDigest,
|
||||
Layers: layers,
|
||||
},
|
||||
}
|
||||
image.RepoName = job.imageName
|
||||
image.Tag = job.tagName
|
||||
image.Digest = digest
|
||||
image.Size = strconv.Itoa(int(size))
|
||||
image.ConfigDigest = configDigest
|
||||
image.Layers = layers
|
||||
|
||||
str, err := image.string(*job.config.outputFormat)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user