Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrZeroExpireSecond = New(http.StatusBadRequest, 1, "zero expire time") ErrZeroExpireCount = New(http.StatusBadRequest, 2, "zero expire count") ErrExpireSecondGreaterThanMonth = New(http.StatusBadRequest, 3, "expire minute greater than a month") ErrExpireCountGreaterThanMaxCount = New(http.StatusBadRequest, 4, "expire count greater than max count") ErrEmptyContent = New(http.StatusBadRequest, 5, "empty content") ErrEmptyLang = New(http.StatusBadRequest, 6, "empty lang") ErrInvalidLang = New(http.StatusBadRequest, 7, "invalid lang") ErrWrongParamType = New(http.StatusBadRequest, 8, "wrong param type") ErrInvalidKeyLength = New(http.StatusBadRequest, 9, "invalid key length") ErrInvalidKeyFormat = New(http.StatusBadRequest, 10, "invalid key format") ErrWrongPassword = New(http.StatusForbidden, 1, "wrong password") ErrNoRouterFounded = New(http.StatusNotFound, 1, "no router founded") ErrRecordNotFound = New(http.StatusNotFound, 2, "record not found") ErrQueryDBFailed = New(http.StatusInternalServerError, 1, "query from db failed") ErrSaveFailed = New(http.StatusInternalServerError, 2, "save failed") )
Functions ¶
func Beat ¶
Beat godoc @Summary 心跳检测 @Description 心跳检测 @Tags Common @Produce json @Param method query string true "方法" Enums("beat") @Success 200 {object} common.Response @Failure default {object} common.ErrorResponse @Router / [get]
func NotFoundHandler ¶
Types ¶
type ErrorResponse ¶
func (*ErrorResponse) Abort ¶
func (response *ErrorResponse) Abort(context *gin.Context)
func (*ErrorResponse) Error ¶
func (response *ErrorResponse) Error() string
Click to show internal directories.
Click to hide internal directories.