dberr

package
v0.0.0-...-f7d1ac2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeInternal      = 1
	CodeNotFound      = 2
	CodeAlreadyExists = 3
	CodeConflict      = 4
)

Variables

This section is empty.

Functions

func IsConflict

func IsConflict(err error) bool

func IsNotFound

func IsNotFound(err error) bool

Types

type DBErrReason

type DBErrReason = kebError.ErrReason
const (
	ErrDBInternal      DBErrReason = "err_db_internal"
	ErrDBNotFound      DBErrReason = "err_db_not_found"
	ErrDBAlreadyExists DBErrReason = "err_db_already_exists"
	ErrDBConflict      DBErrReason = "err_db_conflict"
	ErrDBUnknown       DBErrReason = "err_db_unknown"
)

type Error

type Error interface {
	Append(string, ...interface{}) Error
	Code() int
	Error() string
}

func AlreadyExists

func AlreadyExists(format string, a ...interface{}) Error

func Conflict

func Conflict(format string, a ...interface{}) Error

func Internal

func Internal(format string, a ...interface{}) Error

func NotFound

func NotFound(format string, a ...interface{}) Error

Jump to

Keyboard shortcuts

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