22 lines
615 B
Go
22 lines
615 B
Go
package apierr
|
|
|
|
type APIErrorCode struct {
|
|
HTTPStatusCode int
|
|
Key string
|
|
}
|
|
|
|
//goland:noinspection GoSnakeCaseUsage
|
|
var (
|
|
NotImplemented = APIErrorCode{500, "NOT_IMPLEMENTED"}
|
|
InternalError = APIErrorCode{500, "INTERNAL_ERROR"}
|
|
Panic = APIErrorCode{500, "PANIC"}
|
|
|
|
BindFailURI = APIErrorCode{400, "BINDFAIL_URI"}
|
|
BindFailQuery = APIErrorCode{400, "BINDFAIL_QUERY"}
|
|
BindFailJSON = APIErrorCode{400, "BINDFAIL_JSON"}
|
|
BindFailFormData = APIErrorCode{400, "BINDFAIL_FORMDATA"}
|
|
|
|
Unauthorized = APIErrorCode{401, "UNAUTHORIZED"}
|
|
AuthFailed = APIErrorCode{401, "AUTH_FAILED"}
|
|
)
|