photoprism/internal/form/account_search.go
Michael Mayer 1d667ada79 Backend: Add account API #225
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-03-28 15:29:17 +01:00

25 lines
572 B
Go

package form
// AccountSearch represents search form fields for "/api/v1/accounts".
type AccountSearch struct {
Query string `form:"q"`
Count int `form:"count" binding:"required"`
Offset int `form:"offset"`
Order string `form:"order"`
}
func (f *AccountSearch) GetQuery() string {
return f.Query
}
func (f *AccountSearch) SetQuery(q string) {
f.Query = q
}
func (f *AccountSearch) ParseQueryString() error {
return ParseQueryString(f)
}
func NewAccountSearch(query string) AccountSearch {
return AccountSearch{Query: query}
}