Documentation ¶
Index ¶
- func ComparePass(h string, p string) bool
- func VerifyToken(context *gin.Context) (interface{}, error)
- type Error
- func BadRequest(message string) Error
- func GenerateToken(id uint, email string) (string, Error)
- func GetIdParam(context *gin.Context, idName string) (uint, Error)
- func HashPass(p string) (string, Error)
- func InternalServerError(message string) Error
- func NewError(message string, status int, ErrorType string) Error
- func NotFound(message string) Error
- func ParseError(err error) Error
- func Unautorized(message string) Error
- func UnprocessibleEntity(message string) Error
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePass ¶
func VerifyToken ¶
Types ¶
type Error ¶
func BadRequest ¶
func InternalServerError ¶
func ParseError ¶
func Unautorized ¶
func UnprocessibleEntity ¶
type ErrorResponse ¶
type ErrorResponse struct { ErrorMessage string `json:"message"` ErrorStatus int `json:"status"` ErrorType string `json:"error"` }
func (*ErrorResponse) Message ¶
func (e *ErrorResponse) Message() string
func (*ErrorResponse) Status ¶
func (e *ErrorResponse) Status() int
func (*ErrorResponse) Type ¶
func (e *ErrorResponse) Type() string
Click to show internal directories.
Click to hide internal directories.