errors

package
v0.0.0-...-88d673b Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPResponse

func HTTPResponse(err error, body interface{}) (int, interface{})

HTTPResponse - this is used to set http response

Types

type Error

type Error struct {
	ErrorCode    string `json:"errorCode"`
	ErrorMessage string `json:"message"`
}

Error - this is the error response

func AssignError

func AssignError(err error) *Error

AssignError - this will assign error

func New

func New(errorCode string, logMessage ...interface{}) *Error

New - create new Error

func (Error) Error

func (e Error) Error() string

Error - convert error into string

func (Error) HTTPResponse

func (e Error) HTTPResponse(body interface{}) (int, interface{})

HTTPResponse - this is used to set http response

Jump to

Keyboard shortcuts

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