Documentation ¶
Index ¶
- func ComparePassword(p string, h string) bool
- type Error
- func BadRequest(message string) Error
- func GenerateToken(id int, email string, role string) (string, Error)
- func GetIdParam(context *gin.Context, paramName string) (int, Error)
- func HashPassword(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 Unauthorized(message string) Error
- func UnprocessibleEntity(message string) Error
- func VerifyToken(context *gin.Context) (interface{}, Error)
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePassword ¶
Types ¶
type Error ¶
func BadRequest ¶
func HashPassword ¶
func InternalServerError ¶
func ParseError ¶
func Unauthorized ¶
func UnprocessibleEntity ¶
func VerifyToken ¶
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.