refactor: move shoots related server to ext

This commit is contained in:
lilong.129
2025-02-10 19:57:39 +08:00
parent 1ec383180b
commit c6b0aefc56
12 changed files with 305 additions and 156 deletions

View File

@@ -15,7 +15,7 @@ import (
var uiClients = make(map[string]uixt.IDriverExt) // UI automation clients for iOS and Android, key is udid/serial
func handleDeviceContext() gin.HandlerFunc {
func (r *Router) HandleDeviceContext() gin.HandlerFunc {
return func(c *gin.Context) {
platform := c.Param("platform")
serial := c.Param("serial")
@@ -81,7 +81,7 @@ func handleDeviceContext() gin.HandlerFunc {
}
}
func getContextDriver(c *gin.Context) (*uixt.DriverExt, error) {
func GetContextDriver(c *gin.Context) (uixt.IDriverExt, error) {
driverObj, exists := c.Get("driver")
if !exists {
handlerInitDeviceDriverFailedContext(c)