pkgerr

package
v0.0.0-...-eef0f43 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Errno

type Errno int32
const (
	ErrnoInternal Errno = iota
	ErrnoRepository
	ErrnoEntityNotLoaded
)

Internal Error

const (
	ErrnoBadRequest Errno = 1000 + iota
	ErrnoEmptyField
	ErrnoInvalidTime
	ErrnoDuplicateValue
)

Bad Request

const (
	ErrnoConflict Errno = 2000 + iota
	ErrnoValueAlreadyExists
)

Confict

const (
	ErrnoNotFound Errno = 3000 + iota
)

Not Found

type Known

type Known struct {
	Errno  Errno
	Simple error
	Origin error
}

func AsKnown

func AsKnown(err error) *Known

func (Known) Error

func (k Known) Error() string

func (Known) SimpleError

func (k Known) SimpleError() string

Jump to

Keyboard shortcuts

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