db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoEntryFound = fmt.Errorf("no entry found")
	ErrNoNextEntry  = fmt.Errorf("no next entry found")
	ErrNoPrevEntry  = fmt.Errorf("no previous entry found")
)

Functions

This section is empty.

Types

type DB

type DB interface {
	HasEntry(v1.ID) bool
	Get(v1.ID, bool) (*v1.Entry, error)
	CreateOrUpdateEntry(*v1.Entry) (*v1.Entry, error)
	ListAll() ([]*v1.Entry, error)
	Next(v1.ID) (*v1.Entry, error)
	Previous(v1.ID) (*v1.Entry, error)
	StoragePath(v1.ID) string
	Count() int

	Reconcile(v1.ID) (*v1.Entry, error)

	Status() v1.SyncStatus
	Validate() error
}

DB is the interface any plugin satisfies to provide a backend for storing and fetching notes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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