gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/gmtls/common_string.go (about)

     1  // Code generated by "stringer -type=SignatureScheme,CurveID,ClientAuthType -output=common_string.go"; DO NOT EDIT.
     2  
     3  package gmtls
     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  	_SignatureScheme_name_9  = "ECDSAEXTWithP256AndSHA256"
    36  	_SignatureScheme_name_10 = "ECDSAEXTWithP384AndSHA384"
    37  	_SignatureScheme_name_11 = "ECDSAEXTWithP521AndSHA512"
    38  	_SignatureScheme_name_12 = "SM2WITHSM3"
    39  )
    40  
    41  var (
    42  	_SignatureScheme_index_8 = [...]uint8{0, 13, 26, 39, 46}
    43  )
    44  
    45  func (i SignatureScheme) String() string {
    46  	switch {
    47  	case i == 513:
    48  		return _SignatureScheme_name_0
    49  	case i == 515:
    50  		return _SignatureScheme_name_1
    51  	case i == 516:
    52  		return _SignatureScheme_name_12
    53  	case i == 1025:
    54  		return _SignatureScheme_name_2
    55  	case i == 1027:
    56  		return _SignatureScheme_name_3
    57  	case i == 1028:
    58  		return _SignatureScheme_name_9
    59  	case i == 1281:
    60  		return _SignatureScheme_name_4
    61  	case i == 1283:
    62  		return _SignatureScheme_name_5
    63  	case i == 1284:
    64  		return _SignatureScheme_name_10
    65  	case i == 1537:
    66  		return _SignatureScheme_name_6
    67  	case i == 1539:
    68  		return _SignatureScheme_name_7
    69  	case i == 1540:
    70  		return _SignatureScheme_name_11
    71  	case 2052 <= i && i <= 2055:
    72  		i -= 2052
    73  		return _SignatureScheme_name_8[_SignatureScheme_index_8[i]:_SignatureScheme_index_8[i+1]]
    74  	default:
    75  		return "SignatureScheme(" + strconv.FormatInt(int64(i), 10) + ")"
    76  	}
    77  }
    78  func _() {
    79  	// An "invalid array index" compiler error signifies that the constant values have changed.
    80  	// Re-run the stringer command to generate them again.
    81  	var x [1]struct{}
    82  	_ = x[CurveP256-23]
    83  	_ = x[CurveP384-24]
    84  	_ = x[CurveP521-25]
    85  	_ = x[X25519-29]
    86  }
    87  
    88  const (
    89  	_CurveID_name_0 = "CurveP256CurveP384CurveP521"
    90  	_CurveID_name_1 = "X25519"
    91  )
    92  
    93  var (
    94  	_CurveID_index_0 = [...]uint8{0, 9, 18, 27}
    95  )
    96  
    97  func (i CurveID) String() string {
    98  	switch {
    99  	case 23 <= i && i <= 25:
   100  		i -= 23
   101  		return _CurveID_name_0[_CurveID_index_0[i]:_CurveID_index_0[i+1]]
   102  	case i == 29:
   103  		return _CurveID_name_1
   104  	default:
   105  		return "CurveID(" + strconv.FormatInt(int64(i), 10) + ")"
   106  	}
   107  }
   108  func _() {
   109  	// An "invalid array index" compiler error signifies that the constant values have changed.
   110  	// Re-run the stringer command to generate them again.
   111  	var x [1]struct{}
   112  	_ = x[NoClientCert-0]
   113  	_ = x[RequestClientCert-1]
   114  	_ = x[RequireAnyClientCert-2]
   115  	_ = x[VerifyClientCertIfGiven-3]
   116  	_ = x[RequireAndVerifyClientCert-4]
   117  }
   118  
   119  const _ClientAuthType_name = "NoClientCertRequestClientCertRequireAnyClientCertVerifyClientCertIfGivenRequireAndVerifyClientCert"
   120  
   121  var _ClientAuthType_index = [...]uint8{0, 12, 29, 49, 72, 98}
   122  
   123  func (i ClientAuthType) String() string {
   124  	if i < 0 || i >= ClientAuthType(len(_ClientAuthType_index)-1) {
   125  		return "ClientAuthType(" + strconv.FormatInt(int64(i), 10) + ")"
   126  	}
   127  	return _ClientAuthType_name[_ClientAuthType_index[i]:_ClientAuthType_index[i+1]]
   128  }