Documentation ¶
Index ¶
- type APIError
- func NewAPIError(message string, statusCode int, err string, causes []interface{}) APIError
- func NewAPIErrorFromBytes(body []byte) (APIError, error)
- func NewBadRequestError(message string) APIError
- func NewInternalServerError(message string, err error) APIError
- func NewNotFoundError(message string) APIError
- func NewUnauthorizedError(message string) APIError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError interface untuk mengembalikan error
func NewAPIError ¶
NewAPIError membuat api error baru dengan mendifinisikan semua isinyas
func NewAPIErrorFromBytes ¶
NewAPIErrorFromBytes membuat api error dari []byte
func NewBadRequestError ¶
NewBadRequestError membuat error jika kesalahan ada pada user
func NewInternalServerError ¶
NewInternalServerError membuat error 500 internal
func NewNotFoundError ¶
NewNotFoundError membuat api error ketika objek yang dicari tidak ditemukan
func NewUnauthorizedError ¶
NewUnauthorizedError membuat api error user yang tidak diijinkan masuk
Click to show internal directories.
Click to hide internal directories.