mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-11 16:24:11 +01:00
15 lines
331 B
Go
15 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)
|
|
}
|