Documentation
¶
Index ¶
- Constants
- func Idx() []contract.IndexEntry
- func IdxSrch() []contract.SearchIndexEntry
- func Rules() contractpkg.QueryParamRules
- type Address
- type Comp
- type Core
- func (c *Core) GetCity() string
- func (c *Core) GetCountry() string
- func (c *Core) GetFormattedAddress() string
- func (c *Core) GetLatitude() float64
- func (c *Core) GetLongitude() float64
- func (c *Core) GetPlaceID() string
- func (c *Core) GetPlaceName() string
- func (c *Core) GetPostalCode() string
- func (c *Core) GetState() string
- func (c *Core) GetStreet() string
- func (c *Core) SetCity(x string)
- func (c *Core) SetCountry(x string)
- func (c *Core) SetFormattedAddress(x string)
- func (c *Core) SetLatitude(x float64)
- func (c *Core) SetLongitude(x float64)
- func (c *Core) SetPlaceID(x string)
- func (c *Core) SetPlaceName(x string)
- func (c *Core) SetPostalCode(x string)
- func (c *Core) SetState(x string)
- func (c *Core) SetStreet(x string)
- type CoreOption
- func WithCity(x string) CoreOption
- func WithCountry(x string) CoreOption
- func WithFormattedAddress(x string) CoreOption
- func WithLatitude(x float64) CoreOption
- func WithLongitude(x float64) CoreOption
- func WithPlaceID(x string) CoreOption
- func WithPlaceName(x string) CoreOption
- func WithPostalCode(x string) CoreOption
- func WithState(x string) CoreOption
- func WithStreet(x string) CoreOption
- type Meta
- type MetaOption
Constants ¶
View Source
const ( StreetKey = "street" CityKey = "city" StateKey = "state" PostalCodeKey = "postal_code" CountryKey = "country" LatitudeKey = "latitude" LongitudeKey = "longitude" PlaceIDKey = "place_id" FormattedAddressKey = "formatted_address" PlaceNameKey = "place_name" )
View Source
const (
AddressTimezoneKey = "address_timezone"
)
Variables ¶
This section is empty.
Functions ¶
func Idx ¶
func Idx() []contract.IndexEntry
func IdxSrch ¶
func IdxSrch() []contract.SearchIndexEntry
func Rules ¶
func Rules() contractpkg.QueryParamRules
Types ¶
type Address ¶
type Address struct {
Meta `bson:",inline" validate:"recurse"`
Comp `bson:",inline" validate:"recurse"`
Core `bson:",inline" validate:"recurse"`
}
Address defines a location from Google’s place picker.
type Comp ¶
type Comp struct {
AddressTimezone *string `json:"address_timezone" validate:"nnpt,nz,tz"`
}
func (*Comp) GetAddressTimezone ¶ added in v0.0.73
func (*Comp) SetAddressTimezone ¶ added in v0.0.73
type Core ¶
type Core struct {
FormattedAddress *string `json:"formatted_address" validate:"nnpt"`
PlaceName *string `json:"place_name" validate:"nnpt"`
Street *string `json:"street" conform:"trim,lower" validate:"nnpt"`
City *string `json:"city" conform:"trim,lower" validate:"nnpt"`
State *string `json:"state" conform:"trim,lower" validate:"nnpt"`
PostalCode *string `json:"postal_code" conform:"trim,upper" validate:"nnpt"`
Country *string `json:"country" conform:"trim,upper" validate:"nnpt"`
Latitude *float64 `json:"latitude" validate:"nnpt"`
Longitude *float64 `json:"longitude" validate:"nnpt"`
PlaceID *string `json:"place_id" validate:"nnpt"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetCountry ¶
func (*Core) GetFormattedAddress ¶
func (*Core) GetLatitude ¶
func (*Core) GetLongitude ¶
func (*Core) GetPlaceID ¶
func (*Core) GetPlaceName ¶
func (*Core) GetPostalCode ¶
func (*Core) SetCountry ¶
func (*Core) SetFormattedAddress ¶
func (*Core) SetLatitude ¶
func (*Core) SetLongitude ¶
func (*Core) SetPlaceID ¶
func (*Core) SetPlaceName ¶
func (*Core) SetPostalCode ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithCity ¶
func WithCity(x string) CoreOption
func WithCountry ¶
func WithCountry(x string) CoreOption
func WithFormattedAddress ¶
func WithFormattedAddress(x string) CoreOption
func WithLatitude ¶
func WithLatitude(x float64) CoreOption
func WithLongitude ¶
func WithLongitude(x float64) CoreOption
func WithPlaceID ¶
func WithPlaceID(x string) CoreOption
func WithPlaceName ¶
func WithPlaceName(x string) CoreOption
func WithPostalCode ¶
func WithPostalCode(x string) CoreOption
func WithState ¶
func WithState(x string) CoreOption
func WithStreet ¶
func WithStreet(x string) CoreOption
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.