Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CadastralTerritory ¶
type CadastralTerritory struct { ID uint `gorm:"primary_key" json:"id"` Name string `json:"name"` NameSearch string `json:"name_search"` CityID uint `json:"city_id"` City City `gorm:"foreignkey:CityID;association_foreignkey:ID" json:"city"` }
CadastralTerritory structure
func (CadastralTerritory) MarshalJSON ¶
func (ct CadastralTerritory) MarshalJSON() ([]byte, error)
MarshalJSON converts CadastralTerritory to CadastralTerritoryJSON
type CadastralTerritoryJSON ¶
type CadastralTerritoryJSON struct { ID uint `json:"id"` Name string `json:"name"` City string `json:"city"` }
CadastralTerritoryJSON CadastralTerritory representation for JSON
type City ¶
type City struct { ID uint `gorm:"primary_key" json:"id"` Name string `json:"name"` NameSearch string `json:"name_search"` CityParts []CityPart Streets []Street Places []Place }
City structure
func (City) MarshalJSON ¶
MarshalJSON converts City to CityJSON
type CityPart ¶
type CityPart struct { ID uint `gorm:"primary_key" json:"id"` Name string `json:"name"` NameSearch string `json:"name_search"` CityID uint `json:"city_id"` City City `gorm:"foreignkey:CityID;association_foreignkey:ID" json:"city"` Streets []Street Places []Place }
CityPart structure
func (CityPart) MarshalJSON ¶
MarshalJSON converts CityPart to CityPartJSON
type CityPartJSON ¶
type CityPartJSON struct { ID uint `json:"id"` Name string `json:"name"` City string `json:"city"` }
CityPartJSON structure
type Place ¶
type Place struct { ID uint `gorm:"primary_key" json:"id"` E uint32 `json:"e,omitempty"` P uint32 `json:"p,omitempty"` O string `gorm:"size:10" json:"o,omitempty"` Zip string `gorm:"size:5" json:"zip"` X float64 `json:"x,omitempty"` Y float64 `json:"y,omitempty"` Longitude float64 `json:"lng,omitempty"` Latitude float64 `json:"lat,omitempty"` StreetID uint `json:"-"` CityID uint `json:"-"` CityPartID uint `json:"-"` Street Street `gorm:"foreignkey:StreetID;association_foreignkey:ID" json:"street"` City City `gorm:"foreignkey:CityID;association_foreignkey:ID" json:"city"` CityPart CityPart `gorm:"foreignkey:CityPartID;association_foreignkey:ID" json:"city_part"` }
Place structure
func (Place) MarshalJSON ¶
MarshalJSON converts Place to PlaceJSON
func (Place) PlaceNumber ¶
PlaceNumber returns correct address place number
type PlaceJSON ¶
type PlaceJSON struct { ID uint `json:"id"` E uint32 `json:"e,omitempty"` P uint32 `json:"p,omitempty"` O string `json:"o,omitempty"` Zip string `json:"zip"` Longitude float64 `json:"lng"` Latitude float64 `json:"lat"` Street string `json:"street"` City string `json:"city"` CityPart string `json:"city_part"` AddressString string `json:"address_string"` }
PlaceJSON Place representation for JSON
type Street ¶
type Street struct { ID uint `gorm:"primary_key" json:"id"` Name string `json:"name"` NameSearch string `json:"name_search"` CityID uint `json:"city_id"` CityPartID uint `json:"city_part_id"` City City `gorm:"foreignkey:CityID;association_foreignkey:ID" json:"city"` CityPart CityPart `gorm:"foreignkey:CityPartID;association_foreignkey:ID" json:"city_part"` Places []Place }
Street structure
func (Street) MarshalJSON ¶
MarshalJSON converts Street to StreetJSON
Click to show internal directories.
Click to hide internal directories.