MCPcopy
hub / github.com/perkeep/perkeep / addAttribute

Method addAttribute

app/scanningcabinet/datastore.go:265–271  ·  view source on GitHub ↗
(ctx context.Context, pn blob.Ref, attr, val string)

Source from the content-addressed store, hash-verified

263}
264
265func (h *handler) addAttribute(ctx context.Context, pn blob.Ref, attr, val string) error {
266 ucl, err := schema.NewAddAttributeClaim(pn, attr, val).SetSigner(h.signer).JSON()
267 if err != nil {
268 return fmt.Errorf("could not create claim to add %v:%v on %v: %v", attr, val, pn, err)
269 }
270 return h.signAndSend(ctx, ucl)
271}
272
273func (h *handler) deleteNode(ctx context.Context, node blob.Ref) error {
274 ucl, err := schema.NewDeleteClaim(node).SetSigner(h.signer).JSON()

Callers 1

updateTagsMethod · 0.95

Calls 4

signAndSendMethod · 0.95
NewAddAttributeClaimFunction · 0.92
SetSignerMethod · 0.80
JSONMethod · 0.45

Tested by

no test coverage detected