Documentation
¶
Index ¶
- func InitBrowseModel(orgDir, obsidianDir string, st *state.State, ...) browseModel
- func InitDaemonModel() daemonModel
- func InitStatusModel(orgDir, obsidianDir string, resolveFunc func(string, string, string) error, ...) statusModel
- func InitSyncModel() syncModel
- type BrowseData
- type BrowseMsg
- type DaemonData
- type DaemonMsg
- type DiffMsg
- type FileInfo
- type RefreshBrowseMsg
- type RefreshStatusMsg
- type ResolutionAction
- type ResolveMsg
- type StatusData
- type StatusMsg
- type SyncMsg
- type SyncResult
- type TickMsg
- type UpdateFilesScannedMsg
- type UpdateFilesSyncedMsg
- type UpdateStatusMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitBrowseModel ¶
func InitBrowseModel(orgDir, obsidianDir string, st *state.State, resolveFunc func(string, string, string) error, refreshFunc func()) browseModel
InitBrowseModel creates a new file browser model
func InitDaemonModel ¶
func InitDaemonModel() daemonModel
InitDaemonModel creates a new daemon status model
Types ¶
type BrowseData ¶
type BrowseData struct {
Files []FileInfo
}
BrowseData holds all tracked files and their status
type BrowseMsg ¶
type BrowseMsg struct {
Data *BrowseData
Err error
}
BrowseMsg is sent when browse data is ready
type DaemonData ¶
type DaemonData struct {
Running bool
PID int
StartTime time.Time
LastSyncTime time.Time
FilesSynced int
LogLines []string
}
DaemonData holds daemon status information
type DaemonMsg ¶
type DaemonMsg struct {
Data *DaemonData
Err error
}
DaemonMsg is sent when daemon data is ready
type FileInfo ¶
type FileInfo struct {
BaseName string
OrgPath string
MdPath string
Status string // "synced", "pending-org", "pending-md", "conflict"
StatusIcon string // "✓", "→", "←", "⚠"
HasOrgFile bool
HasMdFile bool
}
FileInfo represents a tracked file pair with its status
type RefreshBrowseMsg ¶
type RefreshBrowseMsg struct{}
RefreshBrowseMsg triggers a browse data refresh
type ResolutionAction ¶
type ResolutionAction string
ResolutionAction represents a conflict resolution choice
const ( UseOrg ResolutionAction = "org" UseMarkdown ResolutionAction = "markdown" LastWriteWins ResolutionAction = "last-write-wins" Skip ResolutionAction = "skip" )
type ResolveMsg ¶
type ResolveMsg struct {
Action ResolutionAction
FileRow fileRow
}
ResolveMsg is sent when a file resolution is chosen
type StatusData ¶
type StatusData struct {
OrgDir string
ObsidianDir string
Interval time.Duration
OrgFileCount int
MdFileCount int
TrackedPairs int
PendingOrg []string
PendingMd []string
Conflicts []string
IDMapCount int
Scanning bool
}
StatusData holds all the information for the status display
type StatusMsg ¶
type StatusMsg struct {
Data *StatusData
Err error
}
StatusMsg is sent when status data is ready
type SyncMsg ¶
type SyncMsg struct {
Result *SyncResult
Err error
}
SyncMsg is sent when sync completes
type SyncResult ¶
SyncResult holds the result of a sync operation
type UpdateFilesScannedMsg ¶
type UpdateFilesScannedMsg int
UpdateFilesScanned updates the scanned file count
type UpdateFilesSyncedMsg ¶
type UpdateFilesSyncedMsg int
UpdateFilesSynced updates the synced file count