errors

package
v0.0.0-...-e6fe8c5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAlreadyExistingKey

func NewAlreadyExistingKey(key string) error

func NewEncoding

func NewEncoding(key string) error

func NewInvalidData

func NewInvalidData(key string) error

func NewInvalidRange

func NewInvalidRange(initial, offset int64) error

func NewNonExistingKey

func NewNonExistingKey(key string) error

func NewNotFound

func NewNotFound(key string) error

func NewValueBelowZero

func NewValueBelowZero(key string) error

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.

func (Encoding) Error

func (e Encoding) Error() string

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.

func (NotFound) Error

func (e NotFound) Error() string

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

Jump to

Keyboard shortcuts

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