database

package
v0.0.0-...-07c2c16 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrNotFound = "database not found"
	ErrCantOpen = "can't open database"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CouchDB

type CouchDB struct {
	Host string `yaml:"host"`
	Port string `yaml:"port"`
	// contains filtered or unexported fields
}

func CreateCouchDB

func CreateCouchDB(config *CouchDB) CouchDB

func (*CouchDB) Connect

func (c *CouchDB) Connect() error

type Database

type Database struct {
	CouchDB CouchDB `yaml:"couch_db"`
	// contains filtered or unexported fields
}

func CreateDatabase

func CreateDatabase(dataDir string, config *Database) Database

func (*Database) Close

func (d *Database) Close(dbName string)

func (*Database) CloseAll

func (d *Database) CloseAll()

func (*Database) Get

func (d *Database) Get(dbName string) (*leveldb.DB, error)

func (*Database) Open

func (d *Database) Open(dbName string) (*leveldb.DB, error)

Jump to

Keyboard shortcuts

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