errs

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PermissionDenied = ErrorCode(codes.PermissionDenied)
	NotFound         = ErrorCode(codes.NotFound)
	InvalidArgument  = ErrorCode(codes.InvalidArgument)
	Internal         = ErrorCode(codes.Internal)
	Unauthenticated  = ErrorCode(codes.Unauthenticated)
)

Variables

Functions

This section is empty.

Types

type Error

type Error struct {
	Msg string `json:"msg"`
	// Code of error (internal, permission denied, etc).
	Code ErrorCode `json:"code"`
	// Index - must be a unique error identifier.
	Index int `json:"index"`
}

func New

func New(msg string, code ErrorCode, index int) *Error

func (*Error) Error

func (e *Error) Error() string

type ErrorCode

type ErrorCode codes.Code

Jump to

Keyboard shortcuts

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