|
|
|
@ -3,8 +3,8 @@ package routers
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
|
|
android "webserver/api/android"
|
|
|
|
|
pc "webserver/api/pc"
|
|
|
|
|
android "webserver/pkg/api/android"
|
|
|
|
|
pc "webserver/pkg/api/pc"
|
|
|
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
)
|
|
|
|
@ -13,12 +13,20 @@ import (
|
|
|
|
|
func InitRouter() *gin.Engine {
|
|
|
|
|
r := gin.Default()
|
|
|
|
|
|
|
|
|
|
api := r.Group("/api")
|
|
|
|
|
api := r.Group("/pkg/api")
|
|
|
|
|
{
|
|
|
|
|
api.GET("/android/hello", android.Hello)
|
|
|
|
|
api.POST("/android/hello", android.Hello)
|
|
|
|
|
api.GET("/pc/hello", pc.Hello)
|
|
|
|
|
api.POST("/pc/hello", pc.Hello)
|
|
|
|
|
api.GET("/android/hands_3d", android.hands_3d)
|
|
|
|
|
api.GET("/android/hands_recegnation", android.hands_recegnation)
|
|
|
|
|
api.GET("/android/hands_translation", android.hands_translation)
|
|
|
|
|
api.GET("/android/media_camera", android.media_camera)
|
|
|
|
|
api.GET("/android/media_pipe", android.media_pipe)
|
|
|
|
|
api.GET("/android/word_input", android.word_input)
|
|
|
|
|
api.GET("/android/word_recv", android.word_recv)
|
|
|
|
|
api.GET("/android/word_send", android.word_send)
|
|
|
|
|
api.GET("/android/word_show", android.word_show)
|
|
|
|
|
api.GET("/pc/load_alancing", pc.load_alancing)
|
|
|
|
|
api.GET("/pc/nginx-rtmp", pc.nginx-rtmp)
|
|
|
|
|
api.GET("/pc/webserver", pc.webserver)
|
|
|
|
|
}
|
|
|
|
|
// 静态文件路由
|
|
|
|
|
r.StaticFS("/web", http.Dir("./dist/"))
|
|
|
|
|