plugai_updsrv/pkg/routers/router_ws.go

31 lines
659 B
Go

package routers
import (
"intent-system/pkg/api"
"intent-system/pkg/middleware"
"github.com/civet148/log"
"github.com/gin-gonic/gin"
)
const (
GroupRouterDeployV1WS = "/api/v1/deploy/ws"
)
const (
RouterPathDeployStatusWS = "/status/:user/:appID"
)
func InitRouterGroupDeployWs(r *gin.Engine, handlers api.WsApi) {
log.Infof(".......routers.................Deploy..WS.....................\n\n")
g := r.Group(GroupRouterDeployV1WS)
g.GET(RouterPathDeployStatusWS, handlers.DeployStatusWS) //do not need JWT authentication
g.Use(middleware.JWT()) //use JWT token middleware
{
//g.POST(RouterSubPathDeployDeploy, handlers.DeployDeploy)
}
}