aboutsummaryrefslogtreecommitdiff
path: root/internal/gallery/query.go
blob: 355aa2e944c00107d2254aa2c76fb6a4793f3b7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package gallery

import "time"

type SortField string

const (
	SortByDateTaken SortField = "dateTaken"
	SortByPath      SortField = "path"
)

// SortOrder identifies the sort direction
type SortOrder string

const (
	SortAsc  SortOrder = "asc"
	SortDesc SortOrder = "desc"
)

// Query describes how photos should be selected.
//
// The zero value returns the entire gallery.
type Query struct {
	Limit  int
	Offset int

	Sort  SortField
	Order SortOrder

	Extension string
	Search    string

	From time.Time
	To   time.Time
}