init go proj

This commit is contained in:
d3m0k1d
2026-04-29 12:15:00 +03:00
parent 923816bf2a
commit 6858625e8b
8 changed files with 382 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
package main
import (
"gitea.d3m0k1d.com/d3m0k1d/rostpoliplast/backend/docs"
"github.com/gin-gonic/gin"
swaggerFiles "github.com/swaggo/files"
ginSwagger "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() {
router := gin.Default()
v1 := router.Group("/api/v1")
docs.SwaggerInfo.BasePath = "/api/v1"
docs.SwaggerInfo.Title = "Atmosphera Smart Layer API"
docs.SwaggerInfo.Version = "1.0"
docs.SwaggerInfo.Schemes = []string{"http", "https"}
{
v1.GET("/health", func(c *gin.Context) {
c.JSON(200, gin.H{
"status": "ok",
})
})
}
router.Run(":8080")
}