Documentation
¶
Index ¶
- Constants
- type AddTaskRequest
- type ChannelResponse
- type ChannelResponse2
- type ChannelResponseData
- type EditTaskStatusRequest
- type GetCronTrackResponse
- type GetTrackBranchIdArrayResponse
- type GetTrackBranchIdArrayResponseData
- type HostRequest
- type KeywordRequest
- type KeywordStatusResponse
- type KeywordStatusResponseChildren
- type LoginRequst
- type OldResponse
- type OldResponseTrackItems
- type RequestIds
- type Response
- type ResponseData
- type ScriptHtmlChildrenField
- type ScriptRequest
- type ScriptRequestScriptChildrenField
- type ScriptRequestScriptHeader
- type TrackRequest
- type TrackRequestData
- type TrackingResponse
- type TrackingResponseData
- type TrackingResponseDataDetails
- type UserRequest
- type UserResponse
Constants ¶
View Source
const ( // 成功 SUCCESS = 20000 // 失败 ERROR = -20000 // 404 NOTFOUND = 404 // 服务器5XX SERVERERROR = 500 // 未认证 NOTAUTH = 403 // 非法token TOKENILLEGAL = 50008 // token过期 TOKENTIMEOUT = 50014 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddTaskRequest ¶
type AddTaskRequest struct {
TaskName string `json:"task_name"` // 任务名称
TaskGroup int `json:"task_group"` // 任务分组
TaskType int `json:"task_type"` // 任务类型
Cron string `json:"cron"` // cron表达式
InvokingTarget string `json:"invoking_target"` // 调用目标
TargetArgs string `json:"target_args"` // 目标参数
Multiple bool `json:"multiple"` // 是否允许并行运行相同的调用目标
TaskStatus int `json:"task_status"` // 任务状态 1:禁用 3:正常
HTTPURL string `json:"http_url" gorm:"type:string;size:255;"` // http请求url
Timeout int `json:"timeout" gorm:"type:int;size:11;"` // 请求超时时间
RetryTimes int `json:"retry_times"` // 重试次数
RetryInterval int `json:"retry_interval"` // 重试间隔时间
NotifyStatus int `json:"notify_status"` // 任务执行结束是否通知
NotifyType int `json:"notify_type"` // 通知类型
TaskHostsIds []int `json:"task_hosts_ids"` // 任务主机ID组
NotifyReceiverIds []int `json:"notify_receiver_ids"` // 通知接受者ID组
Remark string `json:"remark"` // 任务备注
}
type ChannelResponse ¶
type ChannelResponse struct {
Code int `json:"Code"`
Msg string `json:"Msg"`
Data []ChannelResponseData `json:"Data"`
Total int `json:"Total"`
}
type ChannelResponse2 ¶
type ChannelResponseData ¶
type ChannelResponseData struct {
CodePattern string `json:"CodePattern"`
TrackParserJSON string `json:"TrackParserJson"`
TrackFlag int `json:"TrackFlag"`
ID int `json:"Id"`
Name string `json:"Name"`
IsParse bool `json:"IsParse"`
NoTrackTimeOut int `json:"NoTrackTimeOut"`
NoPickedUpTimeOut int `json:"NoPickedUpTimeOut"`
NoDeliveredTimeOut int `json:"NoDeliveredTimeOut"`
NoRefreshedTimeOut int `json:"NoRefreshedTimeOut"`
}
type EditTaskStatusRequest ¶
type EditTaskStatusRequest struct {
TaskStatus int `json:"task_status"` // 任务状态 1:禁用 3:正常
}
type GetCronTrackResponse ¶
type GetTrackBranchIdArrayResponse ¶
type GetTrackBranchIdArrayResponse struct {
Code int `json:"Code"`
Msg string `json:"Msg"`
Data []GetTrackBranchIdArrayResponseData `json:"Data"`
Total int `json:"Total"`
}
type HostRequest ¶
type KeywordRequest ¶
type KeywordStatusResponse ¶
type KeywordStatusResponse struct {
Label string `json:"label"`
Value int `json:"value"`
Children []KeywordStatusResponseChildren `json:"children"`
}
type LoginRequst ¶
type OldResponse ¶
type OldResponse struct {
ID int `json:"Id"`
TrackItems []OldResponseTrackItems `json:"TrackItems"`
TrackTime string `json:"TrackTime"`
TrackStatu string `json:"TrackStatu"`
TrackStep string `json:"TrackStep"`
IsBreakSkip bool `json:"IsBreakSkip"`
TrackerParseCode string `json:"TrackerParseCode"`
PickedUpTime string `json:"PickedUpTime"`
SignTime string `json:"SignDate"`
}
type OldResponseTrackItems ¶
type RequestIds ¶
type RequestIds struct {
Ids []uint
}
type Response ¶
type Response struct {
Code int `json:"code"` // 操作结果
Data interface{} `json:"data"` // 返回数据
Message string `json:"message"` // 提示信息
}
返回结果
type ResponseData ¶
type ResponseData struct {
Code int `json:"code"` // 操作结果
Data interface{} `json:"data"` // 返回数据
Message string `json:"message"` // 提示信息
Count int64 `json:"count"` // 总记录数
}
返回结果
type ScriptHtmlChildrenField ¶
type ScriptHtmlChildrenField struct {
Key enum.ReturnGetFieldType `json:"key"` // html获取位置对应系统字段
Value int `json:"value"` // html获取节点位置
}
type ScriptRequest ¶
type ScriptRequest struct {
ParentID uint `json:"parent_id"` // 父脚本ID
Name string `json:"name"` // 脚本名称
Url string `json:"url"` // 请求地址
Method enum.ScriptMethodType `json:"method"` // 请求方式
ContentType enum.ContentType `json:"content_type"` // Content-type
IsFormData bool `json:"is_form_data"` // 是否表单提交
IsUrlEncode bool `json:"is_url_encode"` // 是否URL编码
Headers []ScriptRequestScriptHeader `json:"headers"` // 请求头
PostData string `json:"post_data"` // 请求数据
ReturnType enum.ReturnType `json:"return_type"` // 返回内容格式
JsonIsReturnArr bool `json:"json_is_return_arr"` // 是否取值数组根节点:不是:直接find子节点
JsonNeedRootField string `json:"json_need_root_field"` // json获取根节点
JsonNeedChildrenFields []ScriptRequestScriptChildrenField `json:"json_need_children_fields"` // json所需子字段
HtmlNeedClassName string `json:"html_need_class_name"` // html获取根节点位置名称
HtmlNeedClassChildrenFields []ScriptHtmlChildrenField `json:"html_need_class_children_fields"` // html获取节点位置
TimeFormat bool `json:"time_format"` // 时间是否需要格式化
TimeOriginal string `json:"time_original"` // 原始时间格式
TimeSort bool `json:"sort"` // 时间是否排序
}
type ScriptRequestScriptChildrenField ¶
type ScriptRequestScriptChildrenField struct {
Key enum.ReturnGetFieldType `json:"key"` // json所需字段对应系统字段
Value string `json:"value"` // json所需字段
}
type TrackRequest ¶
type TrackRequest struct {
ApiServiceCode int `json:"api_service_code"` // 轨迹渠道代码
RequestDictionary map[string]string `json:"request_dictionary"` // 请求参数配置字典集合
Data []TrackRequestData `json:"data"` // 请求单号数据
}
type TrackRequestData ¶
type TrackingResponse ¶
type TrackingResponse struct {
Code int `json:"code"` // 200:成功 -1:失败
Msg string `json:"msg"` // 提示消息
BranchID int `json:"branch_id"` // 客户ID
APIURL string `json:"ApiUrl"` // 请求地址
ApiServiceCode int `json:"api_service_code"` // 轨迹渠道代码
RequestDictionary map[string]string `json:"request_dictionary"` // 请求参数配置字典集合
Data []TrackingResponseData `json:"data"` // 返回信息
}
轨迹API返回参数
type TrackingResponseData ¶
type TrackingResponseData struct {
Code int `json:"code"` // 200:成功 -1:失败
Msg string `json:"msg"` // 提示消息
ID int `json:"id"` // 单号ID
Hawbcode string `json:"hawbcode"` // 单号
State int `json:"state"` // 物流状态
StateEx int `json:"state_ex"` // 物流状态详情
StateProblem int `json:"state_problem"` // 问题件;非0:是问题件。
TrackMappingEn string `json:"track_mapping_en"` // 轨迹映射英文
TrackMappingCn string `json:"track_mapping_cn"` // 轨迹映射中文
NewDescription string `json:"new_description"` // 最新轨迹内容描述
NewDateTime string `json:"new_date_time"` // 最新轨迹内容时间
PickedUpTime string `json:"picked_up_time"` // 拣货时间
SkipParseCode int `json:"skip_parse_code"` // XX
CountryCode string `json:"country_code"` // 目的国家
SignTime string `json:"sign_time"` // 签收时间
Details []TrackingResponseDataDetails `json:"details"` // 轨迹结果
}
轨迹获取结果
type TrackingResponseDataDetails ¶
type TrackingResponseDataDetails struct {
Description string `json:"description"` // 轨迹内容
Location string `json:"location"` // 地点
AcceptTime string `json:"accept_time"` // 时间
}
轨迹结果明细
type UserRequest ¶
type UserResponse ¶
type UserResponse struct {
ID uint `json:"id"`
CreatedAt enum.TimeFormat `json:"created_at"`
UpdatedAt enum.TimeFormat `json:"updated_at"`
Username string `json:"username"` // 用户名
OpenID string `json:"open_id"` // 绑定微信 openid
Email string `json:"email"` // 邮箱地址
IsAdmin bool `json:"is_admin"` // 是否是管理员 1:管理员 0:普通用户
Status enum.UserStatusType `json:"status"` // 账号状态 1: 正常 0:禁用
}
用户
Click to show internal directories.
Click to hide internal directories.