Files
ironmount/internal/api/handlers.go
Nicolas Meienberger fd91751673 feat: api
2025-08-10 20:17:25 +02:00

20 lines
452 B
Go

package api
import (
"net/http"
"github.com/gin-gonic/gin"
)
// SetupHandlers sets up the API routes for the application.
func SetupHandlers(router *gin.Engine) {
router.GET("/api/health", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "ok"})
})
router.GET("/api/volumes", ListVolumes)
router.POST("/api/volumes", CreateVolume)
router.GET("/api/volumes/:name", GetVolume)
router.DELETE("/api/volumes/:name", DeleteVolume)
}