initial commit

This commit is contained in:
root
2024-10-30 13:23:52 +01:00
commit 68ba48a3a2
29 changed files with 1977 additions and 0 deletions

21
http/route/api.go Normal file
View File

@@ -0,0 +1,21 @@
package route
import (
"rkkvm/http/hw/stream"
"rkkvm/http/middleware"
"rkkvm/http/ws"
"github.com/gin-gonic/gin"
)
func Api(e *gin.Engine) {
api := e.Group("/api").Use(middleware.CheckToken())
api.GET("/stream/mjpeg", stream.MjpegHandler)
api.GET("/stream/audio", stream.AudioHandler)
api.GET("/ws", ws.ConnHandler)
api.POST("/stream/webrtc", stream.WebRTCHandshake)
api.GET("/stream/webrtc", stream.WebRTCSettings)
}