zettel_id_provider

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FilePathZettelIdYin  = "Yin"
	FilePathZettelIdYang = "Yang"
)

Variables

This section is empty.

Functions

func Clean

func Clean(v string) string

Types

type BlobResolver

type BlobResolver func(markl.Id) ([]string, error)

BlobResolver fetches a blob by its MarklId and returns the newline-delimited words it contains.

type ErrDoesNotExist

type ErrDoesNotExist struct {
	Value string
}

func (ErrDoesNotExist) Error

func (err ErrDoesNotExist) Error() string

func (ErrDoesNotExist) GetErrorType

func (err ErrDoesNotExist) GetErrorType() pkgErrDisamb

func (ErrDoesNotExist) Is

func (err ErrDoesNotExist) Is(target error) bool

type ErrZettelIdsExhausted

type ErrZettelIdsExhausted struct{}

func (ErrZettelIdsExhausted) Error

func (err ErrZettelIdsExhausted) Error() string

func (ErrZettelIdsExhausted) GetErrorCause

func (err ErrZettelIdsExhausted) GetErrorCause() []string

func (ErrZettelIdsExhausted) GetErrorRecovery

func (err ErrZettelIdsExhausted) GetErrorRecovery() []string

func (ErrZettelIdsExhausted) GetErrorType

func (err ErrZettelIdsExhausted) GetErrorType() pkgErrDisamb

func (ErrZettelIdsExhausted) Is

func (err ErrZettelIdsExhausted) Is(target error) bool

type Provider

type Provider struct {
	sync.Locker
	// contains filtered or unexported fields
}

func New

func New(ps directory_layout.RepoMutable) (f *Provider, err error)

func NewFromLog

func NewFromLog(
	directoryLayout directory_layout.RepoMutable,
	resolveBlob BlobResolver,
) (f *Provider, err error)

NewFromLog builds a Provider by replaying the zettel ID log. Each log entry references a blob containing delta words; resolveBlob fetches those words. When the log does not exist or is empty, falls back to reading flat files via New.

func (*Provider) Left

func (hf *Provider) Left() provider

func (*Provider) Right

func (hf *Provider) Right() provider

Jump to

Keyboard shortcuts

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