Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶
Types ¶
type AuthTokenService ¶
type AuthTokenService interface { GenerateToken(payload interface{}) (string, error) ValidateToken(token string) (*jwt.Token, error) }
func NewAuthTokenService ¶
func NewAuthTokenService() AuthTokenService
type BadRequestError ¶
type BadRequestError struct {
Message string
}
func NewBadRequestError ¶
func NewBadRequestError(msg string) BadRequestError
func (BadRequestError) Error ¶
func (e BadRequestError) Error() string
type FileService ¶
type FileService interface { Upload(params UploadParams) (string, error) OpenFormFile(c *gin.Context, fh *multipart.FileHeader) (multipart.File, error) ValidateImage(c *gin.Context, fh *multipart.FileHeader, field string, maxSize int64) error }
func NewFileService ¶
func NewFileService() FileService
type NotFoundError ¶
type NotFoundError struct {
Message string
}
func NewNotFoundError ¶
func NewNotFoundError(msg string) NotFoundError
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type PaginationMeta ¶
type ResponseDto ¶
type ResponseDto struct { Code int `json:"code"` Status string `json:"status"` Message string `json:"message"` Data interface{} `json:"data"` }
func WrapperResponse ¶
func WrapperResponse(code int, status string, message string, data interface{}) ResponseDto
type UnauthorizedError ¶
type UnauthorizedError struct {
}func NewUnauthorizedError ¶
func NewUnauthorizedError(msg string) UnauthorizedError
func (UnauthorizedError) Error ¶
func (e UnauthorizedError) Error() string
type UploadParams ¶
Click to show internal directories.
Click to hide internal directories.