mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 10:00:23 +08:00
change: server
This commit is contained in:
108
server/model.go
108
server/model.go
@@ -4,50 +4,98 @@ import (
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
||||
)
|
||||
|
||||
type TapRequest struct {
|
||||
X float64 `json:"x" binding:"required"`
|
||||
Y float64 `json:"y" binding:"required"`
|
||||
Duration float64 `json:"duration"`
|
||||
Options *option.ActionOptions `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
type DragRequest struct {
|
||||
FromX float64 `json:"from_x" binding:"required"`
|
||||
FromY float64 `json:"from_y" binding:"required"`
|
||||
ToX float64 `json:"to_x" binding:"required"`
|
||||
ToY float64 `json:"to_y" binding:"required"`
|
||||
Duration float64 `json:"duration"`
|
||||
PressDuration float64 `json:"press_duration"`
|
||||
Options *option.ActionOptions `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
type InputRequest struct {
|
||||
Text string `json:"text" binding:"required"`
|
||||
Frequency int `json:"frequency"` // only iOS
|
||||
}
|
||||
|
||||
type DeleteRequest struct {
|
||||
Count int `json:"count" binding:"required"`
|
||||
}
|
||||
|
||||
type KeycodeRequest struct {
|
||||
Keycode int `json:"keycode" binding:"required"`
|
||||
}
|
||||
|
||||
type AppClearRequest struct {
|
||||
PackageName string `json:"packageName" binding:"required"`
|
||||
}
|
||||
|
||||
type AppLaunchRequest struct {
|
||||
PackageName string `json:"packageName" binding:"required"`
|
||||
}
|
||||
|
||||
type AppTerminalRequest struct {
|
||||
PackageName string `json:"packageName" binding:"required"`
|
||||
}
|
||||
|
||||
type AppInstallRequest struct {
|
||||
AppUrl string `json:"appUrl" binding:"required"`
|
||||
MappingUrl string `json:"mappingUrl"`
|
||||
ResourceMappingUrl string `json:"resourceMappingUrl"`
|
||||
PackageName string `json:"packageName"`
|
||||
}
|
||||
|
||||
type AppInfoRequest struct {
|
||||
PackageName string `form:"packageName" binding:"required"`
|
||||
}
|
||||
|
||||
type AppUninstallRequest struct {
|
||||
PackageName string `json:"packageName" binding:"required"`
|
||||
}
|
||||
|
||||
type PushMediaRequest struct {
|
||||
ImageUrl string `json:"imageUrl" binding:"required_without=VideoUrl"`
|
||||
VideoUrl string `json:"videoUrl" binding:"required_without=ImageUrl"`
|
||||
}
|
||||
|
||||
type OperateRequest struct {
|
||||
StepText string `json:"stepText" binding:"required"`
|
||||
}
|
||||
|
||||
type HttpResponse struct {
|
||||
Code int `json:"code"`
|
||||
Message string `json:"msg"`
|
||||
Result interface{} `json:"result,omitempty"`
|
||||
}
|
||||
|
||||
type TapRequest struct {
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
Text string `json:"text"`
|
||||
|
||||
Options *option.ActionOptions `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
type DragRequest struct {
|
||||
FromX float64 `json:"from_x"`
|
||||
FromY float64 `json:"from_y"`
|
||||
ToX float64 `json:"to_x"`
|
||||
ToY float64 `json:"to_y"`
|
||||
|
||||
Options *option.ActionOptions `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
type InputRequest struct {
|
||||
Text string `json:"text"`
|
||||
Frequency int `json:"frequency"` // only iOS
|
||||
}
|
||||
|
||||
type ScreenRequest struct {
|
||||
Options *option.ScreenOptions `json:"options,omitempty"`
|
||||
}
|
||||
|
||||
type KeycodeRequest struct {
|
||||
Keycode int `json:"keycode"`
|
||||
type UploadRequest struct {
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
FileUrl string `json:"file_url"`
|
||||
FileFormat string `json:"file_format"`
|
||||
}
|
||||
|
||||
type AppClearRequest struct {
|
||||
PackageName string `json:"packageName"`
|
||||
type HoverRequest struct {
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
}
|
||||
|
||||
type AppLaunchRequest struct {
|
||||
PackageName string `json:"packageName"`
|
||||
type ScrollRequest struct {
|
||||
Delta int `json:"delta"`
|
||||
}
|
||||
|
||||
type AppTerminalRequest struct {
|
||||
PackageName string `json:"packageName"`
|
||||
type CreateBrowserRequest struct {
|
||||
Timeout int `json:"timeout"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user