Documentation
¶
Index ¶
- func NewAlreadyExistingKey(key string) error
- func NewEncoding(key string) error
- func NewInvalidData(key string) error
- func NewInvalidRange(initial, offset int64) error
- func NewNonExistingKey(key string) error
- func NewNotFound(key string) error
- func NewValueBelowZero(key string) error
- type AlreadyExistingKey
- type Encoding
- type InvalidData
- type InvalidRange
- type NonExistingKey
- type NotFound
- type ValueBelowZero
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAlreadyExistingKey ¶
func NewEncoding ¶
func NewInvalidData ¶
func NewInvalidRange ¶
func NewNonExistingKey ¶
func NewNotFound ¶
func NewValueBelowZero ¶
Types ¶
type AlreadyExistingKey ¶
type AlreadyExistingKey struct {
// contains filtered or unexported fields
}
AlreadyExisingKey is an error type used for when the key is expected not to exist in the cache yet, but it is already present.
func (AlreadyExistingKey) Error ¶
func (e AlreadyExistingKey) Error() string
type Encoding ¶
type Encoding struct {
// contains filtered or unexported fields
}
Encoding is an error used when encoding data to bytes fails.
type InvalidData ¶
type InvalidData struct {
// contains filtered or unexported fields
}
InvalidData errors are ussed when we have data for a given key, but the data type does not match a slice of bytes (`[]byte`).
func (InvalidData) Error ¶
func (e InvalidData) Error() string
type InvalidRange ¶
type InvalidRange struct {
// contains filtered or unexported fields
}
InvalidRange errors are used when we want to increment or decrement a value which is out of range of the specific operation.
func (InvalidRange) Error ¶
func (e InvalidRange) Error() string
type NonExistingKey ¶
type NonExistingKey struct {
// contains filtered or unexported fields
}
NonExistingKey errors are used when we look if a key exists. It is not to be confused with the `NotFound` error.
func (NonExistingKey) Error ¶
func (e NonExistingKey) Error() string
type NotFound ¶
type NotFound struct {
// contains filtered or unexported fields
}
NotFound errors are used when we expect the data to be in the cache already but it isn't.
type ValueBelowZero ¶
type ValueBelowZero struct {
// contains filtered or unexported fields
}
ValueBelowZero errors are used for incrementing issues where the value drops below zero, which is not supported by all caches.
func (ValueBelowZero) Error ¶
func (e ValueBelowZero) Error() string