Documentation ¶
Overview ¶
See reference at https://sldn.softlayer.com/article/object-filters. Examples in the README.md file and in the examples directory.
Index ¶
- func Build(args ...Filter) string
- type Filter
- func (f Filter) Build() string
- func (f Filter) Contains(val interface{}) Filter
- func (f Filter) Date(date string) Filter
- func (f Filter) DateAfter(date string) Filter
- func (f Filter) DateBefore(date string) Filter
- func (f Filter) DateBetween(start string, end string) Filter
- func (f Filter) DaysPast(val interface{}) Filter
- func (f Filter) EndsWith(val interface{}) Filter
- func (f Filter) Eq(val interface{}) Filter
- func (f Filter) GreaterThan(val interface{}) Filter
- func (f Filter) GreaterThanOrEqual(val interface{}) Filter
- func (f Filter) In(args ...interface{}) Filter
- func (f Filter) IsNull() Filter
- func (f Filter) LessThan(val interface{}) Filter
- func (f Filter) LessThanOrEqual(val interface{}) Filter
- func (f Filter) Like(val interface{}) Filter
- func (f Filter) NotContains(val interface{}) Filter
- func (f Filter) NotEndsWith(val interface{}) Filter
- func (f Filter) NotEq(val interface{}) Filter
- func (f Filter) NotLike(val interface{}) Filter
- func (f Filter) NotNull() Filter
- func (f Filter) NotStartsWith(val interface{}) Filter
- func (f Filter) Opt(name string, value interface{}) Filter
- func (f Filter) OrderBy(direction string) Filter
- func (f Filter) StartsWith(val interface{}) Filter
- type Filters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Filter ¶
func Path ¶
This creates a new Filter. The path is a dot-delimited path down to the attribute this filter is for. The second value parameter is optional.
func (Filter) DateBefore ¶
Set this filter to test if property has a date before the value.
func (Filter) DateBetween ¶
Set this filter to test if property has a date between the values.
func (Filter) DaysPast ¶
Set this filter to test if property has a date older than the value in days.
func (Filter) GreaterThan ¶
Set this filter to test if property is greater than value
func (Filter) GreaterThanOrEqual ¶
Set this filter to test if property is greater than or equal to value
func (Filter) LessThanOrEqual ¶
Set this filter to test if property is less than or equal to the value
func (Filter) NotContains ¶
Set this filter to test if property does not contain the value
func (Filter) NotEndsWith ¶
Set this filter to test if property does not end with the value
func (Filter) NotStartsWith ¶
Set this filter to test if property does not start with the value
func (Filter) OrderBy ¶ added in v1.0.4
Support for orderBy filters, only 1 orderBy is supported per filter.
func (Filter) StartsWith ¶
Set this filter to test if property starts with the value