💾 Archived View for source.community › ckaznocha › gemini › raw › main › status_string.gen.go captured on 2024-05-12 at 15:29:22.

View Raw

More Information

⬅️ Previous capture (2021-12-17)

-=-=-=-=-=-=-

// Code generated by "stringer -linecomment -output status_string.gen.go -type StatusCodeCategory,StatusCode"; DO NOT EDIT.

package gemini

import "strconv"

func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[StatusCategoryInput-1]
	_ = x[StatusCategorySuccess-2]
	_ = x[StatusCategoryRedirect-3]
	_ = x[StatusCategoryTemporaryFailure-4]
	_ = x[StatusCategoryPermanentFailure-5]
	_ = x[StatusCategoryClientCertificateRequired-6]
	_ = x[StatusCategoryUndefined-0]
	_ = x[StatusCategoryUndefinedX-7]
	_ = x[StatusCategoryUndefinedXX-8]
	_ = x[StatusCategoryUndefinedXXX-9]
}

const _StatusCodeCategory_name = "UNDEFINEDINPUTSUCCESSREDIRECTTEMPORARY FAILUREPERMANENT FAILURECLIENT CERTIFICATE REQUIREDUNDEFINEDUNDEFINEDUNDEFINED"

var _StatusCodeCategory_index = [...]uint8{0, 9, 14, 21, 29, 46, 63, 90, 99, 108, 117}

func (i StatusCodeCategory) String() string {
	if i >= StatusCodeCategory(len(_StatusCodeCategory_index)-1) {
		return "StatusCodeCategory(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _StatusCodeCategory_name[_StatusCodeCategory_index[i]:_StatusCodeCategory_index[i+1]]
}
func _() {
	// An "invalid array index" compiler error signifies that the constant values have changed.
	// Re-run the stringer command to generate them again.
	var x [1]struct{}
	_ = x[StatusInput-10]
	_ = x[StatusSensitiveInput-11]
	_ = x[StatusSuccess-20]
	_ = x[StatusTemporaryRedirect-30]
	_ = x[StatusPermanentRedirect-31]
	_ = x[StatusTemporaryFailure-40]
	_ = x[StatusServerFailure-41]
	_ = x[StatusCGIError-42]
	_ = x[StatusProxyError-43]
	_ = x[StatusSlowDown-44]
	_ = x[StatusPermanentFailure-50]
	_ = x[StatusNotFound-51]
	_ = x[StatusGone-52]
	_ = x[StatusProxyRequestRefused-53]
	_ = x[StatusBadRequest-59]
	_ = x[StatusClientCertificateRequired-60]
	_ = x[StatusCertificateNotAuthorised-61]
	_ = x[StatusCertificateNotValid-62]
}

const (
	_StatusCode_name_0 = "INPUTSENSITIVE INPUT"
	_StatusCode_name_1 = "SUCCESS"
	_StatusCode_name_2 = "REDIRECT - TEMPORARYREDIRECT - PERMANENT"
	_StatusCode_name_3 = "TEMPORARY FAILURESERVER UNAVAILABLECGI ERRORPROXY ERRORSLOW DOWN"
	_StatusCode_name_4 = "PERMANENT FAILURENOT FOUNDGONEPROXY REQUEST REFUSED"
	_StatusCode_name_5 = "BAD REQUESTCLIENT CERTIFICATE REQUIREDCERTIFICATE NOT AUTHORIZEDCERTIFICATE NOT VALID"
)

var (
	_StatusCode_index_0 = [...]uint8{0, 5, 20}
	_StatusCode_index_2 = [...]uint8{0, 20, 40}
	_StatusCode_index_3 = [...]uint8{0, 17, 35, 44, 55, 64}
	_StatusCode_index_4 = [...]uint8{0, 17, 26, 30, 51}
	_StatusCode_index_5 = [...]uint8{0, 11, 38, 64, 85}
)

func (i StatusCode) String() string {
	switch {
	case 10 <= i && i <= 11:
		i -= 10
		return _StatusCode_name_0[_StatusCode_index_0[i]:_StatusCode_index_0[i+1]]
	case i == 20:
		return _StatusCode_name_1
	case 30 <= i && i <= 31:
		i -= 30
		return _StatusCode_name_2[_StatusCode_index_2[i]:_StatusCode_index_2[i+1]]
	case 40 <= i && i <= 44:
		i -= 40
		return _StatusCode_name_3[_StatusCode_index_3[i]:_StatusCode_index_3[i+1]]
	case 50 <= i && i <= 53:
		i -= 50
		return _StatusCode_name_4[_StatusCode_index_4[i]:_StatusCode_index_4[i+1]]
	case 59 <= i && i <= 62:
		i -= 59
		return _StatusCode_name_5[_StatusCode_index_5[i]:_StatusCode_index_5[i+1]]
	default:
		return "StatusCode(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}