notes

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package notes stores private source notes for one local worktree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddInput

type AddInput struct {
	File   string
	Line   int
	Body   string
	Author Author
}

type Author

type Author string
const (
	AuthorUser  Author = "user"
	AuthorAgent Author = "agent"
)

type EditInput

type EditInput struct {
	Body  *string
	File  *string
	Line  *int
	State *State
}

type Error

type Error struct {
	Code    string
	Message string
}

Error reports a stable failure code for the command boundary.

func (*Error) Error

func (e *Error) Error() string

type Note

type Note struct {
	ID              string    `json:"id"`
	File            string    `json:"file"`
	Line            int       `json:"line"`
	LineFingerprint string    `json:"lineFingerprint"`
	Body            string    `json:"body"`
	Author          Author    `json:"author"`
	State           State     `json:"state"`
	CreatedAt       time.Time `json:"createdAt"`
	UpdatedAt       time.Time `json:"updatedAt"`
}

type State

type State string
const (
	StateOpen     State = "open"
	StateResolved State = "resolved"
	StateStale    State = "stale"
)

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(worktree, configDir string) (*Store, error)

func (*Store) Add

func (s *Store) Add(input AddInput) (Note, error)

func (*Store) Edit

func (s *Store) Edit(id string, input EditInput) (Note, error)

func (*Store) List

func (s *Store) List(filter *State) ([]Note, error)

func (*Store) Remove

func (s *Store) Remove(id string) (Note, error)

func (*Store) Sync

func (s *Store) Sync() (SyncResult, error)

func (*Store) Worktree

func (s *Store) Worktree() string

type SyncResult

type SyncResult struct {
	Checked int
	Staled  []Note
}

Jump to

Keyboard shortcuts

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