feat: complete base http socket model for phlebotomy service

This commit is contained in:
joyHuang 2026-05-16 22:16:54 +09:00
parent fd84e92cbe
commit 4badef89bd
Signed by: joy
GPG Key ID: E9FF7B8ECF17FD6D
5 changed files with 40 additions and 0 deletions

10
main.go
View File

@ -1,6 +1,7 @@
package main
import (
"NTU-H/utils/phlebotomy"
"NTU-H/utils/system"
"io"
"os"
@ -28,6 +29,15 @@ func main() {
gin.Recovery(),
gin.Logger(),
)
apiRoute := route.Group("/api/v1")
{
phlebotomyHandler := phlebotomy.NewHandler()
phlebotomy.NewPhlebotomyRoute(apiRoute, phlebotomyHandler)
}
route.Group("/api/v1").POST("/speech", func(c *gin.Context) {
log.Print(1, "speech")
})

View File

@ -1 +1,11 @@
package phlebotomy
import "github.com/gin-gonic/gin"
func NewHandler() *Handler {
return &Handler{}
}
func (h *Handler) Speech(c *gin.Context) {
}

View File

@ -1 +1,9 @@
package phlebotomy
type Handler struct {
Handler *Handler
}
type Service struct {
Service *Service
}

View File

@ -1 +1,7 @@
package phlebotomy
import "github.com/gin-gonic/gin"
func NewPhlebotomyRoute(router *gin.RouterGroup, h *Handler) {
router.POST("/speech", h.Speech)
}

View File

@ -1 +1,7 @@
package phlebotomy
import "github.com/gin-gonic/gin"
func (srv *Service) Speech(c *gin.Context) {
}