Documentation
¶
Index ¶
Constants ¶
View Source
const ( LatKey = "lat" LonKey = "lon" )
Variables ¶
Functions ¶
func Idx ¶
func Idx(p ...string) []contract.IndexEntry
func IdxSrch ¶
func IdxSrch(p ...string) []contract.SearchIndexEntry
func Rules ¶
func Rules(p ...string) contractpkg.QueryParamRules
Types ¶
type Core ¶
type Core struct {
Lat *float64 `json:"lat" validate:"nnpt"`
Lon *float64 `json:"lon" validate:"nnpt"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithLat ¶
func WithLat(x float64) CoreOption
func WithLatLon ¶
func WithLatLon(x float64, y float64) CoreOption
func WithLon ¶
func WithLon(x float64) CoreOption
type LatLon ¶
type LatLon struct {
Meta `bson:",inline" validate:"recurse"`
Core `bson:",inline" validate:"recurse"`
}
LatLon represents a latitude and longitude.
func MockMontreal ¶
func MockMontreal() *LatLon
func MockNashville ¶
func MockNashville() *LatLon
func MockNewYork ¶
func MockNewYork() *LatLon
type Meta ¶
type Meta struct{}
func ApplyMeta ¶
func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
Click to show internal directories.
Click to hide internal directories.