common_string.mx raw

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