mirror of
https://github.com/tnb-labs/panel.git
synced 2026-09-01 14:55:12 +08:00
ea22c2f0a7
Replace the samber/do runtime container with explicit constructor dependencies and generated Wire graphs for ace and cli. Keep CLI application loading isolated and verify generated files in CI.
28 lines
1.2 KiB
Go
28 lines
1.2 KiB
Go
package route
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/acepanel/panel/v3/internal/service"
|
|
)
|
|
|
|
// WsRoutes WebSocket 路由
|
|
func WsRoutes(toolboxMigrationService *service.ToolboxMigrationService, wsService *service.WsService) Endpoints {
|
|
ws := wsService
|
|
toolboxMigration := toolboxMigrationService
|
|
|
|
return Endpoints{
|
|
{Method: http.MethodGet, Path: "/api/ws/exec", Handler: ws.Exec},
|
|
{Method: http.MethodGet, Path: "/api/ws/pty", Handler: ws.PTY},
|
|
{Method: http.MethodGet, Path: "/api/ws/follow", Handler: ws.Follow},
|
|
{Method: http.MethodGet, Path: "/api/ws/ssh", Handler: ws.Session},
|
|
{Method: http.MethodGet, Path: "/api/ws/ssh/transfer", Handler: ws.SSHTransfer},
|
|
{Method: http.MethodGet, Path: "/api/ws/container/{id}", Handler: ws.ContainerTerminal},
|
|
{Method: http.MethodGet, Path: "/api/ws/container/image/pull", Handler: ws.ContainerImagePull},
|
|
{Method: http.MethodGet, Path: "/api/ws/migration/progress", Handler: toolboxMigration.Progress},
|
|
{Method: http.MethodGet, Path: "/api/ws/cert/obtain", Handler: ws.CertObtain},
|
|
{Method: http.MethodGet, Path: "/api/ws/cert/renew", Handler: ws.CertRenew},
|
|
{Method: http.MethodGet, Path: "/api/ws/panel/update", Handler: ws.PanelUpdate},
|
|
}
|
|
}
|