types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppendMessage

type AppendMessage struct {
	Message
	Destination string
	Flags       []string
	Date        time.Time
	Reader      io.Reader
	Length      int
}

type Backend

type Backend interface {
	Run()
}

type Configure

type Configure struct {
	Message
	Config *config.AccountConfig
}

type Connect

type Connect struct {
	Message
}

type CopyMessages

type CopyMessages struct {
	Message
	Destination string
	Uids        imap.SeqSet
}

type DeleteMessages

type DeleteMessages struct {
	Message
	Uids imap.SeqSet
}

type Directory

type Directory struct {
	Message
	Attributes []string
	Name       string
}

type DirectoryContents

type DirectoryContents struct {
	Message
	Uids []uint32
}

type DirectoryInfo

type DirectoryInfo struct {
	Message
	Flags    []string
	Name     string
	ReadOnly bool

	Exists, Recent, Unseen int
}

type Disconnect

type Disconnect struct {
	Message
}

type Done

type Done struct {
	Message
}

type Error

type Error struct {
	Message
	Error error
}

type FetchDirectoryContents

type FetchDirectoryContents struct {
	Message
}

type FetchFullMessages

type FetchFullMessages struct {
	Message
	Uids imap.SeqSet
}

type FetchMessageBodyPart

type FetchMessageBodyPart struct {
	Message
	Uid  uint32
	Part []int
}

type FetchMessageHeaders

type FetchMessageHeaders struct {
	Message
	Uids imap.SeqSet
}

type FullMessage

type FullMessage struct {
	Message
	Reader io.Reader
	Uid    uint32
}

type ListDirectories

type ListDirectories struct {
	Message
}

type Message

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

func RespondTo

func RespondTo(msg WorkerMessage) Message

func (Message) InResponseTo

func (m Message) InResponseTo() WorkerMessage

type MessageBodyPart

type MessageBodyPart struct {
	Message
	Reader io.Reader
	Uid    uint32
}

type MessageInfo

type MessageInfo struct {
	Message
	BodyStructure *imap.BodyStructure
	Envelope      *imap.Envelope
	Flags         []string
	InternalDate  time.Time
	Size          uint32
	Uid           uint32
}

type MessagesDeleted

type MessagesDeleted struct {
	Message
	Uids []uint32
}

type OpenDirectory

type OpenDirectory struct {
	Message
	Directory string
}

type Unsupported

type Unsupported struct {
	Message
}

type Worker

type Worker struct {
	Backend  Backend
	Actions  chan WorkerMessage
	Messages chan WorkerMessage
	Logger   *log.Logger
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(logger *log.Logger) *Worker

func (*Worker) PostAction

func (worker *Worker) PostAction(msg WorkerMessage,
	cb func(msg WorkerMessage))

func (*Worker) PostMessage

func (worker *Worker) PostMessage(msg WorkerMessage,
	cb func(msg WorkerMessage))

func (*Worker) ProcessAction

func (worker *Worker) ProcessAction(msg WorkerMessage) WorkerMessage

func (*Worker) ProcessMessage

func (worker *Worker) ProcessMessage(msg WorkerMessage) WorkerMessage

type WorkerMessage

type WorkerMessage interface {
	InResponseTo() WorkerMessage
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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