Documentation ¶
Index ¶
- type DateTimeRange
- func (f *DateTimeRange) After(value time.Time) *DateTimeRange
- func (f *DateTimeRange) AfterMarshalLayout(layout string) *DateTimeRange
- func (f *DateTimeRange) Appender() applyFn
- func (f *DateTimeRange) Before(value time.Time) *DateTimeRange
- func (f *DateTimeRange) BeforeMarshalLayout(layout string) *DateTimeRange
- func (f *DateTimeRange) Column(column string) *DateTimeRange
- func (f *DateTimeRange) From(value time.Time) *DateTimeRange
- func (f *DateTimeRange) FromMarshalLayout(layout string) *DateTimeRange
- func (f *DateTimeRange) Layout(layouts ...string) *DateTimeRange
- func (f *DateTimeRange) MarshalJSON() ([]byte, error)
- func (f *DateTimeRange) To(value time.Time) *DateTimeRange
- func (f *DateTimeRange) ToMarshalLayout(layout string) *DateTimeRange
- func (f *DateTimeRange) UnmarshalJSON(b []byte) error
- type Exists
- func (f *Exists) Appender() (string, interface{}, interface{})
- func (f *Exists) Column(column string) *Exists
- func (f *Exists) Exists(value bool) *Exists
- func (f *Exists) MarshalJSON() ([]byte, error)
- func (f *Exists) ShouldExists() *Exists
- func (f *Exists) ShouldNotExists() *Exists
- func (f *Exists) UnmarshalJSON(b []byte) error
- type KeywordSearch
- func (f *KeywordSearch) Appender() (string, interface{}, interface{}, interface{})
- func (f *KeywordSearch) CaseInsensitive() *KeywordSearch
- func (f *KeywordSearch) Column(column string) *KeywordSearch
- func (f *KeywordSearch) Keyword(keyword string) *KeywordSearch
- func (f *KeywordSearch) MarshalJSON() ([]byte, error)
- func (f *KeywordSearch) MatchAll() *KeywordSearch
- func (f *KeywordSearch) MatchEnd() *KeywordSearch
- func (f *KeywordSearch) MatchStart() *KeywordSearch
- func (f *KeywordSearch) UnmarshalJSON(b []byte) error
- type Match
- type OffsetPagination
- type Order
- type OrderDirection
- type Range
- type RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoCentury(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoDay(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoDecade(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoHour(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoMicrosecond(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoMillennium(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoMillisecond(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoMinute(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoMonth(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoSecond(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoWeek(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) AgoYear(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) Appender() applyFn
- func (f *RelativeDateTimeRange) AsAt(at time.Time) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) Column(column string) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) Layout(layouts ...string) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) MarshalJSON() ([]byte, error)
- func (f *RelativeDateTimeRange) MarshalLayout(layout string) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UnmarshalJSON(b []byte) error
- func (f *RelativeDateTimeRange) UpcomingCentury(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingDay(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingDecade(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingHour(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingMicrosecond(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingMillennium(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingMillisecond(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingMinute(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingMonth(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingSecond(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingWeek(value int) *RelativeDateTimeRange
- func (f *RelativeDateTimeRange) UpcomingYear(value int) *RelativeDateTimeRange
- type RelativeDateTimeRangeUnitOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateTimeRange ¶
type DateTimeRange struct { Gt *time.Time `json:"after,omitempty"` Gte *time.Time `json:"from,omitempty"` Lt *time.Time `json:"before,omitempty"` Lte *time.Time `json:"to,omitempty"` // contains filtered or unexported fields }
DateTimeRange common datetime range filter.
func NewDateTimeRange ¶
func NewDateTimeRange(column string, layouts ...string) *DateTimeRange
NewDateTimeRange initializes a new datetime range filter.
func (*DateTimeRange) After ¶
func (f *DateTimeRange) After(value time.Time) *DateTimeRange
After set value for after (gt).
func (*DateTimeRange) AfterMarshalLayout ¶
func (f *DateTimeRange) AfterMarshalLayout(layout string) *DateTimeRange
AfterMarshalLayout set marshal layout for after (gt).
func (*DateTimeRange) Appender ¶
func (f *DateTimeRange) Appender() applyFn
Appender returns parameters for cond group appender.
func (*DateTimeRange) Before ¶
func (f *DateTimeRange) Before(value time.Time) *DateTimeRange
Before set value for before (lt).
func (*DateTimeRange) BeforeMarshalLayout ¶
func (f *DateTimeRange) BeforeMarshalLayout(layout string) *DateTimeRange
BeforeMarshalLayout set marshal layout for before (lt).
func (*DateTimeRange) Column ¶
func (f *DateTimeRange) Column(column string) *DateTimeRange
Column sets the column for the datetime range filter.
func (*DateTimeRange) From ¶
func (f *DateTimeRange) From(value time.Time) *DateTimeRange
From set value for from (gte).
func (*DateTimeRange) FromMarshalLayout ¶
func (f *DateTimeRange) FromMarshalLayout(layout string) *DateTimeRange
FromMarshalLayout set marshal layout for from (gte).
func (*DateTimeRange) Layout ¶
func (f *DateTimeRange) Layout(layouts ...string) *DateTimeRange
Layout sets the parsing layout(s) for the datetime range filter.
func (*DateTimeRange) MarshalJSON ¶
func (f *DateTimeRange) MarshalJSON() ([]byte, error)
MarshalJSON custom JSON marshaler.
func (*DateTimeRange) To ¶
func (f *DateTimeRange) To(value time.Time) *DateTimeRange
To set value for to (lte).
func (*DateTimeRange) ToMarshalLayout ¶
func (f *DateTimeRange) ToMarshalLayout(layout string) *DateTimeRange
ToMarshalLayout set marshal layout for to (lte).
func (*DateTimeRange) UnmarshalJSON ¶
func (f *DateTimeRange) UnmarshalJSON(b []byte) error
UnmarshalJSON custom JSON unmarshaler.
type Exists ¶
type Exists struct { Value *bool `json:"value,omitempty"` // contains filtered or unexported fields }
Exists exists common filter.
func (*Exists) MarshalJSON ¶
MarshalJSON custom JSON marshaler.
func (*Exists) ShouldExists ¶
ShouldExists set value to true.
func (*Exists) ShouldNotExists ¶
ShouldNotExists set value to false.
func (*Exists) UnmarshalJSON ¶
UnmarshalJSON custom JSON unmarshaler.
type KeywordSearch ¶
type KeywordSearch struct { Value *string `json:"value,omitempty"` // contains filtered or unexported fields }
KeywordSearch keyword search common filter.
func NewKeywordSearch ¶
func NewKeywordSearch(column string) *KeywordSearch
NewKeywordSearch initializes a new keyword search filter.
func (*KeywordSearch) Appender ¶
func (f *KeywordSearch) Appender() (string, interface{}, interface{}, interface{})
Appender returns parameters for cond appender.
func (*KeywordSearch) CaseInsensitive ¶
func (f *KeywordSearch) CaseInsensitive() *KeywordSearch
CaseInsensitive set keyword case insensitive for the keyword search filter.
func (*KeywordSearch) Column ¶
func (f *KeywordSearch) Column(column string) *KeywordSearch
Column set the column for the keyword search filter. Suffix column with ",array" to use array search.
func (*KeywordSearch) Keyword ¶
func (f *KeywordSearch) Keyword(keyword string) *KeywordSearch
Keyword set value.
func (*KeywordSearch) MarshalJSON ¶
func (f *KeywordSearch) MarshalJSON() ([]byte, error)
MarshalJSON custom JSON marshaler.
func (*KeywordSearch) MatchAll ¶
func (f *KeywordSearch) MatchAll() *KeywordSearch
MatchAll set keyword match all for the keyword search filter.
func (*KeywordSearch) MatchEnd ¶
func (f *KeywordSearch) MatchEnd() *KeywordSearch
MatchEnd set keyword match end for the keyword search filter.
func (*KeywordSearch) MatchStart ¶
func (f *KeywordSearch) MatchStart() *KeywordSearch
MatchStart set keyword match start for the keyword search filter.
func (*KeywordSearch) UnmarshalJSON ¶
func (f *KeywordSearch) UnmarshalJSON(b []byte) error
UnmarshalJSON custom JSON unmarshaler.
type Match ¶
type Match struct { Values []interface{} `json:"values,omitempty"` // contains filtered or unexported fields }
Match match common filter.
func (*Match) MarshalJSON ¶
MarshalJSON custom JSON marshaler.
func (*Match) UnmarshalJSON ¶
UnmarshalJSON custom JSON unmarshaler.
type OffsetPagination ¶
type OffsetPagination struct { Page int `json:"page,omitempty"` Limit *int `json:"limit,omitempty"` }
OffsetPagination pagination common filter. Offset pagination is skipped when no limit is provided.
func NewOffsetPagination ¶
func NewOffsetPagination() *OffsetPagination
NewOffsetPagination initializes a new pagination filter.
func (*OffsetPagination) Appender ¶
func (f *OffsetPagination) Appender() applyFn
Appender returns parameters for cond group appender.
func (*OffsetPagination) Offset ¶
func (f *OffsetPagination) Offset(page int, limit int) *OffsetPagination
Offset sets offset value for the pagination filter.
type Order ¶
type Order struct { Direction *OrderDirection `json:"direction,omitempty"` // contains filtered or unexported fields }
Order order common sorter.
func NewOrderAsc ¶
NewOrderAsc initializes a new ascending order sorter.
func NewOrderDesc ¶
NewOrderDesc initializes a new order sorter.
func (*Order) MarshalJSON ¶
MarshalJSON custom JSON marshaler.
func (*Order) UnmarshalJSON ¶
UnmarshalJSON custom JSON unmarshaler.
type OrderDirection ¶
type OrderDirection int
OrderDirection order direction enum type.
const ( // OrderDirectionAsc order direction ascending enum. OrderDirectionAsc OrderDirection = iota // OrderDirectionDesc order direction descending enum. OrderDirectionDesc )
func (OrderDirection) String ¶
func (d OrderDirection) String() string
String returns the string presentation for the order direction.
type Range ¶
type Range struct { Gt *int `json:"gt,omitempty"` Gte *int `json:"gte,omitempty"` Lt *int `json:"lt,omitempty"` Lte *int `json:"lte,omitempty"` // contains filtered or unexported fields }
Range range common filter.
func (*Range) Appender ¶
func (f *Range) Appender() applyFn
Appender returns parameters for cond group appender.
func (*Range) GreaterThan ¶
GreaterThan set value for greater than (gt).
func (*Range) GreaterThanEqual ¶
GreaterThanEqual set value for greater than (gte).
func (*Range) LessThanEqual ¶
LessThanEqual set value for less than equal (lte).
type RelativeDateTimeRange ¶
type RelativeDateTimeRange struct { Ago *RelativeDateTimeRangeUnitOption `json:"ago,omitempty"` Upcoming *RelativeDateTimeRangeUnitOption `json:"upcoming,omitempty"` At *time.Time `json:"at,omitempty"` // contains filtered or unexported fields }
RelativeDateTimeRange relative datetime range common filter.
func NewRelativeDateTimeRange ¶
func NewRelativeDateTimeRange(column string, layouts ...string) *RelativeDateTimeRange
NewRelativeDateTimeRange initializes a new relative datetime filter.
func (*RelativeDateTimeRange) AgoCentury ¶
func (f *RelativeDateTimeRange) AgoCentury(value int) *RelativeDateTimeRange
AgoCentury set century for ago.
func (*RelativeDateTimeRange) AgoDay ¶
func (f *RelativeDateTimeRange) AgoDay(value int) *RelativeDateTimeRange
AgoDay set day for ago.
func (*RelativeDateTimeRange) AgoDecade ¶
func (f *RelativeDateTimeRange) AgoDecade(value int) *RelativeDateTimeRange
AgoDecade set decade for ago.
func (*RelativeDateTimeRange) AgoHour ¶
func (f *RelativeDateTimeRange) AgoHour(value int) *RelativeDateTimeRange
AgoHour set hour for ago.
func (*RelativeDateTimeRange) AgoMicrosecond ¶
func (f *RelativeDateTimeRange) AgoMicrosecond(value int) *RelativeDateTimeRange
AgoMicrosecond set microsecond for ago.
func (*RelativeDateTimeRange) AgoMillennium ¶
func (f *RelativeDateTimeRange) AgoMillennium(value int) *RelativeDateTimeRange
AgoMillennium set millennium for ago.
func (*RelativeDateTimeRange) AgoMillisecond ¶
func (f *RelativeDateTimeRange) AgoMillisecond(value int) *RelativeDateTimeRange
AgoMillisecond set millisecond for ago.
func (*RelativeDateTimeRange) AgoMinute ¶
func (f *RelativeDateTimeRange) AgoMinute(value int) *RelativeDateTimeRange
AgoMinute set minute for ago.
func (*RelativeDateTimeRange) AgoMonth ¶
func (f *RelativeDateTimeRange) AgoMonth(value int) *RelativeDateTimeRange
AgoMonth set month for ago.
func (*RelativeDateTimeRange) AgoSecond ¶
func (f *RelativeDateTimeRange) AgoSecond(value int) *RelativeDateTimeRange
AgoSecond set second for ago.
func (*RelativeDateTimeRange) AgoWeek ¶
func (f *RelativeDateTimeRange) AgoWeek(value int) *RelativeDateTimeRange
AgoWeek set week for ago.
func (*RelativeDateTimeRange) AgoYear ¶
func (f *RelativeDateTimeRange) AgoYear(value int) *RelativeDateTimeRange
AgoYear set year for ago.
func (*RelativeDateTimeRange) Appender ¶
func (f *RelativeDateTimeRange) Appender() applyFn
Appender returns parameters for cond group appender.
func (*RelativeDateTimeRange) AsAt ¶
func (f *RelativeDateTimeRange) AsAt(at time.Time) *RelativeDateTimeRange
AsAt set value.
func (*RelativeDateTimeRange) Column ¶
func (f *RelativeDateTimeRange) Column(column string) *RelativeDateTimeRange
Column sets the column for the relative datetime filter.
func (*RelativeDateTimeRange) Layout ¶
func (f *RelativeDateTimeRange) Layout(layouts ...string) *RelativeDateTimeRange
Layout sets the parsing layout(s) for the relative datetime filter.
func (*RelativeDateTimeRange) MarshalJSON ¶
func (f *RelativeDateTimeRange) MarshalJSON() ([]byte, error)
MarshalJSON custom JSON marshaler.
func (*RelativeDateTimeRange) MarshalLayout ¶
func (f *RelativeDateTimeRange) MarshalLayout(layout string) *RelativeDateTimeRange
MarshalLayout set marshal layout.
func (*RelativeDateTimeRange) UnmarshalJSON ¶
func (f *RelativeDateTimeRange) UnmarshalJSON(b []byte) error
UnmarshalJSON custom JSON unmarshaler.
func (*RelativeDateTimeRange) UpcomingCentury ¶
func (f *RelativeDateTimeRange) UpcomingCentury(value int) *RelativeDateTimeRange
UpcomingCentury set century for upcoming.
func (*RelativeDateTimeRange) UpcomingDay ¶
func (f *RelativeDateTimeRange) UpcomingDay(value int) *RelativeDateTimeRange
UpcomingDay set day for upcoming.
func (*RelativeDateTimeRange) UpcomingDecade ¶
func (f *RelativeDateTimeRange) UpcomingDecade(value int) *RelativeDateTimeRange
UpcomingDecade set decade for upcoming.
func (*RelativeDateTimeRange) UpcomingHour ¶
func (f *RelativeDateTimeRange) UpcomingHour(value int) *RelativeDateTimeRange
UpcomingHour set hour for upcoming.
func (*RelativeDateTimeRange) UpcomingMicrosecond ¶
func (f *RelativeDateTimeRange) UpcomingMicrosecond(value int) *RelativeDateTimeRange
UpcomingMicrosecond set microsecond for upcoming.
func (*RelativeDateTimeRange) UpcomingMillennium ¶
func (f *RelativeDateTimeRange) UpcomingMillennium(value int) *RelativeDateTimeRange
UpcomingMillennium set millennium for upcoming.
func (*RelativeDateTimeRange) UpcomingMillisecond ¶
func (f *RelativeDateTimeRange) UpcomingMillisecond(value int) *RelativeDateTimeRange
UpcomingMillisecond set millisecond for upcoming.
func (*RelativeDateTimeRange) UpcomingMinute ¶
func (f *RelativeDateTimeRange) UpcomingMinute(value int) *RelativeDateTimeRange
UpcomingMinute set minute for upcoming.
func (*RelativeDateTimeRange) UpcomingMonth ¶
func (f *RelativeDateTimeRange) UpcomingMonth(value int) *RelativeDateTimeRange
UpcomingMonth set month for upcoming.
func (*RelativeDateTimeRange) UpcomingSecond ¶
func (f *RelativeDateTimeRange) UpcomingSecond(value int) *RelativeDateTimeRange
UpcomingSecond set second for upcoming.
func (*RelativeDateTimeRange) UpcomingWeek ¶
func (f *RelativeDateTimeRange) UpcomingWeek(value int) *RelativeDateTimeRange
UpcomingWeek set week for upcoming.
func (*RelativeDateTimeRange) UpcomingYear ¶
func (f *RelativeDateTimeRange) UpcomingYear(value int) *RelativeDateTimeRange
UpcomingYear set year for upcoming.
type RelativeDateTimeRangeUnitOption ¶
type RelativeDateTimeRangeUnitOption struct { Century *int `json:"century,omitempty"` Day *int `json:"day,omitempty"` Decade *int `json:"decade,omitempty"` Hour *int `json:"hour,omitempty"` Microsecond *int `json:"microsecond,omitempty"` Millennium *int `json:"millennium,omitempty"` Millisecond *int `json:"millisecond,omitempty"` Minute *int `json:"minute,omitempty"` Month *int `json:"month,omitempty"` Second *int `json:"second,omitempty"` Week *int `json:"week,omitempty"` Year *int `json:"year,omitempty"` }
RelativeDateTimeRangeUnitOption relative datetime range unit option.