Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var WithinKmOptions = []int{1, 5, 10, 25, 50, 100, 500, 1000}
WithinKmOptions are valid search within-distance dropdown values (kilometers).
var WithinMileOptions = []int{1, 5, 10, 25, 50, 100, 500, 1000}
WithinMileOptions are valid search within-distance dropdown values (miles).
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct {
CategoryID int
UserID int
Limit int
Offset int
Q string
FacetFilters map[string]facet.Filter
// CenterLat/CenterLon and WithinKm apply when location text resolved and within > 0.
CenterLat float64
CenterLon float64
WithinKm float64
HasGeo bool
}
Params holds hard filters for listing search.
func BuildParams ¶
func BuildParams(categoryID, limit, offset int, q, locationText string, within int, withinUnit string, facetFilters map[string]facet.Filter) Params
BuildParams converts filter fields into search Params, resolving geo when applicable.