errcode

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeNotFound     = "ERR_NOT_FOUND"
	ErrCodeValidation   = "ERR_VALIDATION"
	ErrCodeUnauthorized = "ERR_UNAUTHORIZED"
	ErrCodeForbidden    = "ERR_FORBIDDEN"
	ErrCodeRateLimited  = "ERR_RATE_LIMITED"
	ErrCodeTimeout      = "ERR_TIMEOUT"
	ErrCodeDBConnection = "ERR_DB_CONNECTION"
	ErrCodeDBQuery      = "ERR_DB_QUERY"
	ErrCodeNATS         = "ERR_NATS"
	ErrCodeInternal     = "ERR_INTERNAL"
)

Variables

This section is empty.

Functions

func ErrDBConnection

func ErrDBConnection(inner error) error

func ErrDBQuery

func ErrDBQuery(op, table string, inner error) error

func ErrForbidden

func ErrForbidden(resource string) error

func ErrInternal

func ErrInternal(inner error) error

func ErrNATSPublish

func ErrNATSPublish(subject string, inner error) error

func ErrNotFound

func ErrNotFound(resource string, id any) error

func ErrRateLimited

func ErrRateLimited(retryAfter int) error

func ErrStatus

func ErrStatus(status int, msg string, kv ...any) error

func ErrTimeout

func ErrTimeout(operation string) error

func ErrUnauthorized

func ErrUnauthorized(reason string) error

func ErrValidation

func ErrValidation(field, constraint string, val any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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