650817a9e0
Finding the right code is easier when the name matches related functionality in other packages.
30 lines
733 B
Go
30 lines
733 B
Go
package form
|
|
|
|
// SearchFaces represents search form fields for "/api/v1/faces".
|
|
type SearchFaces struct {
|
|
Query string `form:"q"`
|
|
ID string `form:"id"`
|
|
Subject string `form:"subject"`
|
|
Unknown string `form:"unknown"`
|
|
Hidden string `form:"hidden"`
|
|
Markers bool `form:"markers"`
|
|
Count int `form:"count" binding:"required" serialize:"-"`
|
|
Offset int `form:"offset" serialize:"-"`
|
|
Order string `form:"order" serialize:"-"`
|
|
}
|
|
|
|
func (f *SearchFaces) GetQuery() string {
|
|
return f.Query
|
|
}
|
|
|
|
func (f *SearchFaces) SetQuery(q string) {
|
|
f.Query = q
|
|
}
|
|
|
|
func (f *SearchFaces) ParseQueryString() error {
|
|
return ParseQueryString(f)
|
|
}
|
|
|
|
func NewFaceSearch(query string) SearchFaces {
|
|
return SearchFaces{Query: query}
|
|
}
|