storage

package
v0.0.0-...-402233a Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *bolt.DB

数据库实例

View Source
var (
	// 没有桶
	ErrNoBucket = errors.New("no bucket")
)

Functions

func Backup

func Backup(writer io.Writer) (int64, error)

备份数据库

func Close

func Close() error

关闭连接

func Connect

func Connect(path string) error

连接到数据库

func EnsureBucketExists

func EnsureBucketExists(tx *bolt.Tx, args ...string) (*bolt.Bucket, error)

确保桶存在

func GetBucketIfExists

func GetBucketIfExists(tx *bolt.Tx, args ...string) (*bolt.Bucket, error)

获取桶若存在

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