MCPcopy
hub / github.com/perkeep/perkeep / PermanodeConstraint

Struct PermanodeConstraint

pkg/search/query.go:679–752  ·  view source on GitHub ↗

PermanodeConstraint matches permanodes.

Source from the content-addressed store, hash-verified

677
678// PermanodeConstraint matches permanodes.
679type PermanodeConstraint struct {
680 // At specifies the time at which to pretend we're resolving attributes.
681 // Attribute claims after this point in time are ignored.
682 // If zero, the current time is used.
683 At time.Time `json:"at,omitempty"`
684
685 // ModTime optionally matches on the last modtime of the permanode.
686 ModTime *TimeConstraint `json:"modTime,omitempty"`
687
688 // Time optionally matches the permanode's time. A Permanode
689 // may not have a known time. If the permanode does not have a
690 // known time, one may be guessed if the top-level search
691 // parameters request so.
692 Time *TimeConstraint `json:"time,omitempty"`
693
694 // Attr optionally specifies the attribute to match.
695 // e.g. "camliContent", "camliMember", "tag"
696 // This is required if any of the items below are used.
697 Attr string `json:"attr,omitempty"`
698
699 // SkipHidden skips hidden or other boring files.
700 SkipHidden bool `json:"skipHidden,omitempty"`
701
702 // NumValue optionally tests the number of values this
703 // permanode has for Attr.
704 NumValue *IntConstraint `json:"numValue,omitempty"`
705
706 // ValueAll modifies the matching behavior when an attribute
707 // is multi-valued. By default, when ValueAll is false, only
708 // one value of a multi-valued attribute needs to match. If
709 // ValueAll is true, all attributes must match.
710 ValueAll bool `json:"valueAllMatch,omitempty"`
711
712 // Value specifies an exact string to match.
713 // This is a convenience form for the simple case of exact
714 // equality. The same can be accomplished with ValueMatches.
715 Value string `json:"value,omitempty"` // if non-zero, absolute match
716
717 // ValueMatches optionally specifies a StringConstraint to
718 // match the value against.
719 ValueMatches *StringConstraint `json:"valueMatches,omitempty"`
720
721 // ValueMatchesInt optionally specifies an IntConstraint to match
722 // the value against. Non-integer values will not match.
723 ValueMatchesInt *IntConstraint `json:"valueMatchesInt,omitempty"`
724
725 // ValueMatchesFloat optionally specifies a FloatConstraint to match
726 // the value against. Non-float values will not match.
727 ValueMatchesFloat *FloatConstraint `json:"valueMatchesFloat,omitempty"`
728
729 // ValueInSet optionally specifies a sub-query which the value
730 // (which must be a blobref) must be a part of.
731 ValueInSet *Constraint `json:"valueInSet,omitempty"`
732
733 // Relation optionally specifies a constraint based on relations
734 // to other permanodes (e.g. camliMember or camliPath sets).
735 // You can use it to test the properties of a parent, ancestor,
736 // child, or progeny.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected