final project structure

This commit is contained in:
2025-04-15 22:36:22 +02:00
parent d6b3e88b5f
commit 284a40fac2
65 changed files with 668 additions and 447 deletions

View File

@@ -0,0 +1,16 @@
package generic
import "github.com/gin-gonic/gin"
func RegisterCRUDRoutes(rg *gin.RouterGroup, l CRUDController) {
rg.GET("/", l.GetAll)
rg.GET("/:id", l.GetOne)
rg.POST("/", l.Create)
rg.PUT("/:id", l.Update)
rg.DELETE("/:id", l.Delete)
}
func RegisterRRoutes(rg *gin.RouterGroup, l RController) {
rg.GET("/", l.GetAll)
rg.GET("/:id", l.GetOne)
}