lib

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMessageId

func GenerateMessageId() string

Generates an RFC 2822-complaint Message-Id based on the informational draft "Recommendations for generating Message IDs", for lack of a better authoritative source.

Types

type MessageStore

type MessageStore struct {
	Deleted  map[uint32]interface{}
	DirInfo  types.DirectoryInfo
	Messages map[uint32]*types.MessageInfo
	// Ordered list of known UIDs
	Uids []uint32
	// contains filtered or unexported fields
}

Accesses to fields must be guarded by MessageStore.Lock/Unlock

func NewMessageStore

func NewMessageStore(worker *types.Worker,
	dirInfo *types.DirectoryInfo) *MessageStore

func (*MessageStore) Copy

func (store *MessageStore) Copy(uids []uint32, dest string,
	cb func(msg types.WorkerMessage))

func (*MessageStore) Delete

func (store *MessageStore) Delete(uids []uint32,
	cb func(msg types.WorkerMessage))

func (*MessageStore) FetchBodyPart

func (store *MessageStore) FetchBodyPart(
	uid uint32, part []int, cb func(io.Reader))

func (*MessageStore) FetchFull

func (store *MessageStore) FetchFull(uids []uint32, cb func(io.Reader))

func (*MessageStore) FetchHeaders

func (store *MessageStore) FetchHeaders(uids []uint32,
	cb func(*types.MessageInfo))

func (*MessageStore) Move

func (store *MessageStore) Move(uids []uint32, dest string,
	cb func(msg types.WorkerMessage))

func (*MessageStore) OnUpdate

func (store *MessageStore) OnUpdate(fn func(store *MessageStore))

func (*MessageStore) Update

func (store *MessageStore) Update(msg types.WorkerMessage)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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