Versions in this module Expand all Collapse all v0 v0.3.0 Sep 17, 2026 v0.2.0 Sep 16, 2026 Changes in this version + func ResolveAuthTokenForSource(baseURL, flagToken, profileToken, source string) string + func ResolveWorkspaceSource(source string) (string, error) type Target + func ResolveTargetWithSource(vaultSelector, serverSelector, flagToken, source string) (Target, error) v0.1.0 Sep 10, 2026 Changes in this version + const RemoteTokenEnv + func LooksLikeServerURL(value string) bool + func RememberTarget(t Target) error + func ResolveAuthToken(flagToken, profileToken string) string + func ResolveAuthTokenFor(baseURL, flagToken, profileToken string) string + type AddCommentInput struct + AnchorText string + Author string + Body string + Path string + type Backend interface + AppendToNote func(ctx context.Context, rel, text string) (vault.NoteMeta, error) + ArchiveNote func(ctx context.Context, rel string) (vault.NoteMeta, error) + Backlinks func(ctx context.Context, rel string) ([]vault.NoteMeta, error) + CreateFolder func(ctx context.Context, folder vault.NoteFolder, subpath string) error + CreateNote func(ctx context.Context, folder vault.NoteFolder, title, subpath string, ...) (vault.NoteMeta, error) + DatabaseOps func() *database.Ops + DeleteFolder func(ctx context.Context, folder vault.NoteFolder, subpath string) error + DeleteNote func(ctx context.Context, rel string) error + DeleteTemplate func(ctx context.Context, sourcePath string) error + Describe func(ctx context.Context) (Description, error) + DuplicateNote func(ctx context.Context, rel string) (vault.NoteMeta, error) + EmptyTrash func(ctx context.Context) error + InsertAtLine func(ctx context.Context, rel string, lineNumber int, text string) (vault.NoteMeta, error) + Kind func() Kind + Label func() string + ListAssets func(ctx context.Context) ([]vault.AssetMeta, error) + ListComments func(ctx context.Context, rel string) ([]vault.NoteComment, error) + ListFolders func(ctx context.Context) ([]vault.FolderEntry, error) + ListNotes func(ctx context.Context) ([]vault.NoteMeta, error) + ListTemplates func(ctx context.Context) ([]vault.CustomTemplateFile, error) + MoveNote func(ctx context.Context, rel string, folder vault.NoteFolder, subpath string) (vault.NoteMeta, error) + MoveToTrash func(ctx context.Context, rel string) (vault.NoteMeta, error) + PrependToNote func(ctx context.Context, rel, text string) (vault.NoteMeta, error) + ReadAsset func(ctx context.Context, rel string) ([]byte, error) + ReadNote func(ctx context.Context, rel string) (vault.NoteContent, error) + RenameFolder func(ctx context.Context, folder vault.NoteFolder, oldSubpath, newSubpath string) (string, error) + RenameNote func(ctx context.Context, rel, nextTitle string) (vault.NoteMeta, error) + ReplaceInNote func(ctx context.Context, rel, find, replace string, all bool) (vault.NoteMeta, int, error) + RestoreFromTrash func(ctx context.Context, rel string) (vault.NoteMeta, error) + Root func() string + ScanTasks func(ctx context.Context, opts vault.ParseTasksOptions) ([]vault.Task, error) + ScanTasksForPath func(ctx context.Context, rel string, opts vault.ParseTasksOptions) ([]vault.Task, error) + SearchText func(ctx context.Context, query string, limit int) ([]vault.TextSearchMatch, error) + ToggleTask func(ctx context.Context, taskID string, dialect vault.TaskDialect) (*vault.Task, error) + UnarchiveNote func(ctx context.Context, rel string) (vault.NoteMeta, error) + UpdateVaultSettings func(ctx context.Context, patch func(raw map[string]any)) error + VaultSettings func(ctx context.Context) (vault.VaultSettings, error) + WriteComments func(ctx context.Context, rel string, comments []vault.NoteComment) ([]vault.NoteComment, error) + WriteNote func(ctx context.Context, rel, body string) (vault.NoteMeta, error) + WriteTemplate func(ctx context.Context, input vault.WriteTemplateInput) (vault.CustomTemplateFile, error) + func New(target Target, opts Options) (Backend, error) + type CommentThreadView struct + AnchorText string + Line int + Replies []CommentView + Resolved bool + ResolvedAt *int64 + func AddComment(ctx context.Context, b Backend, in AddCommentInput) (CommentThreadView, error) + func ListCommentThreads(ctx context.Context, b Backend, rel string, includeResolved bool) ([]CommentThreadView, error) + func ReplyToComment(ctx context.Context, b Backend, in ReplyInput) (CommentThreadView, error) + func ResolveComment(ctx context.Context, b Backend, rel, id string, resolved bool) (CommentThreadView, error) + type CommentView struct + Author *string + Body string + CreatedAt int64 + ID string + UpdatedAt int64 + type Description struct + AuthConfigured bool + BaseURL string + Kind Kind + Name string + PrimaryNotesLocation vault.PrimaryNotesLocation + Root string + VaultName string + VaultPath string + type Kind string + const KindLocal + const KindRemote + type Local struct + func (l *Local) AppendToNote(_ context.Context, rel, text string) (vault.NoteMeta, error) + func (l *Local) ArchiveNote(_ context.Context, rel string) (vault.NoteMeta, error) + func (l *Local) Backlinks(_ context.Context, rel string) ([]vault.NoteMeta, error) + func (l *Local) CreateFolder(_ context.Context, folder vault.NoteFolder, subpath string) error + func (l *Local) CreateNote(_ context.Context, folder vault.NoteFolder, title, subpath string, ...) (vault.NoteMeta, error) + func (l *Local) DatabaseOps() *database.Ops + func (l *Local) DeleteFolder(_ context.Context, folder vault.NoteFolder, subpath string) error + func (l *Local) DeleteNote(_ context.Context, rel string) error + func (l *Local) DeleteTemplate(_ context.Context, sourcePath string) error + func (l *Local) Describe(context.Context) (Description, error) + func (l *Local) DuplicateNote(_ context.Context, rel string) (vault.NoteMeta, error) + func (l *Local) EmptyTrash(context.Context) error + func (l *Local) InsertAtLine(_ context.Context, rel string, lineNumber int, text string) (vault.NoteMeta, error) + func (l *Local) Kind() Kind + func (l *Local) Label() string + func (l *Local) ListAssets(context.Context) ([]vault.AssetMeta, error) + func (l *Local) ListComments(_ context.Context, rel string) ([]vault.NoteComment, error) + func (l *Local) ListFolders(context.Context) ([]vault.FolderEntry, error) + func (l *Local) ListNotes(context.Context) ([]vault.NoteMeta, error) + func (l *Local) ListTemplates(context.Context) ([]vault.CustomTemplateFile, error) + func (l *Local) MoveNote(_ context.Context, rel string, folder vault.NoteFolder, subpath string) (vault.NoteMeta, error) + func (l *Local) MoveToTrash(_ context.Context, rel string) (vault.NoteMeta, error) + func (l *Local) PrependToNote(_ context.Context, rel, text string) (vault.NoteMeta, error) + func (l *Local) ReadAsset(_ context.Context, rel string) ([]byte, error) + func (l *Local) ReadNote(_ context.Context, rel string) (vault.NoteContent, error) + func (l *Local) RenameFolder(_ context.Context, folder vault.NoteFolder, oldSubpath, newSubpath string) (string, error) + func (l *Local) RenameNote(_ context.Context, rel, nextTitle string) (vault.NoteMeta, error) + func (l *Local) ReplaceInNote(_ context.Context, rel, find, replace string, all bool) (vault.NoteMeta, int, error) + func (l *Local) RestoreFromTrash(_ context.Context, rel string) (vault.NoteMeta, error) + func (l *Local) Root() string + func (l *Local) ScanTasks(_ context.Context, opts vault.ParseTasksOptions) ([]vault.Task, error) + func (l *Local) ScanTasksForPath(_ context.Context, rel string, opts vault.ParseTasksOptions) ([]vault.Task, error) + func (l *Local) SearchText(_ context.Context, query string, limit int) ([]vault.TextSearchMatch, error) + func (l *Local) ToggleTask(_ context.Context, taskID string, dialect vault.TaskDialect) (*vault.Task, error) + func (l *Local) UnarchiveNote(_ context.Context, rel string) (vault.NoteMeta, error) + func (l *Local) UpdateVaultSettings(_ context.Context, patch func(raw map[string]any)) error + func (l *Local) Vault() *vault.Vault + func (l *Local) VaultSettings(context.Context) (vault.VaultSettings, error) + func (l *Local) WriteComments(_ context.Context, rel string, comments []vault.NoteComment) ([]vault.NoteComment, error) + func (l *Local) WriteNote(_ context.Context, rel, body string) (vault.NoteMeta, error) + func (l *Local) WriteTemplate(_ context.Context, input vault.WriteTemplateInput) (vault.CustomTemplateFile, error) + type Options struct + SyncTitleHeading bool + type Remote struct + func (r *Remote) AppendToNote(ctx context.Context, rel, text string) (vault.NoteMeta, error) + func (r *Remote) ArchiveNote(ctx context.Context, rel string) (vault.NoteMeta, error) + func (r *Remote) Backlinks(ctx context.Context, rel string) ([]vault.NoteMeta, error) + func (r *Remote) Client() *remote.Client + func (r *Remote) CreateFolder(ctx context.Context, folder vault.NoteFolder, subpath string) error + func (r *Remote) CreateNote(ctx context.Context, folder vault.NoteFolder, title, subpath string, ...) (vault.NoteMeta, error) + func (r *Remote) DatabaseOps() *database.Ops + func (r *Remote) DeleteFolder(ctx context.Context, folder vault.NoteFolder, subpath string) error + func (r *Remote) DeleteNote(ctx context.Context, rel string) error + func (r *Remote) DeleteTemplate(ctx context.Context, sourcePath string) error + func (r *Remote) Describe(ctx context.Context) (Description, error) + func (r *Remote) DuplicateNote(ctx context.Context, rel string) (vault.NoteMeta, error) + func (r *Remote) EmptyTrash(ctx context.Context) error + func (r *Remote) InsertAtLine(ctx context.Context, rel string, lineNumber int, text string) (vault.NoteMeta, error) + func (r *Remote) Kind() Kind + func (r *Remote) Label() string + func (r *Remote) ListAssets(ctx context.Context) ([]vault.AssetMeta, error) + func (r *Remote) ListComments(ctx context.Context, rel string) ([]vault.NoteComment, error) + func (r *Remote) ListFolders(ctx context.Context) ([]vault.FolderEntry, error) + func (r *Remote) ListNotes(ctx context.Context) ([]vault.NoteMeta, error) + func (r *Remote) ListTemplates(ctx context.Context) ([]vault.CustomTemplateFile, error) + func (r *Remote) MoveNote(ctx context.Context, rel string, folder vault.NoteFolder, subpath string) (vault.NoteMeta, error) + func (r *Remote) MoveToTrash(ctx context.Context, rel string) (vault.NoteMeta, error) + func (r *Remote) PrependToNote(ctx context.Context, rel, text string) (vault.NoteMeta, error) + func (r *Remote) ReadAsset(ctx context.Context, rel string) ([]byte, error) + func (r *Remote) ReadNote(ctx context.Context, rel string) (vault.NoteContent, error) + func (r *Remote) RenameFolder(ctx context.Context, folder vault.NoteFolder, oldSubpath, newSubpath string) (string, error) + func (r *Remote) RenameNote(ctx context.Context, rel, nextTitle string) (vault.NoteMeta, error) + func (r *Remote) ReplaceInNote(ctx context.Context, rel, find, replace string, all bool) (vault.NoteMeta, int, error) + func (r *Remote) RestoreFromTrash(ctx context.Context, rel string) (vault.NoteMeta, error) + func (r *Remote) Root() string + func (r *Remote) ScanTasks(ctx context.Context, opts vault.ParseTasksOptions) ([]vault.Task, error) + func (r *Remote) ScanTasksForPath(ctx context.Context, rel string, opts vault.ParseTasksOptions) ([]vault.Task, error) + func (r *Remote) SearchText(ctx context.Context, query string, limit int) ([]vault.TextSearchMatch, error) + func (r *Remote) ToggleTask(ctx context.Context, taskID string, dialect vault.TaskDialect) (*vault.Task, error) + func (r *Remote) UnarchiveNote(ctx context.Context, rel string) (vault.NoteMeta, error) + func (r *Remote) UpdateVaultSettings(ctx context.Context, patch func(raw map[string]any)) error + func (r *Remote) VaultSettings(ctx context.Context) (vault.VaultSettings, error) + func (r *Remote) WriteComments(ctx context.Context, rel string, comments []vault.NoteComment) ([]vault.NoteComment, error) + func (r *Remote) WriteNote(ctx context.Context, rel, body string) (vault.NoteMeta, error) + func (r *Remote) WriteTemplate(ctx context.Context, input vault.WriteTemplateInput) (vault.CustomTemplateFile, error) + type ReplyInput struct + Author string + Body string + ID string + Path string + type Target struct + AuthToken string + BaseURL string + Kind Kind + Name string + Root string + func ResolveDefaultTarget(flagToken string) (Target, error) + func ResolveServerTarget(selector, flagToken string) (Target, error) + func ResolveTarget(vaultSelector, serverSelector, flagToken string) (Target, error) + func ResolveVaultTarget(selector, flagToken string) (Target, error) + func TargetForWorkspace(ws config.Workspaces, name, flagToken string) (Target, bool)