package v1 type GetTokenRespone struct { Code int `json:"code"` // 操作结果代码;0成功,其他失败 Msg string `json:"msg,omitempty"` // 操作结果描述或错误原因 (omitempty 表示如果字段为空则在 JSON 中忽略) RemoteIP string `json:"remote_ip,omitempty"` // 调用者 IP 地址 (omitempty) TokenType string `json:"token_type,omitempty"` // Token 类型 (omitempty) AccessToken string `json:"access_token,omitempty"` // Token 数据 (omitempty) } type IpInfo struct { FType string `json:"F_type"` FStartIp string `json:"F_startIp"` FEndIp string `json:"F_endIp"` FRemark string `json:"F_remark"` FServerIp string `json:"F_serverIp"` } type DeleteIp struct { Ids string `json:"ids"` } type IpResponse struct { Code int `json:"code"` Msg string `json:"msg,omitempty"` Data []interface{} `json:"data,omitempty"` } type DomainResponse struct { Code int `json:"code"` Msg string `json:"msg"` Info []map[string]string `json:"info"` } type IpGetResponse struct { Code int `json:"code"` Msg string `json:"msg,omitempty"` Data []IpGetData `json:"data,omitempty"` } type IpGetData struct { LongIntEndIP int64 `json:"long_int_end_ip"` Remark string `json:"remark"` Index int `json:"index"` LongIntServerIP int64 `json:"long_int_server_ip"` TType int `json:"t_type"` Source string `json:"source"` IsRange bool `json:"range"` // "range" 是 Go 关键字,所以换个名字 EndIP string `json:"end_ip"` ServerIP string `json:"server_ip"` StartIP string `json:"start_ip"` IpType int `json:"ip_type"` MongoID string `json:"_id"` // "_id" 不符合 Go 命名规范,换个名字 ID int `json:"id"` // 这是我们最终需要的目标字段 LongIntStartIP int64 `json:"long_int_start_ip"` } type Bandwidth struct { Action string `json:"action"` ClientIPType string `json:"client_ip_type"` Direction string `json:"direction"` Name string `json:"name"` Protocol int64 `json:"protocol"` ServerIPStart string `json:"server_ip_start"` ServerIPType string `json:"server_ip_type"` SpeedlimitOut int64 `json:"speedlimit_out"` } type BandwidthResponse struct { Msg string `json:"msg"` Err int `json:"err"` } type SetDefense struct { IpAddr string `json:"ip_addr"` Defense int `json:"defense"` }