Implement lab 2 with PostgreSQL, Valkey admission and Helm deployment

This commit is contained in:
Vladislav Agapov
2026-10-15 17:09:26 +03:00
parent 65003b6119
commit b90581f613
184 changed files with 15853 additions and 56 deletions
+22
View File
@@ -0,0 +1,22 @@
package fiber
// initRoutes registers health endpoints and authenticated application routes.
func (ctrl *Controller) initRoutes() {
ctrl.server.Get("/health/live", ctrl.handleLive)
ctrl.server.Get("/health/ready", ctrl.handleReady)
ctrl.server.Use(ctrl.admit)
ctrl.server.Post("/api/v1/users", ctrl.HandleUsersCreate)
ctrl.server.Post("/api/v1/auth/sessions", ctrl.HandleLogin)
api := ctrl.server.Group("/api/v1", ctrl.requireIdentity)
api.Delete("/auth/sessions/current", ctrl.HandleLogout)
api.Get("/users/me", ctrl.HandleUsersGetMe)
api.Post("/chats", ctrl.HandleChatsCreate)
api.Get("/chats", ctrl.HandleChatsGetPage)
api.Get("/chats/:chat_id", ctrl.HandleChatsGetByID)
api.Post("/chats/:chat_id/messages", ctrl.HandleMessagesCreate)
api.Get("/chats/:chat_id/messages", ctrl.HandleMessagesGetPage)
ctrl.server.Use(ctrl.handleNotFound)
}