Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCodeExists = errors.New("snowdrift: code already exists")
View Source
var ErrNotFound = errors.New("snowdrift: not found")
View Source
var ErrURLExists = errors.New("snowdrift: url already exists")
Functions ¶
Types ¶
type Backend ¶
type Backend interface {
Add(url, digest, code string) error
GetCode(digest string) (string, error)
GetURL(code string) (string, error)
NextID(obscure bool) (int, error)
}
func NewMemoryBackend ¶
func NewMemoryBackend() Backend
type MemoryBackend ¶
type MemoryBackend struct {
// contains filtered or unexported fields
}
func (*MemoryBackend) Add ¶
func (b *MemoryBackend) Add(url, digest, code string) error
type RedisBackend ¶
type RedisBackend struct {
// contains filtered or unexported fields
}
func (*RedisBackend) Add ¶
func (b *RedisBackend) Add(url, digest, code string) error
type RiakBackend ¶
type RiakBackend struct {
IDBackend
// contains filtered or unexported fields
}
func (*RiakBackend) Add ¶
func (b *RiakBackend) Add(url, digest, code string) error
Click to show internal directories.
Click to hide internal directories.
