2018-08-15 09:59:51 +02:00
|
|
|
package forms
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2018-11-06 19:02:03 +01:00
|
|
|
// Query parameters for GET /api/v1/photos
|
2018-08-15 09:59:51 +02:00
|
|
|
type PhotoSearchForm struct {
|
|
|
|
Query string `form:"q"`
|
|
|
|
Tags string `form:"tags"`
|
2018-09-19 00:53:39 +02:00
|
|
|
Cat string `form:"cat"`
|
2018-08-15 09:59:51 +02:00
|
|
|
Country string `form:"country"`
|
2018-09-18 23:24:19 +02:00
|
|
|
CameraID int `form:"camera"`
|
2018-08-15 09:59:51 +02:00
|
|
|
Order string `form:"order"`
|
|
|
|
Count int `form:"count" binding:"required"`
|
|
|
|
Offset int `form:"offset"`
|
|
|
|
Before time.Time `form:"before" time_format:"2006-01-02"`
|
|
|
|
After time.Time `form:"after" time_format:"2006-01-02"`
|
2018-11-06 10:28:44 +01:00
|
|
|
FavoritesOnly bool `form:"favorites"`
|
2018-08-15 09:59:51 +02:00
|
|
|
}
|