boltdb

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: BSD-2-Clause Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBoltDB

func NewBoltDB() (db.DB, error)

NewBoltDB returns a BoltDB that uses db as database.

Types

type BoltDB

type BoltDB struct {
	*bolt.DB
}

A BoltDB uses Bolt to persist URLs.

func (*BoltDB) GetURL

func (db *BoltDB) GetURL(key []byte) ([]byte, error)

func (*BoltDB) SaveURL

func (db *BoltDB) SaveURL(url string, keybuffer <-chan []byte) (string, error)

SaveURL saves the given url using a key from the keybuffer as short URL.

Jump to

Keyboard shortcuts

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