MCPcopy
hub / github.com/perkeep/perkeep / UploadAndSignBlob

Method UploadAndSignBlob

pkg/client/client.go:1428–1438  ·  view source on GitHub ↗
(ctx context.Context, b schema.AnyBlob)

Source from the content-addressed store, hash-verified

1426}
1427
1428func (c *Client) UploadAndSignBlob(ctx context.Context, b schema.AnyBlob) (*PutResult, error) {
1429 signed, err := c.signBlob(ctx, b.Blob(), time.Time{})
1430 if err != nil {
1431 return nil, err
1432 }
1433 c.checkMatchingKeys()
1434 if err := c.UploadPublicKey(ctx); err != nil {
1435 return nil, err
1436 }
1437 return c.uploadString(ctx, signed, false)
1438}
1439
1440func (c *Client) UploadBlob(ctx context.Context, b schema.AnyBlob) (*PutResult, error) {
1441 // TODO(bradfitz): ask the blob for its own blobref, rather

Callers 15

UploadNewPermanodeMethod · 0.95
setMethod · 0.80
removeMethod · 0.80
RemoveMethod · 0.80
RenameMethod · 0.80
MkdirMethod · 0.80
SymlinkMethod · 0.80
creatMethod · 0.80
RemoveMethod · 0.80
RenameMethod · 0.80
FlushMethod · 0.80
RunCommandMethod · 0.80

Calls 5

signBlobMethod · 0.95
checkMatchingKeysMethod · 0.95
UploadPublicKeyMethod · 0.95
uploadStringMethod · 0.95
BlobMethod · 0.65

Tested by

no test coverage detected