36 lines
1.8 KiB
Go
36 lines
1.8 KiB
Go
// Package define ...
|
|
//
|
|
// Description : define ...
|
|
//
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
//
|
|
// Date : 2024-05-31 12:34
|
|
package define
|
|
|
|
import "github.com/go-resty/resty/v2"
|
|
|
|
// Response 响应的数据结构定义
|
|
//
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
//
|
|
// Date : 12:34 2024/5/31
|
|
type Response struct {
|
|
Header map[string]string `json:"header"` // 响应header
|
|
Cookie map[string]string `json:"cookie"` // 响应cookie
|
|
Body map[string]any `json:"body"` // 响应body
|
|
Code string `json:"code"` // 业务状态码
|
|
Message string `json:"message"` // 业务状态码描述
|
|
Data string `json:"data"` // 响应数据
|
|
HttpCode int `json:"http_code"` // http状态码
|
|
HttpCodeStatus string `json:"http_code_status"` // http状态码描述
|
|
ResponseDataRule map[string]any `json:"response_data_rule"` // 返回数据的验证规则
|
|
Seq int `json:"seq"` // 第几次请求
|
|
RequestStartTime int64 `json:"request_start_time"` // 请求开始时间 : ms
|
|
FinishRequestTime int64 `json:"finish_request_time"` // 请求完成时间 : ms
|
|
UsedTime int64 `json:"used_time"` // 请求耗时 : ms
|
|
RestyResponse *resty.Response `json:"-"` // 请求返回
|
|
IsSuccess bool `json:"is_success"` // 是否请求成功
|
|
RequestCount int64 `json:"request_count"` // 请求次数
|
|
FailInfoList []any `json:"fail_info_list"` // 请求失败信息记录
|
|
}
|