photoprism/internal/form/album_search.go
Michael Mayer c31470dafb Initial code for new Places UI
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-01-15 04:04:33 +01:00

27 lines
548 B
Go

package form
// AlbumSearch represents search form fields for "/api/v1/albums".
type AlbumSearch struct {
Query string `form:"q"`
Slug string `form:"slug"`
Name string `form:"name"`
Favorites bool `form:"favorites"`
Count int `form:"count" binding:"required"`
Offset int `form:"offset"`
Order string `form:"order"`
}
func (f *AlbumSearch) GetQuery() string {
return f.Query
}
func (f *AlbumSearch) SetQuery(q string) {
f.Query = q
}
func (f *AlbumSearch) ParseQueryString() error {
return ParseQueryString(f)
}