aboutsummaryrefslogtreecommitdiff
path: root/internal/gallery/query.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/gallery/query.go')
-rw-r--r--internal/gallery/query.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/gallery/query.go b/internal/gallery/query.go
index fd11762..f528906 100644
--- a/internal/gallery/query.go
+++ b/internal/gallery/query.go
@@ -1,9 +1,27 @@
package gallery
+type SortField string
+
+const (
+ SortByDateTime 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
}