e

package
v0.0.0-...-3d44fc7 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFound        = &ErrorCode{Code: http.StatusNotFound, Type: "NotFound"}
	NotAcceptable   = &ErrorCode{Code: http.StatusNotAcceptable, Type: "NotAcceptable"}
	Unknown         = &ErrorCode{Code: http.StatusInternalServerError, Type: "Unknown"}
	Internal        = &ErrorCode{Code: http.StatusInternalServerError, Type: "InternalError"}
	TooManyRequests = &ErrorCode{Code: http.StatusTooManyRequests, Type: "TooManyRequests"}

	InvalidArgument = &ErrorCode{Code: http.StatusBadRequest, Type: "InvalidArgument"}
)

Functions

This section is empty.

Types

type ApiError

type ApiError interface {
	GetCode() int
	GetType() string
	GetMessage() string
	GetCause() error
}

func NewApiError

func NewApiError(errCode *ErrorCode, msg string, err error) ApiError

type ErrorCode

type ErrorCode struct {
	Code int
	Type string
}

Jump to

Keyboard shortcuts

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