errors

package
v0.0.0-...-d389d3b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBError

type DBError struct {
	Retryable bool

	ErrorType DBErrorType
	// contains filtered or unexported fields
}

func NewDBError

func NewDBError(options ...DBErrorOption) *DBError

func (DBError) Error

func (d DBError) Error() string

func (DBError) Unwrap

func (d DBError) Unwrap() error

type DBErrorOption

type DBErrorOption func(dbError *DBError)

func WithError

func WithError(err error) DBErrorOption

func WithRetryableAndError

func WithRetryableAndError(retryable bool, err error) DBErrorOption

func WithRetryableAndTypeAndError

func WithRetryableAndTypeAndError(retryable bool, dbErrorType DBErrorType, err error) DBErrorOption

type DBErrorType

type DBErrorType int
const (
	Generic DBErrorType = iota
	DuplicateEntry
	LockWaitTimeout
	IncorrectInteger
)

Jump to

Keyboard shortcuts

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