Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidToken = &ApplicationError{ Code: http.StatusUnauthorized, Level: "Error", Msg: "The token is invalid. tokenが無効です。", }
View Source
var ErrNotCreateToken = &ApplicationError{ Code: http.StatusUnprocessableEntity, Level: "Error", Msg: "This is a token production failure. token制作失敗です。", }
View Source
var ErrRecordDatabase = &ApplicationError{ Code: http.StatusBadRequest, Level: "Error", Msg: "The ID does not exist. (Database error) 存在しないIDです。(データベースがエラー)", }
View Source
var ErrorJSON = &ApplicationError{ Code: http.StatusBadRequest, Level: "Error", Msg: "I couldn't read the json.", }
View Source
var ServerError = &ApplicationError{ Code: http.StatusInternalServerError, Level: "Error", Msg: "An error has occurred inside the server.", }
Functions ¶
This section is empty.
Types ¶
type ApplicationError ¶
type ApplicationErrorMsg ¶
type ApplicationErrorMsg struct { Code int `json:"code"` Level string `json:"level"` Msg string `json:"msg"` ErrorMsg string `json:"error_msg"` }
func ErrMeatdataMsg ¶
func ErrMeatdataMsg(err error, appErr *ApplicationError) *ApplicationErrorMsg
Click to show internal directories.
Click to hide internal directories.