aboutsummaryrefslogtreecommitdiff
path: root/internal/gallery/query.go
blob: b66f99aaeacb4986953d6a10c0355d8bfd668c57 (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
package gallery

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
}