Documentation ¶
Index ¶
- func CORSMiddleware() gin.HandlerFunc
- func GetCheckPoint(c *gin.Context)
- func GetPointFromToken(c *gin.Context)
- func GetPoints(c *gin.Context)
- func GetRndPoint(c *gin.Context)
- func PostCheckPoint(c *gin.Context)
- func PostPoint(c *gin.Context)
- func PostRndPoint(c *gin.Context)
- func PutDistance(c *gin.Context)
- func Start(args []string)
- type Config
- type DistanceReq
- type GeoPoint
- type GeoState
- type Server
- type TokenReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
CORSMiddleware middleware headers for any RESTful requests {{{
func GetCheckPoint ¶
func GetPointFromToken ¶
func GetRndPoint ¶
func PostCheckPoint ¶
func PostRndPoint ¶
func PutDistance ¶
Types ¶
type Config ¶
func (*Config) SetDefault ¶
func (config *Config) SetDefault()
type DistanceReq ¶
type DistanceReq struct {
Distance float64 `form:"Distance" binding:"required"`
}
type GeoPoint ¶
type GeoPoint struct { Type string `form:"-"` Token string `form:"Token" binding:"required"` Coordinates [2]float64 `form:"Coordinates" binding:"required"` }
GeoPoint for example {lat: 1.011111, lng: 1.0000450}
func (*GeoPoint) GetDistance ¶
GetDistance set random data to a point// {{{
type GeoState ¶
GeoState is map(array) of points
Click to show internal directories.
Click to hide internal directories.