Documentation
¶
Overview ¶
Package gitlocal implements the Backend interface using the local filesystem with a Git repository for history. Each write operation produces one commit.
Index ¶
- type Backend
- func (b *Backend) AddLink(fromID, toID, annotation, linkType, linkStatus string) error
- func (b *Backend) AddLinks(fromID string, targets []backend.LinkTarget) error
- func (b *Backend) BulkUpdateLinks(fromID string, updates []backend.LinkUpdate) error
- func (b *Backend) BulkWrite(notes []*note.Note) error
- func (b *Backend) Delete(id string) error
- func (b *Backend) List() ([]*note.Note, error)
- func (b *Backend) Promote(id string, to note.Status) error
- func (b *Backend) Read(id string) (*note.Note, error)
- func (b *Backend) RemoveLink(fromID, toID string) error
- func (b *Backend) RemoveLinkByType(fromID, toID, linkType string) error
- func (b *Backend) Update(n *note.Note) error
- func (b *Backend) UpdateLink(fromID, toID string, annotation, linkType, linkStatus *string) error
- func (b *Backend) Write(n *note.Note) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend stores notes as Markdown files in a Git-backed directory.
func (*Backend) AddLinks ¶
func (b *Backend) AddLinks(fromID string, targets []backend.LinkTarget) error
AddLinks adds multiple annotated links from fromID in a single git commit.
func (*Backend) BulkUpdateLinks ¶
func (b *Backend) BulkUpdateLinks(fromID string, updates []backend.LinkUpdate) error
BulkUpdateLinks applies multiple link updates to fromID in a single git commit.
func (*Backend) BulkWrite ¶ added in v0.14.0
BulkWrite writes all notes and commits in a single commit.
func (*Backend) RemoveLink ¶
RemoveLink removes the link from fromID to toID and commits.
func (*Backend) RemoveLinkByType ¶ added in v0.35.1
RemoveLinkByType removes only edges from fromID to toID with the given type.
func (*Backend) UpdateLink ¶
UpdateLink modifies the annotation, type, and/or status of an existing link without removing it. nil pointer arguments mean "leave unchanged".