appErrors

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 1 Imported by: 0

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 ApplicationError struct {
	Code  int    `json:"code"`
	Level string `json:"level"`
	Msg   string `json:"msg"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL