database

package
v0.2.10-0...-e52ecc5 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("message not found in local database")

Functions

This section is empty.

Types

type Mailbox

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

func (*Mailbox) ForEach

func (mbox *Mailbox) ForEach(f func(seqNum, uid uint32, apiID string) error) error

func (*Mailbox) FromApiID

func (mbox *Mailbox) FromApiID(apiID string) (seqNum uint32, uid uint32, err error)

func (*Mailbox) FromSeqNum

func (mbox *Mailbox) FromSeqNum(seqNum uint32) (apiID string, err error)

func (*Mailbox) FromUid

func (mbox *Mailbox) FromUid(uid uint32) (apiID string, err error)

func (*Mailbox) Reset

func (mbox *Mailbox) Reset() error

func (*Mailbox) Sync

func (mbox *Mailbox) Sync(messages []*protonmail.Message) error

func (*Mailbox) UidNext

func (mbox *Mailbox) UidNext() (uint32, error)

type User

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

func Open

func Open(filename string) (*User, error)

func (*User) Close

func (u *User) Close() error

func (*User) CreateMessage

func (u *User) CreateMessage(msg *protonmail.Message) (seqNums map[string]uint32, err error)

func (*User) DeleteMessage

func (u *User) DeleteMessage(apiID string) (seqNums map[string]uint32, err error)

func (*User) Mailbox

func (u *User) Mailbox(labelID string) (*Mailbox, error)

func (*User) Message

func (u *User) Message(apiID string) (*protonmail.Message, error)

func (*User) ResetMessages

func (u *User) ResetMessages() error

func (*User) UpdateMessage

func (u *User) UpdateMessage(apiID string, update *protonmail.EventMessageUpdate) (createdSeqNums map[string]uint32, deletedSeqNums map[string]uint32, err error)

Jump to

Keyboard shortcuts

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