common

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const NoneResult = "__thing_none__"

NoneResult is a marker value for cache indicating a known-missing record. Used to differentiate between "key not in cache" and "key exists, but represents no record".

Variables

View Source
var (
	ErrLockNotAcquired = errors.New("thing: could not acquire lock")
	// ErrCacheNoneResult indicates the cache key exists but holds the NoneResult marker.
	ErrCacheNoneResult = errors.New("thing: cache indicates record does not exist (NoneResult marker found)")
	ErrInvalidID       = errors.New("thing: invalid ID format")
	ErrModelNotSet     = errors.New("thing: model not set")
	ErrNilContext      = errors.New("thing: nil context provided")
	ErrTransactionDone = errors.New("thing: transaction has already been committed or rolled back")
	ErrDatabaseNotSet  = errors.New("thing: database adapter not set")
	ErrCacheNotSet     = errors.New("thing: cache client not set")
	ErrInvalidPage     = errors.New("thing: invalid page number, must be >= 1")
	// ErrQueryCacheNoneResult indicates that the cache holds the marker for an empty query result set.
	ErrQueryCacheNoneResult = errors.New("thing: cached query result indicates no matching records")
)

Additional package-level errors

View Source
var ErrNotFound = errors.New("thing: requested item not found")

ErrNotFound is returned when a requested item (e.g., cache key, database record) is not found.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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