common_string.go 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // Code generated by "stringer -linecomment -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. _ = x[x25519Kyber768Draft00-25497]
  69. }
  70. const (
  71. _CurveID_name_0 = "CurveP256CurveP384CurveP521"
  72. _CurveID_name_1 = "X25519"
  73. _CurveID_name_2 = "X25519Kyber768Draft00"
  74. )
  75. var (
  76. _CurveID_index_0 = [...]uint8{0, 9, 18, 27}
  77. )
  78. func (i CurveID) String() string {
  79. switch {
  80. case 23 <= i && i <= 25:
  81. i -= 23
  82. return _CurveID_name_0[_CurveID_index_0[i]:_CurveID_index_0[i+1]]
  83. case i == 29:
  84. return _CurveID_name_1
  85. case i == 25497:
  86. return _CurveID_name_2
  87. default:
  88. return "CurveID(" + strconv.FormatInt(int64(i), 10) + ")"
  89. }
  90. }
  91. func _() {
  92. // An "invalid array index" compiler error signifies that the constant values have changed.
  93. // Re-run the stringer command to generate them again.
  94. var x [1]struct{}
  95. _ = x[NoClientCert-0]
  96. _ = x[RequestClientCert-1]
  97. _ = x[RequireAnyClientCert-2]
  98. _ = x[VerifyClientCertIfGiven-3]
  99. _ = x[RequireAndVerifyClientCert-4]
  100. }
  101. const _ClientAuthType_name = "NoClientCertRequestClientCertRequireAnyClientCertVerifyClientCertIfGivenRequireAndVerifyClientCert"
  102. var _ClientAuthType_index = [...]uint8{0, 12, 29, 49, 72, 98}
  103. func (i ClientAuthType) String() string {
  104. if i < 0 || i >= ClientAuthType(len(_ClientAuthType_index)-1) {
  105. return "ClientAuthType(" + strconv.FormatInt(int64(i), 10) + ")"
  106. }
  107. return _ClientAuthType_name[_ClientAuthType_index[i]:_ClientAuthType_index[i+1]]
  108. }