boltdb

package
v2.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package BoltDB provides tools for using Bolt as a standard persistence layer for services

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAO

type DAO interface {
	dao.DAO
	DB() *bolt.DB
	Compact(opts map[string]interface{}) (int64, int64, error)
}

DAO defines the functions specific to the boltdb dao

type Handler

type Handler struct {
	dao.DAO
}

Handler for the main functions of the DAO

func NewDAO

func NewDAO(driver string, dsn string, prefix string) *Handler

NewDAO creates a new handler for the boltdb dao

func (*Handler) Compact

func (h *Handler) Compact(opts map[string]interface{}) (old int64, new int64, err error)

Compact makes a copy of the current DB and replace it as a connection

func (*Handler) DB

func (h *Handler) DB() *bolt.DB

DB returns the bolt DB object

func (*Handler) Init

func (h *Handler) Init(configx.Values) error

Init initialises the handler

Jump to

Keyboard shortcuts

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