droneblresponse_string.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Code generated by "stringer -type=DroneBLResponse"; DO NOT EDIT.
  2. package dnsbl
  3. import "strconv"
  4. func _() {
  5. // An "invalid array index" compiler error signifies that the constant values have changed.
  6. // Re-run the stringer command to generate them again.
  7. var x [1]struct{}
  8. _ = x[AllGood-0]
  9. _ = x[IRCDrone-3]
  10. _ = x[Bottler-5]
  11. _ = x[UnknownSpambotOrDrone-6]
  12. _ = x[DDOSDrone-7]
  13. _ = x[SOCKSProxy-8]
  14. _ = x[HTTPProxy-9]
  15. _ = x[ProxyChain-10]
  16. _ = x[OpenProxy-11]
  17. _ = x[OpenDNSResolver-12]
  18. _ = x[BruteForceAttackers-13]
  19. _ = x[OpenWingateProxy-14]
  20. _ = x[CompromisedRouter-15]
  21. _ = x[AutoRootingWorms-16]
  22. _ = x[AutoDetectedBotIP-17]
  23. _ = x[Unknown-255]
  24. }
  25. const (
  26. _DroneBLResponse_name_0 = "AllGood"
  27. _DroneBLResponse_name_1 = "IRCDrone"
  28. _DroneBLResponse_name_2 = "BottlerUnknownSpambotOrDroneDDOSDroneSOCKSProxyHTTPProxyProxyChainOpenProxyOpenDNSResolverBruteForceAttackersOpenWingateProxyCompromisedRouterAutoRootingWormsAutoDetectedBotIP"
  29. _DroneBLResponse_name_3 = "Unknown"
  30. )
  31. var (
  32. _DroneBLResponse_index_2 = [...]uint8{0, 7, 28, 37, 47, 56, 66, 75, 90, 109, 125, 142, 158, 175}
  33. )
  34. func (i DroneBLResponse) String() string {
  35. switch {
  36. case i == 0:
  37. return _DroneBLResponse_name_0
  38. case i == 3:
  39. return _DroneBLResponse_name_1
  40. case 5 <= i && i <= 17:
  41. i -= 5
  42. return _DroneBLResponse_name_2[_DroneBLResponse_index_2[i]:_DroneBLResponse_index_2[i+1]]
  43. case i == 255:
  44. return _DroneBLResponse_name_3
  45. default:
  46. return "DroneBLResponse(" + strconv.FormatInt(int64(i), 10) + ")"
  47. }
  48. }