MCPcopy
hub / github.com/perkeep/perkeep / delAttribute

Method delAttribute

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

Source from the content-addressed store, hash-verified

255}
256
257func (h *handler) delAttribute(ctx context.Context, pn blob.Ref, attr, val string) error {
258 ucl, err := schema.NewDelAttributeClaim(pn, attr, val).SetSigner(h.signer).JSON()
259 if err != nil {
260 return fmt.Errorf("could not create claim to delete %v:%v on %v: %v", attr, val, pn, err)
261 }
262 return h.signAndSend(ctx, ucl)
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()

Callers 4

updateScanMethod · 0.95
updateDocumentMethod · 0.95
updateTagsMethod · 0.95
breakAndDeleteDocMethod · 0.95

Calls 4

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

Tested by

no test coverage detected