api_error

package
v0.0.0-...-bf3b954 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlobalErrorHandler

func GlobalErrorHandler(err error, c echo.Context)

Types

type ApiError

type ApiError struct {
	Code        int
	MessageCode string
	Err         error
}

func NewApiError

func NewApiError(statuscode int, msgCode string, err error) ApiError

func NewBadRequestError

func NewBadRequestError(code string, err error) ApiError

func NewForbiddenError

func NewForbiddenError(code string, err error) ApiError

func NewNotFoundError

func NewNotFoundError(code string, err error) ApiError

func NewUnauthorizedError

func NewUnauthorizedError(code string, err error) ApiError

func (ApiError) Error

func (e ApiError) Error() string

func (ApiError) Unwrap

func (e ApiError) Unwrap() error

type I18n

type I18n struct {
	Ar string
	En string
}

func (I18n) Translate

func (i I18n) Translate(lang string) string

Jump to

Keyboard shortcuts

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