entity

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

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 ChannelResponse2 struct {
	Code int    `json:"Code"`
	Msg  string `json:"Msg"`
}

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 GetCronTrackResponse struct {
	Code        int            `json:"code"`         // 200:成功 -1:失败
	Msg         string         `json:"msg"`          // 提示消息
	BranchID    int            `json:"branch_id"`    // 客户ID
	APIURL      string         `json:"ApiUrl"`       // 请求地址
	ResultItems []TrackRequest `json:"result_items"` // 单号数据
	TotalItems  int            `json:"total_items"`  // 总条数
}

type GetTrackBranchIdArrayResponse

type GetTrackBranchIdArrayResponse struct {
	Code  int                                 `json:"Code"`
	Msg   string                              `json:"Msg"`
	Data  []GetTrackBranchIdArrayResponseData `json:"Data"`
	Total int                                 `json:"Total"`
}

type GetTrackBranchIdArrayResponseData

type GetTrackBranchIdArrayResponseData struct {
	BranchID int    `json:"BranchId"`
	APIURL   string `json:"ApiUrl"`
}

type HostRequest

type HostRequest struct {
	Name     string `json:"name"`     // 主机名称
	Alias    string `json:"alias"`    // 主机别名
	Port     int    `json:"port"`     // 主机端口
	Username string `json:"username"` // 用户名
	Password string `json:"password"` // 密码
	Remark   string `json:"remark"`   // 备注
}

type KeywordRequest

type KeywordRequest struct {
	Description    string `json:"description"`      // 轨迹内容
	TrackStatus    int    `json:"track_status"`     // 轨迹映射状态
	TrackMappingEn string `json:"track_mapping_en"` // 轨迹映射英文
	TrackMappingCn string `json:"track_mapping_cn"` // 轨迹映射中文
	TrackCode      int    `json:"track_code"`       // 轨迹代码
}

type KeywordStatusResponse

type KeywordStatusResponse struct {
	Label    string                          `json:"label"`
	Value    int                             `json:"value"`
	Children []KeywordStatusResponseChildren `json:"children"`
}

type KeywordStatusResponseChildren

type KeywordStatusResponseChildren struct {
	Label string `json:"label"`
	Value int    `json:"value"`
}

type LoginRequst

type LoginRequst struct {
	Username string `json:"username"` // 用户名
	Password string `json:"password"` // 登录密码
}

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 OldResponseTrackItems struct {
	Status  string `json:"Status"`
	Time    string `json:"Time"`
	Address string `json:"Address"`
}

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 ScriptRequestScriptHeader

type ScriptRequestScriptHeader struct {
	Key   string `json:"key"`   // 请求头名称
	Value string `json:"value"` // 请求头值
}

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 TrackRequestData struct {
	ID            int    `json:"id"`             // 单号ID
	PickedUpTime  string `json:"picked_up_time"` // 拣货时间
	CountryCode   string `json:"country_code"`   // 目的国家
	SkipParseCode int    `json:"skp_parse_code"` // XX
	State         int    `json:"state"`          // 上一次物流状态
	Hawbcode      string `json:"hawbcode"`       // 单号
}

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 UserRequest struct {
	Username string              `json:"username"` // 用户名
	Password string              `json:"password"` // 密码 (添加可用)
	Email    string              `json:"email"`    // 邮箱地址
	IsAdmin  bool                `json:"is_admin"` // 是否是管理员 1:管理员 0:普通用户
	Status   enum.UserStatusType `json:"status"`   // 账号状态 1: 正常 0:禁用
}

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:禁用
}

用户

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL