Documentation
¶
Overview ¶
Package filter holds the filters used by a ListBy query.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EqFilter ¶
type EqFilter struct {
// contains filtered or unexported fields
}
EqFilter matches a field by an exact value.
func (EqFilter) IsOptional ¶
IsOptional reports if the filter can be skipped at call time.
type Filter ¶
type Filter interface {
Filter()
// GetField returns the field the filter works on.
GetField() string
// IsOptional reports if the filter can be skipped at call time.
IsOptional() bool
}
Filter is one condition on a field in a ListBy query.
type RangeFilter ¶
type RangeFilter struct {
// contains filtered or unexported fields
}
RangeFilter matches values between a lower and an upper bound.
func Range ¶
func Range(field string) RangeFilter
Range filters a field by a lower and an upper bound.
func (RangeFilter) GetField ¶
func (rf RangeFilter) GetField() string
GetField returns the field the filter works on.
func (RangeFilter) IsOptional ¶
func (rf RangeFilter) IsOptional() bool
IsOptional reports if the filter can be skipped at call time.
func (RangeFilter) Optional ¶
func (rf RangeFilter) Optional() RangeFilter
Optional makes the filter skippable at call time.
type SearchFilter ¶
type SearchFilter struct {
// contains filtered or unexported fields
}
SearchFilter matches a field by a text pattern.
func (SearchFilter) GetField ¶
func (sf SearchFilter) GetField() string
GetField returns the field the filter works on.
func (SearchFilter) IsOptional ¶
func (sf SearchFilter) IsOptional() bool
IsOptional reports if the filter can be skipped at call time.
func (SearchFilter) Optional ¶
func (sf SearchFilter) Optional() SearchFilter
Optional makes the filter skippable at call time.