-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
40 lines (36 loc) · 1.36 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/kenjitheman/astrodata-api/api"
"github.com/kenjitheman/astrodata-api/api/health"
)
func main() {
r := gin.Default()
r.Use(cors.Default())
api := r.Group("/api")
{
api.GET("/health", health.GetHealth)
api.GET("/dst/last-month", handlers.GetLastMonthDST)
api.GET("/dst/current-month", handlers.GetCurrentMonthDST)
api.GET("/dst/7d", handlers.GetDST7Days)
api.GET("/dst/by-date", handlers.GetDSTByDate)
api.GET("/dst/now", handlers.GetDSTNow)
api.GET("/dst/now/strength", handlers.GetDSTAndStrengthNow)
api.GET("/predict/6h", handlers.GetSixHoursPredictFromNow)
api.GET("/predict/1d", handlers.GetOneDayPredict)
api.GET("/bz/6h", handlers.GetBzDataSixHours)
api.GET("/bz/1d", handlers.GetBzDataOneDay)
api.GET("/bz/3d", handlers.GetBzDataThreeDays)
api.GET("/bz/7d", handlers.GetBzDataSevenDays)
api.GET("/bz/now", handlers.GetBzNow)
api.GET("/bz/now/strength", handlers.GetBzAndStrengthNow)
api.GET("plasma/now", handlers.GetPlasmaTemperatureRealTime)
api.GET("plasma/2h", handlers.GetPlasmaTemperature2Hours)
api.GET("plasma/6h", handlers.GetPlasmaTemperature6Hours)
api.GET("plasma/1d", handlers.GetPlasmaTemperature1Day)
api.GET("plasma/3d", handlers.GetPlasmaTemperature3Days)
api.GET("plasma/7d", handlers.GetPlasmaTemperature7Days)
}
r.Run()
}