storage

package
v0.0.0-...-1bce007 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a link is not found in the storage
	ErrNotFound = errors.New("not found")
	// ErrShortNameAlreadyExists is returned when a link already exists in the storage
	ErrShortNameAlreadyExists = errors.New("given short name is already used by another link")
	// ErrStorageFailure is returned in case of a storage problem
	ErrStorageFailure = errors.New("storage failure")
)

Functions

func SlicePaginate

func SlicePaginate(pageNum int, pageSize int, sliceLength int) (start int, end int)

SlicePaginate is a handy function to paginate a slice taking into account its length

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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