MCPcopy
hub / github.com/perkeep/perkeep / setAttribute

Method setAttribute

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

Source from the content-addressed store, hash-verified

247}
248
249func (h *handler) setAttribute(ctx context.Context, pn blob.Ref, attr, val string) error {
250 ucl, err := schema.NewSetAttributeClaim(pn, attr, val).SetSigner(h.signer).JSON()
251 if err != nil {
252 return fmt.Errorf("could not create claim to set %v:%v on %v: %v", attr, val, pn, err)
253 }
254 return h.signAndSend(ctx, ucl)
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()

Callers 15

createScanMethod · 0.95
updateScanMethod · 0.95
updateDocumentMethod · 0.95
createDocumentMethod · 0.95
persistDocAndPagesMethod · 0.95
SizzleFunction · 0.80
jquery.jsFile · 0.80
faFunction · 0.80
jquery.min.jsFile · 0.80
numberLinesFunction · 0.80
CFunction · 0.80

Calls 4

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

Tested by

no test coverage detected