bolt

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bolt

type Bolt struct {
	// contains filtered or unexported fields
}

Bolt is a representation of the bolt datastore

func Init

func Init(config *config.BoltConfig) (Bolt, error)

Init creates a new boltdb with given settings

func (*Bolt) BumpHitCount

func (db *Bolt) BumpHitCount(id string) error

BumpHitCount updates the hit number on a certain link

func (db *Bolt) CreateLink(link models.Link) error

CreateLink stores a new link into database

func (db *Bolt) DeleteLink(id string) error

DeleteLink removes a link from the database

func (db *Bolt) GetAllLinks() (map[string]models.Link, error)

GetAllLinks returns an unpaginated list of current links

func (db *Bolt) GetLink(id string) (models.Link, error)

GetLink returns a link by short name

Jump to

Keyboard shortcuts

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