aodun.go 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package v1
  2. import "encoding/json"
  3. type GetTokenRespone struct {
  4. Code int `json:"code"` // 操作结果代码;0成功,其他失败
  5. Msg string `json:"msg,omitempty"` // 操作结果描述或错误原因 (omitempty 表示如果字段为空则在 JSON 中忽略)
  6. RemoteIP string `json:"remote_ip,omitempty"` // 调用者 IP 地址 (omitempty)
  7. TokenType string `json:"token_type,omitempty"` // Token 类型 (omitempty)
  8. AccessToken string `json:"access_token,omitempty"` // Token 数据 (omitempty)
  9. }
  10. type IpInfo struct {
  11. FType string `json:"F_type"`
  12. FStartIp string `json:"F_startIp"`
  13. FEndIp string `json:"F_endIp"`
  14. FRemark string `json:"F_remark"`
  15. FServerIp string `json:"F_serverIp"`
  16. }
  17. type DeleteIp struct {
  18. Ids string `json:"ids"`
  19. }
  20. type IpResponse struct {
  21. Code int `json:"code"`
  22. Msg string `json:"msg,omitempty"`
  23. Data []interface{} `json:"data,omitempty"`
  24. }
  25. type DomainResponse struct {
  26. Code int `json:"err"`
  27. Msg json.RawMessage `json:"msg,omitempty"`
  28. Data string `json:"data,omitempty"`
  29. }
  30. type IpGet struct {
  31. LongIntEndIP int64 `json:"long_int_end_ip"`
  32. Remark string `json:"remark"`
  33. Index int `json:"index"`
  34. LongIntServerIP int64 `json:"long_int_server_ip"`
  35. TType int `json:"t_type"`
  36. Source string `json:"source"`
  37. IsRange bool `json:"range"` // "range" 是 Go 关键字,所以换个名字
  38. EndIP string `json:"end_ip"`
  39. ServerIP string `json:"server_ip"`
  40. StartIP string `json:"start_ip"`
  41. IpType int `json:"ip_type"`
  42. MongoID string `json:"_id"` // "_id" 不符合 Go 命名规范,换个名字
  43. ID int `json:"id"` // 这是我们最终需要的目标字段
  44. LongIntStartIP int64 `json:"long_int_start_ip"`
  45. }