Documentation ¶
Overview ¶
Package filter defines which tickets pass which filters. Other implementations which help filter tickets (eg, a range index lookup) must conform to the same set of tickets being within the filter as here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilteredEntity ¶
type FilteredEntity interface { GetId() string GetSearchFields() *pb.SearchFields GetCreateTime() *timestamp.Timestamp }
FilteredEntity provides an interface for filterable items
type Manager ¶
type Manager interface {
ProfileMembershipTest(fe FilteredEntity) (string, string, error)
}
Manager provides an interface for filtering FilteredEntity into MatchProfile and Pools
func NewManager ¶
func NewManager(profiles []*pb.MatchProfile) Manager
NewManager returns a filter Manager
type PoolFilter ¶
type PoolFilter struct { DoubleRangeFilters []*pb.DoubleRangeFilter StringEqualsFilters []*pb.StringEqualsFilter TagPresentFilters []*pb.TagPresentFilter CreatedBefore time.Time CreatedAfter time.Time }
PoolFilter contains all the filtering criteria from a Pool that the Ticket needs to meet to belong to that Pool.
func NewPoolFilter ¶
func NewPoolFilter(pool *pb.Pool) (*PoolFilter, error)
NewPoolFilter validates a Pool's filtering criteria and returns a PoolFilter.
func (*PoolFilter) In ¶
func (pf *PoolFilter) In(entity FilteredEntity) bool
In returns true if the Ticket meets all the criteria for this PoolFilter.