initial
This commit is contained in:
parent
781d525d72
commit
8c38107ff2
5 changed files with 86 additions and 0 deletions
34
internal/merch/controller.go
Normal file
34
internal/merch/controller.go
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
package merch
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
type controller struct {
|
||||
service *service
|
||||
}
|
||||
|
||||
func newController(s *service) *controller {
|
||||
return &controller{
|
||||
service: s,
|
||||
}
|
||||
}
|
||||
|
||||
func (h *Handler) RegisterRoutes(r *gin.RouterGroup) {
|
||||
merchGroup := r.Group("/merch")
|
||||
|
||||
merchGroup.POST("/create", h.controller.create)
|
||||
merchGroup.GET("/:id", h.controller.getOne)
|
||||
merchGroup.GET("/list", h.controller.getMany)
|
||||
merchGroup.PUT("/update", h.controller.update)
|
||||
merchGroup.DELETE("/delete", h.controller.delete)
|
||||
|
||||
}
|
||||
|
||||
func (co *controller) create(c *gin.Context) {}
|
||||
|
||||
func (co *controller) getOne(c *gin.Context) {}
|
||||
|
||||
func (co *controller) getMany(c *gin.Context) {}
|
||||
|
||||
func (co *controller) update(c *gin.Context) {}
|
||||
|
||||
func (co *controller) delete(c *gin.Context) {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue