truncated

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandFinder

func ExpandFinder(tf IDFinder, l notes.Loader) notes.Finder

ExpandFinder combines tf and l to provide a full notes.Finder implementation.

func ExpandLoader

func ExpandLoader(tl TruncatedLoader) notes.Loader

ExpandLoader expands tl into a full Loader implementation with built-in caching.

func ExpandNote

func ExpandNote(tn TruncatedNote, l notes.Loader) notes.Note

ExpandNote uses tn and l to provide a full notes.Note implementation.

Types

type IDFinder

type IDFinder interface {
	FindNoteIDs(*notes.Query) ([]notes.ID, error)
}

IDFinder can be implemented in order to provide a notes.Finder through ExpandFinder.

type TruncatedLoader

type TruncatedLoader interface {
	LoadTruncatedNotes([]notes.ID) ([]TruncatedNote, error)
}

TruncatedLoader can be implemented in order to provide a Loader through ExpandLoader.

type TruncatedNote

type TruncatedNote struct {
	ID          notes.ID
	ValueString string
	ValueType   notes.ID
	Contents    []notes.ID
}

TruncatedNote is a minimal representation of a note that can simplify the implementation of the Loader and Finder interfaces.

Jump to

Keyboard shortcuts

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