Documentation ¶
Index ¶
- type Address
- type Addresses
- type Count
- type Counts
- type Files
- type MessageIDs
- type Notmuch
- func (nm *Notmuch) Address(ctx context.Context, args ...string) (*Addresses, error)
- func (nm *Notmuch) Count(ctx context.Context, args ...string) (*Count, error)
- func (nm *Notmuch) CountBatch(ctx context.Context, r io.Reader) (*Counts, error)
- func (nm *Notmuch) New(ctx context.Context, wc io.WriteCloser, args ...string) error
- func (nm *Notmuch) Restore(ctx context.Context, r io.Reader, wc io.WriteCloser, args ...string) error
- func (nm *Notmuch) Search(ctx context.Context, args ...string) (*Summaries, error)
- func (nm *Notmuch) SearchFiles(ctx context.Context, args ...string) (*Files, error)
- func (nm *Notmuch) SearchMessageIDs(ctx context.Context, args ...string) (*MessageIDs, error)
- func (nm *Notmuch) SearchTags(ctx context.Context, args ...string) (*Tags, error)
- func (nm *Notmuch) SearchThreadIDs(ctx context.Context, args ...string) (*ThreadIDs, error)
- func (nm *Notmuch) Show(ctx context.Context, args ...string) (*Threads, error)
- func (nm *Notmuch) Tag(ctx context.Context, args ...string) (io.Reader, error)
- func (nm *Notmuch) TagBatch(ctx context.Context, r io.Reader, wc io.WriteCloser, args ...string) error
- type Part
- type Summaries
- type Summary
- type Tags
- type Thread
- type ThreadIDs
- type Threads
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Addresses ¶
type Addresses struct {
// contains filtered or unexported fields
}
Addresses is an iterator over results from a `notmuch address` command
type MessageIDs ¶
type MessageIDs struct {
// contains filtered or unexported fields
}
func (*MessageIDs) Err ¶
func (m *MessageIDs) Err() error
func (*MessageIDs) MessageID ¶
func (m *MessageIDs) MessageID() string
func (*MessageIDs) Next ¶
func (m *MessageIDs) Next() bool
Next returns true as long as there is another messageID to read. The current messageID is available via the MessageID method. Any errors will be available via Err()
type Notmuch ¶
func (*Notmuch) Address ¶
Address performs a `notmuch address` command. The return value is an iterator over the result. If the iterator is not read completely, the context must be cancelled in order for the command to be properly cleaned up
func (*Notmuch) CountBatch ¶
CountBatch performs a `notmuch count --batch` command. The return value is an iterator over the result. If the iterator is not read completely, the context must be cancelled in order for the command to be properly cleaned up
func (*Notmuch) New ¶
New performs a `notmuch new` command. The passed writer is attached to the stdout of the command. This can be nil and the output will be discarded
func (*Notmuch) Restore ¶
func (nm *Notmuch) Restore(ctx context.Context, r io.Reader, wc io.WriteCloser, args ...string) error
Restore performs a `notmuch restore` command, reading from r. This is a blocking call. An optional WriteCloser can be supplied and will be attached to the commands stdout
func (*Notmuch) Search ¶
Search performs a `notmuch search --output=summary` command. This is equivalent to using `notmuch search`
func (*Notmuch) SearchFiles ¶
SearchFiles performs a `notmuch search --output=files` command
func (*Notmuch) SearchMessageIDs ¶
SearchMessageIDs performs a `notmuch search --output=messages` command
func (*Notmuch) SearchTags ¶
SearchTags performs a `notmuch search --output=tags` command
func (*Notmuch) SearchThreadIDs ¶
SearchThreadIDs performs a `notmuch search --output=threads` command
func (*Notmuch) Tag ¶
Performs a 'notmuch tag' command. The io.Reader will be attached to the command's output
func (*Notmuch) TagBatch ¶
func (nm *Notmuch) TagBatch(ctx context.Context, r io.Reader, wc io.WriteCloser, args ...string) error
TagBatch performs a `notmuch tag --batch` command, reading from r. This is a blocking call. An optional WriteCloser can be supplied and will be attached to the commands stdout
type Summaries ¶
type Summaries struct {
// contains filtered or unexported fields
}
Summaries is an iterator over results from a `notmuch search` command
type Summary ¶
type Summary struct { Thread string `json:"thread"` Timestamp int64 `json:"timestamp"` DateRelative string `json:"date_relative"` Matched int `json:"matched"` Total int `json:"total"` Authors string `json:"authors"` Subject string `json:"subject"` Query []string `json:"query"` Tags []string `json:"tags"` }
type Tags ¶
type Tags struct {
// contains filtered or unexported fields
}
type Thread ¶
type Thread struct { ID string `json:"id"` Match bool `json:"match"` Excluded bool `json:"excluded"` Filename []string `json:"filename"` Timestamp int64 `json:"timestamp"` DateRelative string `json:"date_relative"` Tags []string `json:"tags"` Duplicate int `json:"duplicate"` Body []*Part `json:"body"` }
type ThreadIDs ¶
type ThreadIDs struct {
// contains filtered or unexported fields
}