Documentation
¶
Index ¶
- Constants
- Variables
- func EnsureRuntimeDir() error
- func PIDPath() string
- func SocketPath() string
- type AccountInfo
- type ArchiveEmailsParams
- type AttachmentInfo
- type CancelEmailParams
- type Conn
- type DeleteEmailsParams
- type Error
- type Event
- type ExportContactsParams
- type FetchEmailBodyParams
- type FetchEmailBodyResult
- type FetchEmailsParams
- type FetchFoldersParams
- type GetCachedBodyParams
- type GetCachedEmailsParams
- type MarkReadParams
- type Message
- type MoveEmailsParams
- type NewMailEvent
- type PingResult
- type QueueEmailParams
- type QueueEmailResult
- type RefreshFolderParams
- type Request
- type Response
- type SendEmailParams
- type SendRSVPParams
- type StatusResult
- type SubscribeParams
- type SyncCompleteEvent
- type SyncErrorEvent
- type SyncStartedEvent
- type UnsubscribeParams
Constants ¶
const ( ErrCodeParse = udsrpc.ErrCodeParse ErrCodeInvalidReq = udsrpc.ErrCodeInvalidReq ErrCodeInvalidParams = udsrpc.ErrCodeInvalidParams ErrCodeNotFound = udsrpc.ErrCodeNotFound ErrCodeInternal = udsrpc.ErrCodeInternal )
Standard error codes, re-exported from the shared library.
const ( MethodPing = "Ping" MethodGetStatus = "GetStatus" MethodGetAccounts = "GetAccounts" MethodReloadConfig = "ReloadConfig" MethodFetchEmails = "FetchEmails" MethodFetchEmailBody = "FetchEmailBody" MethodSendEmail = "SendEmail" MethodDeleteEmails = "DeleteEmails" MethodArchiveEmails = "ArchiveEmails" MethodMoveEmails = "MoveEmails" MethodMarkRead = "MarkRead" MethodFetchFolders = "FetchFolders" MethodRefreshFolder = "RefreshFolder" MethodSubscribe = "Subscribe" MethodUnsubscribe = "Unsubscribe" MethodSendRSVP = "SendRSVP" MethodGetCachedEmails = "GetCachedEmails" MethodGetCachedBody = "GetCachedBody" MethodExportContacts = "ExportContacts" MethodQueueEmail = "QueueEmail" MethodCancelEmail = "CancelEmail" )
RPC method names.
const ( EventNewMail = "NewMail" EventSyncStarted = "SyncStarted" EventSyncComplete = "SyncComplete" EventSyncError = "SyncError" EventEmailsUpdated = "EmailsUpdated" EventConfigReloaded = "ConfigReloaded" )
Event type names.
Variables ¶
var DecodeMessage = udsrpc.DecodeMessage
DecodeMessage discriminates a raw JSON object into a Request, Response, or Event.
var NewConn = udsrpc.NewConn
NewConn wraps an existing net.Conn.
Functions ¶
func EnsureRuntimeDir ¶
func EnsureRuntimeDir() error
EnsureRuntimeDir creates the runtime directory if it doesn't exist.
func SocketPath ¶
func SocketPath() string
SocketPath returns the path to the daemon's Unix domain socket.
Types ¶
type AccountInfo ¶
type ArchiveEmailsParams ¶
type AttachmentInfo ¶
type CancelEmailParams ¶ added in v0.41.0
type CancelEmailParams struct {
JobID string `json:"job_id"`
}
type Conn ¶
Conn is the newline-delimited JSON-RPC connection provided by the shared go-uds-jsonrpc transport. Aliased so the rest of matcha keeps referring to daemonrpc.Conn.
type DeleteEmailsParams ¶
type Error ¶
Wire-level message types and the discriminating decoder live in the shared go-uds-jsonrpc library. They are aliased here so matcha code keeps using the daemonrpc.* names while sharing a single implementation with the daemon's transport layer.
type Event ¶
Wire-level message types and the discriminating decoder live in the shared go-uds-jsonrpc library. They are aliased here so matcha code keeps using the daemonrpc.* names while sharing a single implementation with the daemon's transport layer.
type ExportContactsParams ¶
type ExportContactsParams struct {
Format string `json:"format"` // "json" or "csv"
}
type FetchEmailBodyParams ¶
type FetchEmailBodyResult ¶
type FetchEmailBodyResult struct {
Body string `json:"body"`
BodyMIMEType string `json:"body_mime_type,omitempty"`
Attachments []AttachmentInfo `json:"attachments"`
}
type FetchEmailsParams ¶
type FetchFoldersParams ¶
type FetchFoldersParams struct {
AccountID string `json:"account_id"`
}
type GetCachedBodyParams ¶
type GetCachedEmailsParams ¶
type GetCachedEmailsParams struct {
Folder string `json:"folder"`
}
type MarkReadParams ¶
type Message ¶
Wire-level message types and the discriminating decoder live in the shared go-uds-jsonrpc library. They are aliased here so matcha code keeps using the daemonrpc.* names while sharing a single implementation with the daemon's transport layer.
type MoveEmailsParams ¶
type NewMailEvent ¶
type PingResult ¶
type PingResult struct {
Pong bool `json:"pong"`
}
type QueueEmailParams ¶ added in v0.41.0
type QueueEmailParams struct {
Email SendEmailParams `json:"email"`
DelaySeconds int `json:"delay_seconds"`
}
type QueueEmailResult ¶ added in v0.41.0
type QueueEmailResult struct {
JobID string `json:"job_id"`
}
type RefreshFolderParams ¶
type Request ¶
Wire-level message types and the discriminating decoder live in the shared go-uds-jsonrpc library. They are aliased here so matcha code keeps using the daemonrpc.* names while sharing a single implementation with the daemon's transport layer.
type Response ¶
Wire-level message types and the discriminating decoder live in the shared go-uds-jsonrpc library. They are aliased here so matcha code keeps using the daemonrpc.* names while sharing a single implementation with the daemon's transport layer.
type SendEmailParams ¶
type SendEmailParams struct {
AccountID string `json:"account_id"`
To []string `json:"to"`
Cc []string `json:"cc,omitempty"`
Bcc []string `json:"bcc,omitempty"`
Subject string `json:"subject"`
Body string `json:"body"`
HTMLBody string `json:"html_body,omitempty"`
Images map[string][]byte `json:"images,omitempty"`
Attachments map[string][]byte `json:"attachments,omitempty"`
InReplyTo string `json:"in_reply_to,omitempty"`
References []string `json:"references,omitempty"`
SignSMIME bool `json:"sign_smime,omitempty"`
EncryptSMIME bool `json:"encrypt_smime,omitempty"`
SignPGP bool `json:"sign_pgp,omitempty"`
EncryptPGP bool `json:"encrypt_pgp,omitempty"`
}