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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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