MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / getManifestParams

Function getManifestParams

cli/internal/publish/plugins.go:489–501  ·  view source on GitHub ↗
(target string)

Source from the content-addressed store, hash-verified

487}
488
489func getManifestParams(target string) (imageName reference.Named, repository string, err error) {
490 ref, err := reference.ParseNamed(target)
491 if err != nil {
492 return nil, "", fmt.Errorf("failed to parse Docker image tag: %v", err)
493 }
494 repository = reference.Domain(ref)
495 refPath := reference.Path(ref)
496 imageName, err = reference.WithName(refPath)
497 if err != nil {
498 return nil, "", fmt.Errorf("failed to create Docker repository: %v", err)
499 }
500 return imageName, repository, nil
501}
502
503func getManifestService(ctx context.Context, imageName reference.Named, repository string, registryAuth string, insecureSkipVerify bool) (distribution.ManifestService, error) {
504 repo, err := distributionclient.NewRepository(imageName, "https://"+repository, newTransportWithRegistryAuth(insecureSkipVerify, registryAuth))

Callers 1

pushManifestFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected