2021-09-18 15:32:39 +02:00
|
|
|
package form
|
|
|
|
|
|
|
|
// FaceSearch represents search form fields for "/api/v1/faces".
|
|
|
|
type FaceSearch struct {
|
|
|
|
Query string `form:"q"`
|
|
|
|
ID string `form:"id"`
|
|
|
|
Subject string `form:"subject"`
|
2021-09-18 20:41:30 +02:00
|
|
|
Unknown string `form:"unknown"`
|
|
|
|
Hidden string `form:"hidden"`
|
2021-09-18 15:32:39 +02:00
|
|
|
Markers bool `form:"markers"`
|
|
|
|
Count int `form:"count" binding:"required" serialize:"-"`
|
|
|
|
Offset int `form:"offset" serialize:"-"`
|
|
|
|
Order string `form:"order" serialize:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *FaceSearch) GetQuery() string {
|
|
|
|
return f.Query
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *FaceSearch) SetQuery(q string) {
|
|
|
|
f.Query = q
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *FaceSearch) ParseQueryString() error {
|
|
|
|
return ParseQueryString(f)
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewFaceSearch(query string) FaceSearch {
|
|
|
|
return FaceSearch{Query: query}
|
|
|
|
}
|