errors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Error   error
	Message string
	Code    int
	Custom  interface{}
}

func HTTPErrorTOJSON

func HTTPErrorTOJSON(error HTTPError) (string, *AppError)

func MarshallingError

func MarshallingError(err error) *AppError

func NewAppError

func NewAppError(error error, message string, code int64, custom interface{}) *AppError

func UnsupportedOperation

func UnsupportedOperation() *AppError

type HTTPError

type HTTPError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Error   struct {
		Code    int    `json:"code"`
		Name    string `json:"name"`
		What    string `json:"what"`
		Details []struct {
			Message    string `json:"message"`
			File       string `json:"file"`
			LineNumber int    `json:"line_number"`
			Method     string `json:"method"`
		} `json:"details"`
	} `json:"error"`
}

Jump to

Keyboard shortcuts

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