-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0686d0c
commit ac5beef
Showing
1 changed file
with
11 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,18 @@ | ||
package routes | ||
|
||
import "github.com/gin-gonic/gin" | ||
import ( | ||
"github.com/gin-gonic/gin" | ||
|
||
"github.com/baimamboukar/go-gin-docker-k8s/src/controllers" | ||
) | ||
|
||
func startupsGroupRouter(baseRouter *gin.RouterGroup) { | ||
startups := baseRouter.Group("/startups") | ||
|
||
startups.GET("/all", GetAllStartups) | ||
startups.GET("/:id", GetStartupByID) | ||
startups.POST("/create", CreateStartup) | ||
startups.PATCH("/update", UpdateStartup) | ||
startups.PUT("/update", UpdateStartup) | ||
startups.DELETE("/:id", DeleteStartup) | ||
} | ||
|
||
func GetAllStartups(c *gin.Context) { | ||
// Implement logic to get all startups | ||
c.JSON(200, gin.H{"message": "Get all startups"}) | ||
} | ||
|
||
func GetStartupByID(c *gin.Context) { | ||
// Implement logic to get a startup by ID | ||
startupID := c.Param("id") | ||
c.JSON(200, gin.H{"message": "Get startup by ID", "id": startupID}) | ||
} | ||
|
||
func CreateStartup(c *gin.Context) { | ||
// Implement logic to create a new startup | ||
c.JSON(200, gin.H{"message": "Create a new startup"}) | ||
} | ||
|
||
func UpdateStartup(c *gin.Context) { | ||
// Implement logic to update a startup | ||
c.JSON(200, gin.H{"message": "Update a startup"}) | ||
} | ||
|
||
func DeleteStartup(c *gin.Context) { | ||
// Implement logic to delete a startup by ID | ||
startupID := c.Param("id") | ||
c.JSON(200, gin.H{"message": "Delete startup by ID", "id": startupID}) | ||
startups.GET("/all", controllers.GetAllStartups) | ||
startups.GET("/get/:id", controllers.GetStartupByID) | ||
startups.POST("/create", controllers.CreateStartup) | ||
startups.PATCH("/update", controllers.UpdateStartup) | ||
startups.PUT("/update", controllers.UpdateStartup) | ||
startups.DELETE("/delete/:id", controllers.DeleteStartup) | ||
} |
ac5beef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
go-gin-docker-k8s – ./
go-gin-docker-k8s-baimamboukar.vercel.app
go-gin-docker-k8s-git-main-baimamboukar.vercel.app
go-gin-docker-k8s-iota.vercel.app
ac5beef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
go-gin-docker-k8s-mgat – ./
go-gin-docker-k8s-mgat-xenora.vercel.app
go-gin-docker-k8s-mgat-git-main-xenora.vercel.app
go-gin-docker-k8s-mgat.vercel.app