errs

package
v0.2.2-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Code    ErrorCode
	Message string
	// contains filtered or unexported fields
}

func NewAppError

func NewAppError(code ErrorCode, msg string) *AppError

NewAppError creates a new AppError instance.

func (*AppError) Error

func (a *AppError) Error() string

func (*AppError) NewEchoHttpError

func (a *AppError) NewEchoHttpError() error

NewEchoHttpError this method return a new instance HttpError

func (*AppError) NewGRPCError

func (a *AppError) NewGRPCError() error

type ErrorCode

type ErrorCode int
const (
	ResourceInvalid ErrorCode = iota
	ResourceInUse
	ResourceNotFound
	ResourceUnauthorized
	ResourceDuplicated
)

Jump to

Keyboard shortcuts

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