storage

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("URL does not exist")
	ErrAlreadyExists = errors.New("Alias already exists")
)

Errors

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Get(alias string) (string, error)
	Exists(alias string) (bool, error)
	Store(url, alias string) error
}

A Provider implements all the necessary functions for a storage backend for URLs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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