filter

package
v0.0.0-...-3cb0c2f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Positive     *FilterSet `json:"p,omitempty"`
	Negative     *FilterSet `json:"n,omitempty"`
	OrderReverse bool       `json:"O,omitempty"`
	// For resume token work
	ResumeLastMtime *int64  `json:"r,omitempty"`
	ResumeLastBlob  *string `json:"R,omitempty"`
}

func FromSearchQuery

func FromSearchQuery(q string) *Filter

func FromSerialized

func FromSerialized(s string) (*Filter, error)

FromSerialized constructs a filter from the output of the Serialize() call.

func (*Filter) Resolve

func (f *Filter) Resolve(gr geoResolver) *Filter

Resolve invokes external functions to fill/resolve the given query.

func (*Filter) Serialize

func (f *Filter) Serialize() string

Serialize serialized the filter.

func (*Filter) SetResumeLastBlob

func (f *Filter) SetResumeLastBlob(s string)

func (*Filter) SetResumeLastMtime

func (f *Filter) SetResumeLastMtime(t int64)

type FilterSet

type FilterSet struct {
	Before        *time.Time `json:"t,omitempty"`
	After         *time.Time `json:"T,omitempty"`
	SizeMore      *int64     `json:"s,omitempty"`
	SizeLess      *int64     `json:"S,omitempty"`
	Tags          *[]string  `json:"x,omitempty"`
	MimeTypes     *[]string  `json:"y,omitempty"`
	Blobs         *[]string  `json:"B,omitempty"`
	LatitudeLess  *[]float64 `json:"a,omitempty"`
	LatitudeMore  *[]float64 `json:"A,omitempty"`
	LongitudeLess *[]float64 `json:"o,omitempty"`
	LongitudeMore *[]float64 `json:"O,omitempty"`
	// contains filtered or unexported fields
}

func (*FilterSet) AddBlobs

func (f *FilterSet) AddBlobs(b blid.Blid)

func (*FilterSet) AddLatitudeLess

func (f *FilterSet) AddLatitudeLess(l float64)

func (*FilterSet) AddLatitudeMore

func (f *FilterSet) AddLatitudeMore(l float64)

func (*FilterSet) AddLongitudeLess

func (f *FilterSet) AddLongitudeLess(l float64)

func (*FilterSet) AddLongitudeMore

func (f *FilterSet) AddLongitudeMore(l float64)

func (*FilterSet) AddMimeType

func (f *FilterSet) AddMimeType(m string)

func (*FilterSet) AddTag

func (f *FilterSet) AddTag(t string)

func (*FilterSet) SetLocation

func (f *FilterSet) SetLocation(l string)

func (*FilterSet) SetSizeLess

func (f *FilterSet) SetSizeLess(s int64)

func (*FilterSet) SetSizeMore

func (f *FilterSet) SetSizeMore(s int64)

func (*FilterSet) SetTimeAfter

func (f *FilterSet) SetTimeAfter(t time.Time)

func (*FilterSet) SetTimeBefore

func (f *FilterSet) SetTimeBefore(t time.Time)

type UnresolvedFilter

type UnresolvedFilter struct {
	Location *string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL