Documentation
¶
Index ¶
- func ImportPath(ctx context.Context, client *Client, targetPath, targetFolder string) (*noteops.ImportResult, error)
- func IsCLISubcommand(cmd string) bool
- type Client
- func (c *Client) AddWhiteboardElement(ctx context.Context, boardRef string, in noteops.AddWhiteboardElementInput) (*noteops.WhiteboardElementMutationResult, error)
- func (c *Client) AppendNote(ctx context.Context, idOrPrefix, content string) (*noteops.NoteDetail, error)
- func (c *Client) AttachNoteToWhiteboard(ctx context.Context, boardIDOrPrefix string, ...) (*model.Whiteboard, error)
- func (c *Client) ClearWhiteboardElements(ctx context.Context, boardRef string) (*model.Whiteboard, error)
- func (c *Client) ConnectWhiteboardElements(ctx context.Context, boardRef string, ...) (*noteops.WhiteboardElementMutationResult, error)
- func (c *Client) ConvertNoteBlock(ctx context.Context, noteRef, blockRef, targetType string, ...) (*noteops.NoteBlockMutationResult, error)
- func (c *Client) CreateCollection(ctx context.Context, in noteops.CreateCollectionInput) (*noteops.CollectionDetail, error)
- func (c *Client) CreateCollectionProperty(ctx context.Context, colRef string, in noteops.CreateCollectionPropertyInput) (*noteops.CollectionPropertyInfo, error)
- func (c *Client) CreateCollectionRecord(ctx context.Context, colRef string, in noteops.CreateCollectionRecordInput) (*noteops.CollectionRecord, error)
- func (c *Client) CreateCollectionTemplate(ctx context.Context, colRef string, in noteops.CreateCollectionTemplateInput) (*noteops.TemplateDetail, error)
- func (c *Client) CreateCollectionView(ctx context.Context, colRef string, in noteops.CreateCollectionViewInput) (*noteops.CollectionViewInfo, error)
- func (c *Client) CreateFolder(ctx context.Context, in noteops.CreateFolderInput) (*noteops.FolderInfo, error)
- func (c *Client) CreateNote(ctx context.Context, in noteops.CreateNoteInput) (*noteops.NoteDetail, error)
- func (c *Client) CreateNoteComment(ctx context.Context, noteRef string, in noteops.CreateCommentInput) (*model.CommentThread, error)
- func (c *Client) CreateTemplate(ctx context.Context, in noteops.CreateTemplateInput) (*noteops.TemplateDetail, error)
- func (c *Client) CreateWhiteboard(ctx context.Context, in noteops.CreateWhiteboardInput) (*model.Whiteboard, error)
- func (c *Client) DeleteCollection(ctx context.Context, colRef string, permanent bool) (*noteops.CollectionDetail, error)
- func (c *Client) DeleteCollectionProperty(ctx context.Context, colRef, propRef string, permanent bool) (map[string]any, error)
- func (c *Client) DeleteCollectionRecord(ctx context.Context, colRef, recordRef string, permanent bool) (*noteops.CollectionRecord, error)
- func (c *Client) DeleteCollectionTemplate(ctx context.Context, colRef, tplRef string, permanent bool) (map[string]any, error)
- func (c *Client) DeleteCollectionView(ctx context.Context, colRef, viewRef string, permanent bool) (map[string]any, error)
- func (c *Client) DeleteComment(ctx context.Context, ref string) (*noteops.DeleteCommentResult, error)
- func (c *Client) DeleteFolder(ctx context.Context, ref string) (*noteops.FolderInfo, error)
- func (c *Client) DeleteNote(ctx context.Context, idOrPrefix string) (*noteops.NoteDetail, error)
- func (c *Client) DeleteNoteBlock(ctx context.Context, noteRef, blockRef string) (*noteops.DeleteNoteBlockResult, error)
- func (c *Client) DeleteTemplate(ctx context.Context, tplRef string, permanent bool) (string, error)
- func (c *Client) DeleteWhiteboard(ctx context.Context, idOrPrefix string, permanent bool) (*model.Whiteboard, error)
- func (c *Client) DeleteWhiteboardElement(ctx context.Context, boardRef, elemRef string) (*noteops.DeleteWhiteboardElementResult, error)
- func (c *Client) DetachNoteFromWhiteboard(ctx context.Context, boardIDOrPrefix, noteIDOrPrefix string) (*model.Whiteboard, error)
- func (c *Client) DownloadExportZip(ctx context.Context, includeTrash bool) ([]byte, error)
- func (c *Client) DuplicateCollectionTemplate(ctx context.Context, colRef, tplRef string) (*noteops.TemplateDetail, error)
- func (c *Client) DuplicateCollectionView(ctx context.Context, colRef, viewRef, newName string) (*noteops.CollectionViewInfo, error)
- func (c *Client) EditCommentMessage(ctx context.Context, msgRef, body string) (*model.CommentThread, error)
- func (c *Client) ExportWhiteboardSVG(ctx context.Context, boardRef string) (string, error)
- func (c *Client) GetBacklinks(ctx context.Context, idOrPrefix string) (*noteops.NoteBacklinksResult, error)
- func (c *Client) GetCollection(ctx context.Context, colRef string) (*noteops.CollectionDetail, error)
- func (c *Client) GetCollectionRecord(ctx context.Context, colRef, recordRef string) (*noteops.CollectionRecord, error)
- func (c *Client) GetCollectionTemplate(ctx context.Context, colRef, tplRef string) (*noteops.TemplateDetail, error)
- func (c *Client) GetCommentThread(ctx context.Context, threadRef string) (*model.CommentThread, error)
- func (c *Client) GetNote(ctx context.Context, idOrPrefix string) (*noteops.NoteDetail, error)
- func (c *Client) GetNoteBlock(ctx context.Context, noteRef, blockRef string) (*noteops.DocumentBlockDTO, error)
- func (c *Client) GetNoteRevision(ctx context.Context, noteRef, revIDOrPrefix string) (*noteops.NoteRevisionDetail, error)
- func (c *Client) GetTemplate(ctx context.Context, tplRef string) (*noteops.TemplateDetail, error)
- func (c *Client) GetWhiteboard(ctx context.Context, idOrPrefix string) (*model.Whiteboard, error)
- func (c *Client) ImportMarkdown(ctx context.Context, in noteops.ImportMarkdownInput) (*noteops.ImportResult, error)
- func (c *Client) ImportZip(ctx context.Context, rawZip []byte, targetFolder string) (*noteops.ImportResult, error)
- func (c *Client) InsertNoteBlocks(ctx context.Context, noteRef string, in noteops.InsertBlocksInput) (*noteops.NoteBlockMutationResult, error)
- func (c *Client) InstantiateCollectionTemplate(ctx context.Context, colRef, tplRef string, ...) (*noteops.NoteDetail, error)
- func (c *Client) InstantiateTemplate(ctx context.Context, idOrName string, in noteops.InstantiateTemplateInput) (*noteops.NoteDetail, error)
- func (c *Client) ListCollectionProperties(ctx context.Context, colRef string) ([]noteops.CollectionPropertyInfo, error)
- func (c *Client) ListCollectionRecords(ctx context.Context, colRef, viewRef string, limit, offset int) (*noteops.CollectionRecordListResult, error)
- func (c *Client) ListCollectionTemplates(ctx context.Context, colRef string) ([]model.Template, error)
- func (c *Client) ListCollectionViews(ctx context.Context, colRef string) ([]noteops.CollectionViewInfo, error)
- func (c *Client) ListCollections(ctx context.Context, includeDeleted, includeEmbedded bool) ([]noteops.CollectionDetail, error)
- func (c *Client) ListFolders(ctx context.Context) ([]noteops.FolderInfo, error)
- func (c *Client) ListNoteBlocks(ctx context.Context, noteRef string) (*noteops.NoteBlocksResult, error)
- func (c *Client) ListNoteComments(ctx context.Context, noteRef, status string) ([]model.CommentThread, error)
- func (c *Client) ListNoteRevisions(ctx context.Context, noteRef string) ([]noteops.NoteRevisionSummary, error)
- func (c *Client) ListOrSearchNotes(ctx context.Context, q, scope, folder, tag string, limit, offset int) (*noteops.NoteListResult, error)
- func (c *Client) ListTags(ctx context.Context) ([]noteops.TagInfo, error)
- func (c *Client) ListTemplates(ctx context.Context, scope string) ([]model.Template, error)
- func (c *Client) ListWhiteboardElements(ctx context.Context, boardRef string) (*noteops.WhiteboardElementsResult, error)
- func (c *Client) ListWhiteboards(ctx context.Context, includeDeleted, includeEmbedded bool) ([]model.WhiteboardSummary, error)
- func (c *Client) MoveNoteBlock(ctx context.Context, noteRef, blockRef, targetBlockRef, position string) (*noteops.NoteBlockMutationResult, error)
- func (c *Client) ReorderCollectionViews(ctx context.Context, colRef string, orderedRefs []string) ([]noteops.CollectionViewInfo, error)
- func (c *Client) ReplyCommentThread(ctx context.Context, threadRef, author, body string) (*model.CommentThread, error)
- func (c *Client) ResolveCommentThread(ctx context.Context, threadRef string, resolved bool, actor string) (*model.CommentThread, error)
- func (c *Client) RestoreCollection(ctx context.Context, colRef string) (*noteops.CollectionDetail, error)
- func (c *Client) RestoreFolder(ctx context.Context, ref string) (*noteops.FolderInfo, error)
- func (c *Client) RestoreNote(ctx context.Context, idOrPrefix string) (*noteops.NoteDetail, error)
- func (c *Client) RestoreNoteRevision(ctx context.Context, noteRef, revIDOrPrefix string) (*noteops.NoteDetail, error)
- func (c *Client) RestoreWhiteboard(ctx context.Context, idOrPrefix string) (*model.Whiteboard, error)
- func (c *Client) SeedDemoWorkspace(ctx context.Context, in noteops.SeedDemoInput) (*noteops.SeedDemoResult, error)
- func (c *Client) SetDefaultCollectionTemplate(ctx context.Context, colRef, tplRef string) (*noteops.TemplateDetail, error)
- func (c *Client) UpdateCollection(ctx context.Context, colRef string, in noteops.UpdateDatabaseInput) (*noteops.CollectionDetail, error)
- func (c *Client) UpdateCollectionProperty(ctx context.Context, colRef, propRef string, ...) (*noteops.CollectionPropertyInfo, error)
- func (c *Client) UpdateCollectionRecord(ctx context.Context, colRef, recordRef string, ...) (*noteops.CollectionRecord, error)
- func (c *Client) UpdateCollectionTemplate(ctx context.Context, colRef, tplRef string, ...) (*noteops.TemplateDetail, error)
- func (c *Client) UpdateCollectionView(ctx context.Context, colRef, viewRef string, ...) (*noteops.CollectionViewInfo, error)
- func (c *Client) UpdateFolder(ctx context.Context, ref string, in noteops.UpdateFolderInput) (*noteops.FolderInfo, error)
- func (c *Client) UpdateNote(ctx context.Context, idOrPrefix string, in noteops.UpdateNoteInput) (*noteops.NoteDetail, error)
- func (c *Client) UpdateNoteBlock(ctx context.Context, noteRef, blockRef string, in noteops.UpdateBlockInput) (*noteops.NoteBlockMutationResult, error)
- func (c *Client) UpdateTemplate(ctx context.Context, tplRef string, in noteops.UpdateTemplateInput) (*noteops.TemplateDetail, error)
- func (c *Client) UpdateWhiteboard(ctx context.Context, boardRef string, in noteops.UpdateWhiteboardInput) (*model.Whiteboard, error)
- func (c *Client) UpdateWhiteboardElement(ctx context.Context, boardRef, elemRef string, ...) (*noteops.WhiteboardElementMutationResult, error)
- type ExportResult
- type GlobalOptions
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportPath ¶
func ImportPath(ctx context.Context, client *Client, targetPath, targetFolder string) (*noteops.ImportResult, error)
ImportPath imports a local .md file, directory tree (Obsidian vault or Markdown folder), or .zip archive into the Mote server via POST /api/v1/import/markdown or POST /api/v1/import/zip.
func IsCLISubcommand ¶
IsCLISubcommand reports whether cmd is a user-facing note/MCP/skill/upgrade CLI subcommand.
Types ¶
type Client ¶
Client is a lightweight HTTP client for talking to the local Mote HTTP server.
func NewClient ¶
NewClient constructs a Client targeting baseURL (default http://127.0.0.1:5230).
func (*Client) AddWhiteboardElement ¶
func (c *Client) AddWhiteboardElement(ctx context.Context, boardRef string, in noteops.AddWhiteboardElementInput) (*noteops.WhiteboardElementMutationResult, error)
func (*Client) AppendNote ¶
func (*Client) AttachNoteToWhiteboard ¶
func (c *Client) AttachNoteToWhiteboard(ctx context.Context, boardIDOrPrefix string, in noteops.AttachNoteToWhiteboardInput) (*model.Whiteboard, error)
func (*Client) ClearWhiteboardElements ¶
func (*Client) ConnectWhiteboardElements ¶
func (c *Client) ConnectWhiteboardElements(ctx context.Context, boardRef string, in noteops.ConnectWhiteboardElementsInput) (*noteops.WhiteboardElementMutationResult, error)
func (*Client) ConvertNoteBlock ¶
func (*Client) CreateCollection ¶
func (c *Client) CreateCollection(ctx context.Context, in noteops.CreateCollectionInput) (*noteops.CollectionDetail, error)
func (*Client) CreateCollectionProperty ¶
func (c *Client) CreateCollectionProperty(ctx context.Context, colRef string, in noteops.CreateCollectionPropertyInput) (*noteops.CollectionPropertyInfo, error)
func (*Client) CreateCollectionRecord ¶
func (c *Client) CreateCollectionRecord(ctx context.Context, colRef string, in noteops.CreateCollectionRecordInput) (*noteops.CollectionRecord, error)
func (*Client) CreateCollectionTemplate ¶
func (c *Client) CreateCollectionTemplate(ctx context.Context, colRef string, in noteops.CreateCollectionTemplateInput) (*noteops.TemplateDetail, error)
func (*Client) CreateCollectionView ¶
func (c *Client) CreateCollectionView(ctx context.Context, colRef string, in noteops.CreateCollectionViewInput) (*noteops.CollectionViewInfo, error)
func (*Client) CreateFolder ¶
func (c *Client) CreateFolder(ctx context.Context, in noteops.CreateFolderInput) (*noteops.FolderInfo, error)
func (*Client) CreateNote ¶
func (c *Client) CreateNote(ctx context.Context, in noteops.CreateNoteInput) (*noteops.NoteDetail, error)
func (*Client) CreateNoteComment ¶
func (c *Client) CreateNoteComment(ctx context.Context, noteRef string, in noteops.CreateCommentInput) (*model.CommentThread, error)
func (*Client) CreateTemplate ¶
func (c *Client) CreateTemplate(ctx context.Context, in noteops.CreateTemplateInput) (*noteops.TemplateDetail, error)
func (*Client) CreateWhiteboard ¶
func (c *Client) CreateWhiteboard(ctx context.Context, in noteops.CreateWhiteboardInput) (*model.Whiteboard, error)
func (*Client) DeleteCollection ¶
func (*Client) DeleteCollectionProperty ¶
func (*Client) DeleteCollectionRecord ¶
func (*Client) DeleteCollectionTemplate ¶
func (*Client) DeleteCollectionView ¶
func (*Client) DeleteComment ¶
func (*Client) DeleteFolder ¶
func (*Client) DeleteNote ¶
func (*Client) DeleteNoteBlock ¶
func (*Client) DeleteTemplate ¶
func (*Client) DeleteWhiteboard ¶
func (*Client) DeleteWhiteboardElement ¶
func (*Client) DetachNoteFromWhiteboard ¶
func (*Client) DownloadExportZip ¶
DownloadExportZip downloads the server-generated workspace .zip archive.
func (*Client) DuplicateCollectionTemplate ¶
func (*Client) DuplicateCollectionView ¶
func (*Client) EditCommentMessage ¶
func (*Client) ExportWhiteboardSVG ¶
func (*Client) GetBacklinks ¶
func (*Client) GetCollection ¶
func (*Client) GetCollectionRecord ¶
func (*Client) GetCollectionTemplate ¶
func (*Client) GetCommentThread ¶
func (*Client) GetNoteBlock ¶
func (*Client) GetNoteRevision ¶
func (*Client) GetTemplate ¶
func (*Client) GetWhiteboard ¶
func (*Client) ImportMarkdown ¶
func (c *Client) ImportMarkdown(ctx context.Context, in noteops.ImportMarkdownInput) (*noteops.ImportResult, error)
ImportMarkdown uploads structured Markdown files to POST /api/v1/import/markdown.
func (*Client) ImportZip ¶
func (c *Client) ImportZip(ctx context.Context, rawZip []byte, targetFolder string) (*noteops.ImportResult, error)
ImportZip uploads a raw .zip archive to POST /api/v1/import/zip.
func (*Client) InsertNoteBlocks ¶
func (c *Client) InsertNoteBlocks(ctx context.Context, noteRef string, in noteops.InsertBlocksInput) (*noteops.NoteBlockMutationResult, error)
func (*Client) InstantiateCollectionTemplate ¶
func (c *Client) InstantiateCollectionTemplate(ctx context.Context, colRef, tplRef string, in noteops.InstantiateCollectionTemplateInput) (*noteops.NoteDetail, error)
func (*Client) InstantiateTemplate ¶
func (c *Client) InstantiateTemplate(ctx context.Context, idOrName string, in noteops.InstantiateTemplateInput) (*noteops.NoteDetail, error)
func (*Client) ListCollectionProperties ¶
func (*Client) ListCollectionRecords ¶
func (*Client) ListCollectionTemplates ¶
func (*Client) ListCollectionViews ¶
func (*Client) ListCollections ¶
func (*Client) ListFolders ¶
func (*Client) ListNoteBlocks ¶
func (*Client) ListNoteComments ¶
func (*Client) ListNoteRevisions ¶
func (*Client) ListOrSearchNotes ¶
func (*Client) ListTemplates ¶
func (*Client) ListWhiteboardElements ¶
func (*Client) ListWhiteboards ¶
func (*Client) MoveNoteBlock ¶
func (*Client) ReorderCollectionViews ¶
func (*Client) ReplyCommentThread ¶
func (*Client) ResolveCommentThread ¶
func (*Client) RestoreCollection ¶
func (*Client) RestoreFolder ¶
func (*Client) RestoreNote ¶
func (*Client) RestoreNoteRevision ¶
func (*Client) RestoreWhiteboard ¶
func (*Client) SeedDemoWorkspace ¶
func (c *Client) SeedDemoWorkspace(ctx context.Context, in noteops.SeedDemoInput) (*noteops.SeedDemoResult, error)
SeedDemoWorkspace calls POST /api/v1/demo/seed to idempotently populate the Mote showcase dataset.
func (*Client) SetDefaultCollectionTemplate ¶
func (*Client) UpdateCollection ¶
func (c *Client) UpdateCollection(ctx context.Context, colRef string, in noteops.UpdateDatabaseInput) (*noteops.CollectionDetail, error)
func (*Client) UpdateCollectionProperty ¶
func (c *Client) UpdateCollectionProperty(ctx context.Context, colRef, propRef string, in noteops.UpdateCollectionPropertyInput) (*noteops.CollectionPropertyInfo, error)
func (*Client) UpdateCollectionRecord ¶
func (c *Client) UpdateCollectionRecord(ctx context.Context, colRef, recordRef string, in noteops.UpdateCollectionRecordInput) (*noteops.CollectionRecord, error)
func (*Client) UpdateCollectionTemplate ¶
func (c *Client) UpdateCollectionTemplate(ctx context.Context, colRef, tplRef string, in noteops.UpdateCollectionTemplateInput) (*noteops.TemplateDetail, error)
func (*Client) UpdateCollectionView ¶
func (c *Client) UpdateCollectionView(ctx context.Context, colRef, viewRef string, in noteops.UpdateCollectionViewInput) (*noteops.CollectionViewInfo, error)
func (*Client) UpdateFolder ¶
func (c *Client) UpdateFolder(ctx context.Context, ref string, in noteops.UpdateFolderInput) (*noteops.FolderInfo, error)
func (*Client) UpdateNote ¶
func (c *Client) UpdateNote(ctx context.Context, idOrPrefix string, in noteops.UpdateNoteInput) (*noteops.NoteDetail, error)
func (*Client) UpdateNoteBlock ¶
func (c *Client) UpdateNoteBlock(ctx context.Context, noteRef, blockRef string, in noteops.UpdateBlockInput) (*noteops.NoteBlockMutationResult, error)
func (*Client) UpdateTemplate ¶
func (c *Client) UpdateTemplate(ctx context.Context, tplRef string, in noteops.UpdateTemplateInput) (*noteops.TemplateDetail, error)
func (*Client) UpdateWhiteboard ¶
func (c *Client) UpdateWhiteboard(ctx context.Context, boardRef string, in noteops.UpdateWhiteboardInput) (*model.Whiteboard, error)
func (*Client) UpdateWhiteboardElement ¶
func (c *Client) UpdateWhiteboardElement(ctx context.Context, boardRef, elemRef string, in noteops.UpdateWhiteboardElementInput) (*noteops.WhiteboardElementMutationResult, error)
type ExportResult ¶
type ExportResult struct {
OutPath string `json:"out"`
NoteCount int `json:"note_count"`
BlobCount int `json:"blob_count"`
WhiteboardCount int `json:"whiteboard_count,omitempty"`
Files []string `json:"files"`
}
ExportResult summarizes a completed `mote export` archive.
type GlobalOptions ¶
type GlobalOptions struct {
Server string
ServerFlagExplicit bool
ServerEnvExplicit bool
Token string
DataDir string
DataFlagExplicit bool
DataEnvExplicit bool
Direct bool
JSONOut bool
}
GlobalOptions holds CLI-wide transport & formatting settings.
type Runner ¶
type Runner struct {
In io.Reader
Out io.Writer
ErrOut io.Writer
StdinIsTTY bool
HTTPClient *http.Client
DefaultServerURL string
BuildVersion string
CLIOnly bool
UpdaterClient *updater.Client
}
Runner executes user-facing Mote CLI subcommands against a local/remote Mote HTTP server or directly against the local SQLite WAL database in-process when no server is running.
func DefaultRunner ¶
func DefaultRunner() *Runner
DefaultRunner builds a Runner wired to os.Stdin / os.Stdout / os.Stderr.