Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorLocalRes(c *gin.Context, status ErrorStr, msg string, locale string, ...)
- func ErrorRes(c *gin.Context, status ErrorStr, msg string)
- func SuccessDataRes(c *gin.Context, data interface{}, msg string)
- func SuccessPageDataRes(c *gin.Context, data interface{}, page int, count int64, msg string)
- func SuccessRes(c *gin.Context, msg string)
- type AlarmParam
- type AlarmRecordQuery
- type AlarmRuleQuery
- type AllWhiteIps
- type EndpointParam
- type ErrorResModel
- type ErrorStr
- type KeyParam
- type LocalizedMessage
- type NotifyChannelQuery
- type PageParam
- type PolicyParam
- type ResPageDataModel
- type RouteParam
- type SuccessResModel
Constants ¶
View Source
const ( EnvironmentCodeNull = "" EndpointFoundRecordNull = "Error 1146: Table 'gateway_admin.rows' doesn't exist" )
View Source
const ( ErrBindJson ErrorStr = "INVALID_ARGUMENT.1" ErrCreate = "FAILED_TO_CREATE" ErrDelete = "FAILED_TO_DELETE" ErrGetFile = "INVALID_ARGUMENT.2" ErrReqStringToInt = "INVALID_ARGUMENT.3" ErrEnvironment = "INVALID_ARGUMENT.4" ErrEnvironmentCodeNull = "UNAUTHENTICATED.1" ErrNoSecret = "UNAUTHENTICATED.2" ErrDBOperate = "INTERNAL_DB" ErrK8sOperate = "INTERNAL_K8S" ErrUCOperate = "INTERNAL_UC" ErrJsonMarshal = "INTERNAL_Other.1" ErrJsonUnMarshal = "INTERNAL_Other.2" ErrCopier = "INTERNAL_Other.3" ErrChangeLogLevel = "INTERNAL_Other.4" ErrDBNotFind = "NOT_FOUND_DB" ErrTelnetFind = "NOT_FOUND_TELNET" ErrSnapshotFind = "NOT_FOUND_SNAPSHOT" ErrDBAlreadyExist = "ALREADY_EXISTS_DB" ErrK8sAlreadyExist = "ALREADY_EXISTS_K8S" )
Variables ¶
View Source
var ErrCodeMap = map[ErrorStr]int{ ErrBindJson: http.StatusBadRequest, ErrGetFile: http.StatusBadRequest, ErrReqStringToInt: http.StatusBadRequest, ErrEnvironment: http.StatusBadRequest, ErrEnvironmentCodeNull: http.StatusUnauthorized, ErrNoSecret: http.StatusUnauthorized, ErrDBNotFind: http.StatusNotFound, ErrTelnetFind: http.StatusNotFound, ErrSnapshotFind: http.StatusNotFound, ErrDBAlreadyExist: http.StatusConflict, ErrK8sAlreadyExist: http.StatusConflict, ErrDBOperate: http.StatusInternalServerError, ErrK8sOperate: http.StatusInternalServerError, ErrUCOperate: http.StatusInternalServerError, ErrJsonMarshal: http.StatusInternalServerError, ErrCopier: http.StatusInternalServerError, ErrChangeLogLevel: http.StatusInternalServerError, }
Functions ¶
func ErrorLocalRes ¶
func SuccessDataRes ¶
func SuccessPageDataRes ¶
func SuccessRes ¶
Types ¶
type AlarmParam ¶
type AlarmParam struct {
SmsType string
}
type AlarmRecordQuery ¶
type AlarmRuleQuery ¶
type AllWhiteIps ¶
type AllWhiteIps struct { EnvironmentCode string `json:"environment_code"` IpAddress string `json:"ip_address"` }
func (AllWhiteIps) TableName ¶
func (AllWhiteIps) TableName() string
type EndpointParam ¶
type ErrorResModel ¶
type ErrorResModel struct { Status ErrorStr `json:"status"` Message string `json:"message"` LocalizedMessage *LocalizedMessage `json:"localized_message,omitempty"` }
type LocalizedMessage ¶
type NotifyChannelQuery ¶
type PolicyParam ¶
type ResPageDataModel ¶
type RouteParam ¶
type SuccessResModel ¶
type SuccessResModel struct {
Data interface{} `json:"data,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.