pbdb

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pbdb provides types and functions for storing note maps using a small number of protocol buffer message types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFinder

func NewFinder(r DbReader) notes.Finder

func NewLoader

func NewLoader(r DbReader) notes.Loader

func NewNoteMap

func NewNoteMap(db Db) notes.NoteMap

Types

type Db

type Db interface {
	NewReaderTransaction() DbReaderTransaction
	NewReadWriterTransaction() DbReadWriterTransaction
	io.Closer
}

type DbReadWriter

type DbReadWriter interface {
	DbReader
	Store([]*pb.Note) error
	Delete([]uint64) error
}

DbReader stores and removes pb.Note messages.

type DbReadWriterTransaction

type DbReadWriterTransaction interface {
	DbReaderTransaction
	DbReadWriter
	Commit() error
}

type DbReader

type DbReader interface {
	Find(q *notes.Query) ([]uint64, error)
	Load(id ...uint64) ([]*pb.Note, error)
}

DbReader finds and loads pb.Note messages.

type DbReaderTransaction

type DbReaderTransaction interface {
	DbReader
	Discard()
}

Directories

Path Synopsis
Package notespb defines protocol buffer message types intended for use in note maps data storage APIs.
Package notespb defines protocol buffer message types intended for use in note maps data storage APIs.

Jump to

Keyboard shortcuts

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