MCPcopy
hub / github.com/perkeep/perkeep / SetShareTarget

Method SetShareTarget

pkg/schema/blob.go:372–378  ·  view source on GitHub ↗

SetShareTarget sets the target of share claim. It panics if bb isn't a "share" claim type.

(t blob.Ref)

Source from the content-addressed store, hash-verified

370// SetShareTarget sets the target of share claim.
371// It panics if bb isn't a "share" claim type.
372func (bb *Builder) SetShareTarget(t blob.Ref) *Builder {
373 if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim {
374 panic("called SetShareTarget on non-share")
375 }
376 bb.m["target"] = t.String()
377 return bb
378}
379
380// SetShareSearch sets the search of share claim.
381// q is assumed to be of type *search.SearchQuery.

Callers 8

TestHandleGetViaSharingFunction · 0.80
TestHandleShareDeletionFunction · 0.80
TestAsClaimAndAsShareFunction · 0.80
TestClaimDateFunction · 0.80
RunCommandMethod · 0.80

Calls 3

TypeMethod · 0.95
ClaimTypeMethod · 0.95
StringMethod · 0.45

Tested by 7

TestHandleGetViaSharingFunction · 0.64
TestHandleShareDeletionFunction · 0.64
TestAsClaimAndAsShareFunction · 0.64
TestClaimDateFunction · 0.64