// Code generated by "stringer -type ErrCode -linecomment"; DO NOT EDIT.

package gatecode

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[GLOBAL_ERR_NIL-1000]
	_ = x[GLOBAL_ERR_INVALID_PARAMS-1001]
	_ = x[GLOBAL_ERR_TIMEOUT-1002]
	_ = x[GLOBAL_ERR_UNDEFINED-1003]
	_ = x[GLOBAL_ERR_NOPOWER-1004]
	_ = x[GATEWAY_ERR_NIL-2005]
	_ = x[GATEWAY_MODULE_UNDEFINED-2006]
	_ = x[GATEWAY_ROUTER_NOTFIND-2007]
	_ = x[GATEWAY_ROUTER_UPHOLD-2008]
	_ = x[GATEWAY_REGISTED_URL_ERR-2009]
	_ = x[SERVER_ERR_NIL-3010]
}

const (
	_ErrCode_name_0 = "global OK无效参数超时未知异常没有权限"
	_ErrCode_name_1 = "gateway ok未找到服务未注册路由地址接口维护中服务地址异常"
	_ErrCode_name_2 = "server ok"
)

var (
	_ErrCode_index_0 = [...]uint8{0, 9, 21, 27, 39, 51}
	_ErrCode_index_1 = [...]uint8{0, 10, 25, 46, 61, 79}
)

func (i ErrCode) String() string {
	switch {
	case 1000 <= i && i <= 1004:
		i -= 1000
		return _ErrCode_name_0[_ErrCode_index_0[i]:_ErrCode_index_0[i+1]]
	case 2005 <= i && i <= 2009:
		i -= 2005
		return _ErrCode_name_1[_ErrCode_index_1[i]:_ErrCode_index_1[i+1]]
	case i == 3010:
		return _ErrCode_name_2
	default:
		return "ErrCode(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}
