liststatus

package module
v0.0.0-...-899f21c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 7 Imported by: 0

README

go-imap-liststatus

LIST-STATUS extension for go-imap

License

MIT

Documentation

Index

Constants

View Source
const Capability = "LIST-STATUS"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a LIST-STATUS client.

func NewClient

func NewClient(c *client.Client) *Client

NewClient creates a new LIST-STATUS client.

func (*Client) ListStatus

func (c *Client) ListStatus(ref, name string, items []imap.StatusItem, ch chan *imap.MailboxInfo) ([]*imap.MailboxStatus, error)

ListStatus performs a LIST-STATUS command, listing mailboxes and also retrieving the requested status items. A nil channel can be passed in order to only retrieve the STATUS responses

func (*Client) SupportListStatus

func (c *Client) SupportListStatus() (bool, error)

SupportListStatus checks if the server supports the LIST-STATUS extension.

type ListStatus

type ListStatus struct {
	Reference string
	Mailbox   string

	Subscribed bool
	Items      []imap.StatusItem
}

ListStatus is a LIST command, as defined in RFC 3501 section 6.3.8. If Subscribed is set to true, LSUB will be used instead. Mailbox statuses will be returned if Items is not nil

func (*ListStatus) Command

func (cmd *ListStatus) Command() *imap.Command

func (*ListStatus) Parse

func (cmd *ListStatus) Parse(fields []interface{}) error

type ListStatusClient

type ListStatusClient = Client

ListStatusClient is an alias used to compose multiple client extensions.

type ListStatusResponse

type ListStatusResponse struct {
	Mailboxes  chan *imap.MailboxInfo
	Subscribed bool
	Statuses   []*imap.MailboxStatus
}

A List status response

func (*ListStatusResponse) Handle

func (r *ListStatusResponse) Handle(resp imap.Resp) error

func (*ListStatusResponse) Name

func (r *ListStatusResponse) Name() string

func (*ListStatusResponse) WriteTo

func (r *ListStatusResponse) WriteTo(w *imap.Writer) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL