db

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close closes the bolt db. Should be called with defer after init in the main() func.

func DeleteFromBucket

func DeleteFromBucket(key string, bucket string) error

DeleteFromBucket deletes an item from a bucket

func DeleteSearches

func DeleteSearches() error

DeleteSearches removes all Search data and buckets

func GetAllFromBucket

func GetAllFromBucket(bucket string) (map[string][]byte, error)

GetAllFromBucket returns all items from a bucket

func GetFromBucket

func GetFromBucket(key string, bucket string) ([]byte, error)

GetFromBucket returns an item from a bucket

func GetLatestPublicSearchList

func GetLatestPublicSearchList(limit int) []string

GetLatestPublicSearchList most recent public searches

func GetMatches

func GetMatches(searchID string, slug string) ([]byte, error)

GetMatches get Search Matches data by ID

func GetSearch

func GetSearch(searchID string) ([]byte, error)

GetSearch get Search data by ID

func GetSummary

func GetSummary(searchID string) ([]byte, error)

GetSummary get Search Summary by ID

func PutToBucket

func PutToBucket(key string, content []byte, bucket string) error

PutToBucket adds an item to bucket

func SaveMatches

func SaveMatches(searchID string, list map[string][]byte) error

SaveMatches saves the Search Matches to DB

func SaveSearch

func SaveSearch(searchID string, created string, private bool, bytes []byte) error

SaveSearch saves the Search data to DB

func SaveSummary

func SaveSummary(searchID string, bytes []byte) error

SaveSummary saves the Search Summary to DB

func Setup

func Setup(dir string)

Setup opens a new bolt db and ensures default buckets exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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