Documentation ¶
Index ¶
- type City
- func (c *City) AllDistrict(city string) ([]City, error)
- func (c *City) CreateIndex(collectionName string) error
- func (c *City) GetConn(mongoConnection *mgo.Session, redisConnection *redis.Client)
- func (c *City) GetNearestDistrict(cityName string, lat, lon float64, distance int64) (City, error)
- func (c *City) InsertDistrict(city string, distric int, lat, lon float64) error
- func (c *City) InsertLocationsBulk(collectionName string, datas []interface{}) error
- type GeoJson
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type City ¶
type City struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` Name string `json:"name"` District int `json:"district"` Location GeoJson `json:"location"` }
func (*City) CreateIndex ¶
func (*City) GetNearestDistrict ¶
get Near district in the city with given distance in meters
func (*City) InsertDistrict ¶
Inserting district to mongo database
func (*City) InsertLocationsBulk ¶
Click to show internal directories.
Click to hide internal directories.