tiny

package module
v0.0.0-...-bf66f95 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: MIT Imports: 8 Imported by: 0

README

tiny

persistent data structures based on boltdb

Status: deprecated

Documentation

Overview

Package tiny implements persistent data structures.

Index

Constants

View Source
const (
	ModeDisk = iota
	ModeMem
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func Open

func Open(path string) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) Path

func (db *DB) Path() string

func (*DB) Store

func (db *DB) Store() Store

type Map

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

func (*Map) Contains

func (m *Map) Contains(k string) bool

func (*Map) Foreach

func (m *Map) Foreach(f func(k string, v interface{}) error) error

func (*Map) Get

func (m *Map) Get(k string) (interface{}, error)

func (*Map) Put

func (m *Map) Put(k string, v interface{}) error

func (*Map) Remove

func (m *Map) Remove(k string) error

func (*Map) Store

func (m *Map) Store() Store

type Mode

type Mode int

type Store

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

func (Store) List

func (s Store) List() ([]string, error)

func (Store) OpenMap

func (s Store) OpenMap(name string, mode Mode, v interface{}) (m *Map, err error)

func (Store) Remove

func (s Store) Remove(name string) error

Jump to

Keyboard shortcuts

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