mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
14 lines
331 B
Go
14 lines
331 B
Go
package form
|
|
|
|
// SearchForm defines the minimal interface for query string parsing.
|
|
type SearchForm interface {
|
|
GetQuery() string
|
|
SetQuery(q string)
|
|
}
|
|
|
|
// ParseQueryString populates the search form fields from its query string.
|
|
func ParseQueryString(f SearchForm) (result error) {
|
|
q := f.GetQuery()
|
|
|
|
return Unserialize(f, q)
|
|
}
|