intdb

package
v0.0.0-...-b743a0b Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Dir is the directory path for save the database

Functions

This section is empty.

Types

type DB

type DB struct {
	Dir string
	// contains filtered or unexported fields
}

DB is the main database struct

func New

func New(dir string) *DB

New return a new DB struct

func (*DB) Close

func (d *DB) Close() error

Close close the database

func (*DB) Delete

func (d *DB) Delete(key string) error

func (*DB) Get

func (d *DB) Get(key string) (string, error)

Get get the value from database

func (*DB) Open

func (d *DB) Open() error

Open open the database

func (*DB) Set

func (d *DB) Set(key string, v interface{}) error

Set set a new in the database

func (*DB) SetSafe

func (d *DB) SetSafe(key string, v interface{}) error

Jump to

Keyboard shortcuts

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