github.com/osrg/gobgp/v3@v3.30.0/pkg/packet/bgp/srbehavior_string.go (about)

     1  // Code generated by "stringer -type=SRBehavior"; DO NOT EDIT.
     2  
     3  package bgp
     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[RESERVED-0]
    12  	_ = x[END-1]
    13  	_ = x[END_WITH_PSP-2]
    14  	_ = x[END_WITH_USP-3]
    15  	_ = x[END_WITH_PSP_USP-4]
    16  	_ = x[ENDX-5]
    17  	_ = x[ENDX_WITH_PSP-6]
    18  	_ = x[ENDX_WITH_USP-7]
    19  	_ = x[ENDX_WITH_PSP_USP-8]
    20  	_ = x[ENDT-9]
    21  	_ = x[ENDT_WITH_PSP-10]
    22  	_ = x[ENDT_WITH_USP-11]
    23  	_ = x[ENDT_WITH_PSP_USP-12]
    24  	_ = x[END_B6_ENCAPS-14]
    25  	_ = x[END_BM-15]
    26  	_ = x[END_DX6-16]
    27  	_ = x[END_DX4-17]
    28  	_ = x[END_DT6-18]
    29  	_ = x[END_DT4-19]
    30  	_ = x[END_DT46-20]
    31  	_ = x[END_DX2-21]
    32  	_ = x[END_DX2V-22]
    33  	_ = x[END_DT2U-23]
    34  	_ = x[END_DT2M-24]
    35  	_ = x[END_B6_ENCAPS_Red-27]
    36  	_ = x[END_WITH_USD-28]
    37  	_ = x[END_WITH_PSP_USD-29]
    38  	_ = x[END_WITH_USP_USD-30]
    39  	_ = x[END_WITH_PSP_USP_USD-31]
    40  	_ = x[ENDX_WITH_USD-32]
    41  	_ = x[ENDX_WITH_PSP_USD-33]
    42  	_ = x[ENDX_WITH_USP_USD-34]
    43  	_ = x[ENDX_WITH_PSP_USP_USD-35]
    44  	_ = x[ENDT_WITH_USD-36]
    45  	_ = x[ENDT_WITH_PSP_USD-37]
    46  	_ = x[ENDT_WITH_USP_USD-38]
    47  	_ = x[ENDT_WITH_PSP_USP_USD-39]
    48  	_ = x[ENDM_GTP6D-69]
    49  	_ = x[ENDM_GTP6DI-70]
    50  	_ = x[ENDM_GTP6E-71]
    51  	_ = x[ENDM_GTP4E-72]
    52  }
    53  
    54  const (
    55  	_SRBehavior_name_0 = "RESERVEDENDEND_WITH_PSPEND_WITH_USPEND_WITH_PSP_USPENDXENDX_WITH_PSPENDX_WITH_USPENDX_WITH_PSP_USPENDTENDT_WITH_PSPENDT_WITH_USPENDT_WITH_PSP_USP"
    56  	_SRBehavior_name_1 = "END_B6_ENCAPSEND_BMEND_DX6END_DX4END_DT6END_DT4END_DT46END_DX2END_DX2VEND_DT2UEND_DT2M"
    57  	_SRBehavior_name_2 = "END_B6_ENCAPS_RedEND_WITH_USDEND_WITH_PSP_USDEND_WITH_USP_USDEND_WITH_PSP_USP_USDENDX_WITH_USDENDX_WITH_PSP_USDENDX_WITH_USP_USDENDX_WITH_PSP_USP_USDENDT_WITH_USDENDT_WITH_PSP_USDENDT_WITH_USP_USDENDT_WITH_PSP_USP_USD"
    58  	_SRBehavior_name_3 = "ENDM_GTP6DENDM_GTP6DIENDM_GTP6EENDM_GTP4E"
    59  )
    60  
    61  var (
    62  	_SRBehavior_index_0 = [...]uint8{0, 8, 11, 23, 35, 51, 55, 68, 81, 98, 102, 115, 128, 145}
    63  	_SRBehavior_index_1 = [...]uint8{0, 13, 19, 26, 33, 40, 47, 55, 62, 70, 78, 86}
    64  	_SRBehavior_index_2 = [...]uint8{0, 17, 29, 45, 61, 81, 94, 111, 128, 149, 162, 179, 196, 217}
    65  	_SRBehavior_index_3 = [...]uint8{0, 10, 21, 31, 41}
    66  )
    67  
    68  func (i SRBehavior) String() string {
    69  	switch {
    70  	case 0 <= i && i <= 12:
    71  		return _SRBehavior_name_0[_SRBehavior_index_0[i]:_SRBehavior_index_0[i+1]]
    72  	case 14 <= i && i <= 24:
    73  		i -= 14
    74  		return _SRBehavior_name_1[_SRBehavior_index_1[i]:_SRBehavior_index_1[i+1]]
    75  	case 27 <= i && i <= 39:
    76  		i -= 27
    77  		return _SRBehavior_name_2[_SRBehavior_index_2[i]:_SRBehavior_index_2[i+1]]
    78  	case 69 <= i && i <= 72:
    79  		i -= 69
    80  		return _SRBehavior_name_3[_SRBehavior_index_3[i]:_SRBehavior_index_3[i+1]]
    81  	default:
    82  		return "SRBehavior(" + strconv.FormatInt(int64(i), 10) + ")"
    83  	}
    84  }