change: rename ws action type

This commit is contained in:
lilong.129
2024-11-11 21:55:20 +08:00
parent a8247b794a
commit d91a7eacf1
2 changed files with 10 additions and 10 deletions

View File

@@ -1 +1 @@
v5.0.0+2411112135
v5.0.0+2411112155

View File

@@ -31,12 +31,12 @@ type wsSession struct {
}
const (
wsOpen ActionType = "open"
wsPing ActionType = "ping"
wsWriteAndRead ActionType = "wr"
wsRead ActionType = "r"
wsWrite ActionType = "w"
wsClose ActionType = "close"
wsOpen WSActionType = "open"
wsPing WSActionType = "ping"
wsWriteAndRead WSActionType = "wr"
wsRead WSActionType = "r"
wsWrite WSActionType = "w"
wsClose WSActionType = "close"
)
const (
@@ -45,9 +45,9 @@ const (
defaultWriteWait = 5 * time.Second // default timeout 5 seconds for writing control message
)
type ActionType string
type WSActionType string
func (at ActionType) toString() string {
func (at WSActionType) toString() string {
switch at {
case wsOpen:
return "open new connection"
@@ -243,7 +243,7 @@ func (s *StepWebSocket) Extract() *StepRequestExtraction {
}
type WebSocketAction struct {
Type ActionType `json:"type" yaml:"type"`
Type WSActionType `json:"type" yaml:"type"`
URL string `json:"url" yaml:"url"`
Params map[string]interface{} `json:"params,omitempty" yaml:"params,omitempty"`
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`