func NewDefaultLocation() *gossamer.LocationEntity { e := gossamer.NewLocationEntity() e.Description = "Description for Test Location" e.EncodingType = gossamer.LOCATION_ENCTYPE_GEOJSON e.Location = map[string]interface{}{ "type": "Point", "coordinates": []interface{}{-117.123, 54.123}, } return e }
func InsertLocation(c gossamer.Client) { e := gossamer.NewLocationEntity() e.Description = "XXXXX" e.EncodingType = gossamer.LOCATION_ENCTYPE_GEOJSON e.Location = "XOXOXO" err := c.InsertLocation(e) if err != nil { log.Fatal(err) } log.Println("Inserted New Location") }