MCPcopy
hub / github.com/perkeep/perkeep / SetShareSearch

Method SetShareSearch

pkg/schema/blob.go:383–389  ·  view source on GitHub ↗

SetShareSearch sets the search of share claim. q is assumed to be of type *search.SearchQuery. It panics if bb isn't a "share" claim type.

(q SearchQuery)

Source from the content-addressed store, hash-verified

381// q is assumed to be of type *search.SearchQuery.
382// It panics if bb isn't a "share" claim type.
383func (bb *Builder) SetShareSearch(q SearchQuery) *Builder {
384 if bb.Type() != TypeClaim || bb.ClaimType() != ShareClaim {
385 panic("called SetShareSearch on non-share")
386 }
387 bb.m["search"] = q
388 return bb
389}
390
391// SetShareExpiration sets the expiration time on share claim.
392// It panics if bb isn't a "share" claim type.

Callers 3

TestAsClaimAndAsShareFunction · 0.80
RunCommandMethod · 0.80

Calls 2

TypeMethod · 0.95
ClaimTypeMethod · 0.95

Tested by 2

TestAsClaimAndAsShareFunction · 0.64