database

package
v0.0.0-...-bbf135f Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boltdb

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

Boltdb takes a role for interfaces of data store. implements simra.Databaser.

func (*Boltdb) Close

func (database *Boltdb) Close()

Close closes database. it is necessary to call this function after using database functions.

func (*Boltdb) Get

func (database *Boltdb) Get(key string) interface{}

Get returns put data.

func (*Boltdb) Open

func (database *Boltdb) Open(dirpath string) error

Open opens new DB connection. Open will create a DB file under dirpath if not exist.

func (*Boltdb) Put

func (database *Boltdb) Put(key string, value interface{})

Put puts a data to database. input must have ability to be casted into byte array.

Jump to

Keyboard shortcuts

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