boltdb

package
v0.0.0-...-cb1006b Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	DB   *bolt.DB
	Path string
}

Store represents a boltdb storage location

func NewStore

func NewStore(path string) *Store

NewStore represents a new instance of a rediscache storage location

func (*Store) Close

func (s *Store) Close() error

func (*Store) Delete

func (s *Store) Delete(shortCode string) error

func (*Store) GetShortCode

func (s *Store) GetShortCode(destination string) (string, error)

func (*Store) GetURL

func (s *Store) GetURL(shortCode string) (models.URL, error)

func (*Store) Health

func (s *Store) Health() bool

func (*Store) Open

func (s *Store) Open() error

func (*Store) SetURL

func (s *Store) SetURL(shortCode, url string) error

Jump to

Keyboard shortcuts

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