db

package
v0.0.0-...-55c0a6c Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	Key     []byte
	Payload []byte
}

type Parameter

type Parameter struct {
	DbFilePath string
	Timeout    time.Duration
	Mode       os.FileMode
}

type Query

type Query struct {
	Bucket  string
	Type    QueryType
	Content *Document
}

type QueryType

type QueryType uint8
const (
	QUERYTYPE_READ QueryType = iota
	QUERYTYPE_WRITE
	QUERYTYPE_CREATE
	QUERYTYPE_DELETE
	MINBUCKETNAME_SIZE = 1
	MINKEY_SIZE        = 32
)

type Response

type Response struct {
	Error error
	Data  []byte
	Key   []byte
}

type Store

type Store struct {
	Db *bolt.DB
	// contains filtered or unexported fields
}

func NewStore

func NewStore(p *Parameter) (*Store, error)

func (*Store) Close

func (s *Store) Close()

func (*Store) Connect

func (s *Store) Connect(in <-chan *Query, quit <-chan bool) <-chan *Response

Jump to

Keyboard shortcuts

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