working commit

This commit is contained in:
2026-03-10 12:52:12 +02:00
parent d0a5fab362
commit d1ef1fbe50
42 changed files with 242 additions and 426 deletions
+6 -7
View File
@@ -15,7 +15,7 @@ import (
"github.com/spf13/cobra"
"mstore/pkg/client"
"mstore/pkg/repocli"
)
// CatalogImages
@@ -38,17 +38,16 @@ func (util *ImageUtil) catalogImages(common *CommonImageParams, params *CatalogI
res := &CatalogImagesResult{
Repositories: make([]string, 0),
}
ctx := context.Background()
cli := client.NewClient(common.SkipTLSVerify)
timeout := time.Duration(common.Timeout) * time.Second
ctx, _ := context.WithTimeout(context.Background(), timeout)
params.Source, err = packUserinfo(params.Source, common.Username, common.Password)
ref, err := repocli.NewReferer(params.Source)
if err != nil {
return res, err
}
ctx, _ = context.WithTimeout(ctx, timeout)
opres, err := cli.CatalogImages(ctx, params.Source)
mw := repocli.NewBasicAuthMiddleware(ref.Userinfo())
cli := repocli.NewClient(nil, mw)
opres, err := cli.GetCatalog(ctx, ref.Raw())
if err != nil {
return res, err
}