29 lines
700 B
Go
29 lines
700 B
Go
package main
|
|
|
|
import (
|
|
docs "gitea.d3m0k1d.ru/HellreigN/Control-plane/docs"
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/swaggo/files"
|
|
"github.com/swaggo/gin-swagger"
|
|
)
|
|
|
|
// @securityDefinitions.apikey Bearer
|
|
// @in header
|
|
// @name Authorization
|
|
// @description Type "Bearer" followed by a space and the JWT token.
|
|
|
|
func main() {
|
|
r := gin.Default()
|
|
docs.SwaggerInfo.Title = "AegisGuard API"
|
|
docs.SwaggerInfo.Version = "1.0"
|
|
docs.SwaggerInfo.Description = "API for AegisGuard"
|
|
docs.SwaggerInfo.Schemes = []string{"http"}
|
|
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
|
r.GET("/health", func(c *gin.Context) {
|
|
c.JSON(200, gin.H{
|
|
"status": "ok",
|
|
})
|
|
})
|
|
r.Run(":8080")
|
|
}
|