storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/cmd/stserrorcode_string.go (about)

     1  // Code generated by "stringer -type=STSErrorCode -trimprefix=Err sts-errors.go"; DO NOT EDIT.
     2  
     3  package cmd
     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[ErrSTSNone-0]
    12  	_ = x[ErrSTSAccessDenied-1]
    13  	_ = x[ErrSTSMissingParameter-2]
    14  	_ = x[ErrSTSInvalidParameterValue-3]
    15  	_ = x[ErrSTSWebIdentityExpiredToken-4]
    16  	_ = x[ErrSTSClientGrantsExpiredToken-5]
    17  	_ = x[ErrSTSInvalidClientGrantsToken-6]
    18  	_ = x[ErrSTSMalformedPolicyDocument-7]
    19  	_ = x[ErrSTSNotInitialized-8]
    20  	_ = x[ErrSTSInternalError-9]
    21  }
    22  
    23  const _STSErrorCode_name = "STSNoneSTSAccessDeniedSTSMissingParameterSTSInvalidParameterValueSTSWebIdentityExpiredTokenSTSClientGrantsExpiredTokenSTSInvalidClientGrantsTokenSTSMalformedPolicyDocumentSTSNotInitializedSTSInternalError"
    24  
    25  var _STSErrorCode_index = [...]uint8{0, 7, 22, 41, 65, 91, 118, 145, 171, 188, 204}
    26  
    27  func (i STSErrorCode) String() string {
    28  	if i < 0 || i >= STSErrorCode(len(_STSErrorCode_index)-1) {
    29  		return "STSErrorCode(" + strconv.FormatInt(int64(i), 10) + ")"
    30  	}
    31  	return _STSErrorCode_name[_STSErrorCode_index[i]:_STSErrorCode_index[i+1]]
    32  }