GameShield.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package v1
  2. type GameShieldSubmitRequest struct {
  3. HostId int `json:"host_id" form:"host_id" binding:"required"`
  4. Domain string `json:"domain" form:"domain"`
  5. AppName string `json:"app_name" form:"app_name" binding:"required"`
  6. RuleId int `json:"rule_id" form:"rule_id"`
  7. Id int `json:"id" form:"id"`
  8. Uid int `json:"uid" form:"uid"`
  9. Comment string `json:"comment" form:"comment"`
  10. }
  11. type BackendItem struct {
  12. Protocol string `json:"protocol" form:"protocol"`
  13. Host string `json:"host" form:"host"`
  14. ProxyAddr string `json:"proxy_addr" form:"proxy_addr"`
  15. SdkPort int `json:"sdk_port" form:"sdk_port"`
  16. SourceMachineIP string `json:"source_machineIP" form:"source_machineIP"`
  17. ConnectPort int `json:"connect_port" form:"connect_port"`
  18. }
  19. type GameShieldSubmitResponse struct {
  20. RoleId int `json:"role_id"`
  21. }
  22. type GetGameShieldRuleIdRequest struct {
  23. AppName string `json:"app_name" form:"app_name"`
  24. Name string `json:"name" form:"name"`
  25. HostId int `json:"host_id" form:"host_id"`
  26. }
  27. type GetGameShieldRequiredResponse struct {
  28. ExpiredAt string
  29. Backend string
  30. Cookie string
  31. RuleId int
  32. DunName string
  33. }
  34. type KeyAndFieldResponse struct {
  35. Key string `json:"key" form:"key"`
  36. FieldId int
  37. }
  38. type GameShieldRuleIdRequest struct {
  39. RuleId int `json:"rule_id" form:"rule_id" binding:"required"`
  40. }
  41. type SDKInfo struct {
  42. RuleID string `json:"rule_id"` // 规则ID
  43. ClientIP string `json:"client_ip"` // 客户端IP
  44. GatewayIP string `json:"gateway_ip,omitempty"` // 网关IP
  45. SDKUUID string `json:"sdk_uuid"` // SDK-UUID
  46. SessionID string `json:"session_id"` // 会话ID
  47. SDKType string `json:"sdk_type"` // SDK类型
  48. SDKVersion string `json:"sdk_version,omitempty"` // SDK版本
  49. System string `json:"system"` // 系统
  50. ExtraInfo string `json:"extra_info"` // 附加信息
  51. }