MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Exists

Method Exists

pkg/blobmanager/s3/backend.go:146–153  ·  view source on GitHub ↗

Exists check that the artifact is already present in the repository

(ctx context.Context, digest string)

Source from the content-addressed store, hash-verified

144
145// Exists check that the artifact is already present in the repository
146func (b *Backend) Exists(ctx context.Context, digest string) (bool, error) {
147 _, err := b.Describe(ctx, digest)
148 if err != nil && backend.IsNotFound(err) {
149 return false, nil
150 }
151
152 return err == nil, err
153}
154
155func (b *Backend) Upload(ctx context.Context, r io.Reader, resource *pb.CASResource) error {
156 uploader := manager.NewUploader(b.client)

Callers 1

DownloadMethod · 0.95

Calls 1

DescribeMethod · 0.95

Tested by

no test coverage detected