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 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) Update(n *note.Note) error
- func (b *Backend) UpdateLink(fromID, toID string, annotation, linkType *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) UpdateLink ¶
UpdateLink modifies the annotation and/or type of an existing link without removing it. nil pointer arguments mean "leave unchanged".