You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
624 B
32 lines
624 B
package log
|
|
|
|
// Filter for the List() function
|
|
type Filter struct {
|
|
Search *string
|
|
Characters *[]string
|
|
Channels *[]string
|
|
Events *[]string
|
|
Open *bool
|
|
Limit *int32
|
|
}
|
|
|
|
// NewFilter makes a new filter
|
|
func NewFilter() *Filter {
|
|
return &Filter{}
|
|
}
|
|
|
|
// WithLimit adds a max amount of results to be returned.
|
|
func (filter *Filter) WithLimit(limit int) *Filter {
|
|
limitPtr := int32(limit)
|
|
filter.Limit = &limitPtr
|
|
|
|
return filter
|
|
}
|
|
|
|
// WithOpen filters on whether a log is open.
|
|
func (filter *Filter) WithOpen(limit int) *Filter {
|
|
limitPtr := int32(limit)
|
|
filter.Limit = &limitPtr
|
|
|
|
return filter
|
|
}
|