common_string.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // Code generated by "stringer -type=SignatureScheme,CurveID,ClientAuthType -output=common_string.go"; DO NOT EDIT.
  2. package tls
  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[PKCS1WithSHA256-1025]
  9. _ = x[PKCS1WithSHA384-1281]
  10. _ = x[PKCS1WithSHA512-1537]
  11. _ = x[PSSWithSHA256-2052]
  12. _ = x[PSSWithSHA384-2053]
  13. _ = x[PSSWithSHA512-2054]
  14. _ = x[ECDSAWithP256AndSHA256-1027]
  15. _ = x[ECDSAWithP384AndSHA384-1283]
  16. _ = x[ECDSAWithP521AndSHA512-1539]
  17. _ = x[Ed25519-2055]
  18. _ = x[PKCS1WithSHA1-513]
  19. _ = x[ECDSAWithSHA1-515]
  20. }
  21. const (
  22. _SignatureScheme_name_0 = "PKCS1WithSHA1"
  23. _SignatureScheme_name_1 = "ECDSAWithSHA1"
  24. _SignatureScheme_name_2 = "PKCS1WithSHA256"
  25. _SignatureScheme_name_3 = "ECDSAWithP256AndSHA256"
  26. _SignatureScheme_name_4 = "PKCS1WithSHA384"
  27. _SignatureScheme_name_5 = "ECDSAWithP384AndSHA384"
  28. _SignatureScheme_name_6 = "PKCS1WithSHA512"
  29. _SignatureScheme_name_7 = "ECDSAWithP521AndSHA512"
  30. _SignatureScheme_name_8 = "PSSWithSHA256PSSWithSHA384PSSWithSHA512Ed25519"
  31. )
  32. var (
  33. _SignatureScheme_index_8 = [...]uint8{0, 13, 26, 39, 46}
  34. )
  35. func (i SignatureScheme) String() string {
  36. switch {
  37. case i == 513:
  38. return _SignatureScheme_name_0
  39. case i == 515:
  40. return _SignatureScheme_name_1
  41. case i == 1025:
  42. return _SignatureScheme_name_2
  43. case i == 1027:
  44. return _SignatureScheme_name_3
  45. case i == 1281:
  46. return _SignatureScheme_name_4
  47. case i == 1283:
  48. return _SignatureScheme_name_5
  49. case i == 1537:
  50. return _SignatureScheme_name_6
  51. case i == 1539:
  52. return _SignatureScheme_name_7
  53. case 2052 <= i && i <= 2055:
  54. i -= 2052
  55. return _SignatureScheme_name_8[_SignatureScheme_index_8[i]:_SignatureScheme_index_8[i+1]]
  56. default:
  57. return "SignatureScheme(" + strconv.FormatInt(int64(i), 10) + ")"
  58. }
  59. }
  60. func _() {
  61. // An "invalid array index" compiler error signifies that the constant values have changed.
  62. // Re-run the stringer command to generate them again.
  63. var x [1]struct{}
  64. _ = x[CurveP256-23]
  65. _ = x[CurveP384-24]
  66. _ = x[CurveP521-25]
  67. _ = x[X25519-29]
  68. }
  69. const (
  70. _CurveID_name_0 = "CurveP256CurveP384CurveP521"
  71. _CurveID_name_1 = "X25519"
  72. )
  73. var (
  74. _CurveID_index_0 = [...]uint8{0, 9, 18, 27}
  75. )
  76. func (i CurveID) String() string {
  77. switch {
  78. case 23 <= i && i <= 25:
  79. i -= 23
  80. return _CurveID_name_0[_CurveID_index_0[i]:_CurveID_index_0[i+1]]
  81. case i == 29:
  82. return _CurveID_name_1
  83. default:
  84. return "CurveID(" + strconv.FormatInt(int64(i), 10) + ")"
  85. }
  86. }
  87. func _() {
  88. // An "invalid array index" compiler error signifies that the constant values have changed.
  89. // Re-run the stringer command to generate them again.
  90. var x [1]struct{}
  91. _ = x[NoClientCert-0]
  92. _ = x[RequestClientCert-1]
  93. _ = x[RequireAnyClientCert-2]
  94. _ = x[VerifyClientCertIfGiven-3]
  95. _ = x[RequireAndVerifyClientCert-4]
  96. }
  97. const _ClientAuthType_name = "NoClientCertRequestClientCertRequireAnyClientCertVerifyClientCertIfGivenRequireAndVerifyClientCert"
  98. var _ClientAuthType_index = [...]uint8{0, 12, 29, 49, 72, 98}
  99. func (i ClientAuthType) String() string {
  100. if i < 0 || i >= ClientAuthType(len(_ClientAuthType_index)-1) {
  101. return "ClientAuthType(" + strconv.FormatInt(int64(i), 10) + ")"
  102. }
  103. return _ClientAuthType_name[_ClientAuthType_index[i]:_ClientAuthType_index[i+1]]
  104. }