Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DaemonProcAttr ¶
func DaemonProcAttr() *syscall.SysProcAttr
DaemonProcAttr returns SysProcAttr for detaching the daemon process.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client connects to the matcha daemon over a Unix domain socket.
type Service ¶
type Service interface {
FetchEmails(accountID, folder string, limit, offset uint32) ([]backend.Email, error)
FetchEmailBody(accountID, folder string, uid uint32) (string, []backend.Attachment, error)
DeleteEmails(accountID, folder string, uids []uint32) error
ArchiveEmails(accountID, folder string, uids []uint32) error
MoveEmails(accountID string, uids []uint32, src, dst string) error
MarkRead(accountID, folder string, uids []uint32) error
FetchFolders(accountID string) ([]backend.Folder, error)
RefreshFolder(accountID, folder string) error
Subscribe(accountID, folder string) error
Unsubscribe(accountID, folder string) error
Events() <-chan *daemonrpc.Event
IsDaemon() bool
Close() error
}
Service abstracts daemon-backed vs direct email operations. TUI and CLI use this interface — they don't care which mode is active.
func NewService ¶
NewService connects to the daemon, auto-starting it if needed. Falls back to direct mode only if daemon cannot be started.
Click to show internal directories.
Click to hide internal directories.