MCPcopy
hub / github.com/harness/harness / CheckIfVersionExists

Method CheckIfVersionExists

registry/app/pkg/base/base.go:458–465  ·  view source on GitHub ↗
(ctx context.Context, info pkg.PackageArtifactInfo)

Source from the content-addressed store, hash-verified

456}
457
458func (l *localBase) CheckIfVersionExists(ctx context.Context, info pkg.PackageArtifactInfo) (bool, error) {
459 _, err := l.artifactDao.GetByRegistryImageAndVersion(ctx,
460 info.BaseArtifactInfo().RegistryID, info.BaseArtifactInfo().Image, info.GetVersion())
461 if err != nil {
462 return false, err
463 }
464 return true, nil
465}
466
467func (l *localBase) GetSHA256(ctx context.Context, info pkg.ArtifactInfo, path string) (
468 exists bool,

Callers

nothing calls this directly

Calls 3

BaseArtifactInfoMethod · 0.65
GetVersionMethod · 0.65

Tested by

no test coverage detected