errors

package
v0.0.0-...-4af438e Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Code

func Code(code int, msg string, data ...interface{}) error

Code NewCode

func CodeData

func CodeData(code int, data interface{}) error

CodeData NewCode

func HTTP

func HTTP(code int, err ...error) error

HTTP HTTP

func New

func New(msg string) error

New New

Types

type Error

type Error struct {
	ECode   int         `json:"code,omitempty"`
	Token   string      `json:"token,omitempty"`
	Message string      `json:"message,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

Error Error

func (*Error) Code

func (e *Error) Code() int

Code Code

func (*Error) Error

func (e *Error) Error() string

Error Error

type HTTPError

type HTTPError struct {
	Code int
	// contains filtered or unexported fields
}

HTTPError Error

func (*HTTPError) Status

func (e *HTTPError) Status() int

Status Status

Jump to

Keyboard shortcuts

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