errors

package
v0.0.0-...-a297e19 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(code int, message string) error

New creates a new error

func NewWithHTTPCode

func NewWithHTTPCode(httpCode, code int, message string) error

NewWithHTTPCode creates a new error with HTTP code

Types

type Error

type Error struct {
	HTTPCode *int   `json:"-"`
	Code     int    `json:"code"`
	Message  string `json:"message"`
}

Error is the error message

func (*Error) Error

func (e *Error) Error() string

Error returns the error message

func (*Error) GetHTTPCode

func (e *Error) GetHTTPCode() int

GetHTTPCode returns the HTTP code

Jump to

Keyboard shortcuts

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