Versions in this module Expand all Collapse all v1 v1.8.12 Nov 16, 2021 v1.8.11 Nov 15, 2021 Changes in this version + const DELETE + const GET + const POST + const PUT + type Controller struct + func NewController() (*Controller, pmapi.Manager) + func (ctl *Controller) AddUser(account *accounts.TestAccount) error + func (ctl *Controller) AddUserLabel(username string, label *pmapi.Label) error + func (ctl *Controller) AddUserMessage(username string, message *pmapi.Message) (string, error) + func (ctl *Controller) GetAuthClient(username string) pmapi.Client + func (ctl *Controller) GetCalls(method, path string) [][]byte + func (ctl *Controller) GetLabelIDs(username string, labelNames []string) ([]string, error) + func (ctl *Controller) GetMessages(username, labelID string) ([]*pmapi.Message, error) + func (ctl *Controller) PrintCalls() + func (ctl *Controller) ReorderAddresses(user *pmapi.User, addressIDs []string) error + func (ctl *Controller) TurnInternetConnectionOff() + func (ctl *Controller) TurnInternetConnectionOn() + func (ctl *Controller) WasCalled(method, path string, expectedRequest []byte) bool + func (ctl *Controller) WasCalledRegex(methodRegex, pathRegex string, expectedRequest []byte) (bool, error) + type FakePMAPI struct + func (api *FakePMAPI) AddAuthRefreshHandler(handler pmapi.AuthRefreshHandler) + func (api *FakePMAPI) Addresses() pmapi.AddressList + func (api *FakePMAPI) Auth2FA(_ context.Context, twoFactorCode string) error + func (api *FakePMAPI) AuthDelete(_ context.Context) error + func (api *FakePMAPI) AuthSalt(_ context.Context) (string, error) + func (api *FakePMAPI) CloseConnections() + func (api *FakePMAPI) CountMessages(_ context.Context, addressID string) ([]*pmapi.MessagesCount, error) + func (api *FakePMAPI) CreateAttachment(_ context.Context, attachment *pmapi.Attachment, data io.Reader, ...) (*pmapi.Attachment, error) + func (api *FakePMAPI) CreateDraft(ctx context.Context, message *pmapi.Message, parentID string, action int) (*pmapi.Message, error) + func (api *FakePMAPI) CreateLabel(_ context.Context, label *pmapi.Label) (*pmapi.Label, error) + func (api *FakePMAPI) CurrentUser(ctx context.Context) (*pmapi.User, error) + func (api *FakePMAPI) DecryptAndVerifyCards(cards []pmapi.Card) ([]pmapi.Card, error) + func (api *FakePMAPI) DeleteLabel(_ context.Context, labelID string) error + func (api *FakePMAPI) DeleteMessages(_ context.Context, apiIDs []string) error + func (api *FakePMAPI) DownloadAndVerify(string, string, *crypto.KeyRing) (io.Reader, error) + func (api *FakePMAPI) EmptyFolder(_ context.Context, labelID string, addressID string) error + func (api *FakePMAPI) GetAddresses(context.Context) (pmapi.AddressList, error) + func (api *FakePMAPI) GetAttachment(_ context.Context, attachmentID string) (io.ReadCloser, error) + func (api *FakePMAPI) GetContactByID(_ context.Context, contactID string) (pmapi.Contact, error) + func (api *FakePMAPI) GetContactEmailByEmail(_ context.Context, email string, page int, pageSize int) ([]pmapi.ContactEmail, error) + func (api *FakePMAPI) GetCurrentAuth() *pmapi.Auth + func (api *FakePMAPI) GetEvent(_ context.Context, eventID string) (*pmapi.Event, error) + func (api *FakePMAPI) GetMailSettings(context.Context) (pmapi.MailSettings, error) + func (api *FakePMAPI) GetMessage(_ context.Context, apiID string) (*pmapi.Message, error) + func (api *FakePMAPI) GetPublicKeysForEmail(_ context.Context, email string) (keys []pmapi.PublicKey, internal bool, err error) + func (api *FakePMAPI) Import(_ context.Context, importMessageRequests pmapi.ImportMsgReqs) ([]*pmapi.ImportMsgRes, error) + func (api *FakePMAPI) IsUnlocked() bool + func (api *FakePMAPI) KeyRingForAddressID(addrID string) (*crypto.KeyRing, error) + func (api *FakePMAPI) LabelMessages(_ context.Context, apiIDs []string, labelID string) error + func (api *FakePMAPI) ListLabels(context.Context) ([]*pmapi.Label, error) + func (api *FakePMAPI) ListMessages(_ context.Context, filter *pmapi.MessagesFilter) ([]*pmapi.Message, int, error) + func (api *FakePMAPI) MarkMessagesRead(_ context.Context, apiIDs []string) error + func (api *FakePMAPI) MarkMessagesUnread(_ context.Context, apiIDs []string) error + func (api *FakePMAPI) ReloadKeys(ctx context.Context, passphrase []byte) (err error) + func (api *FakePMAPI) ReorderAddresses(_ context.Context, addressIDs []string) error + func (api *FakePMAPI) SendMessage(ctx context.Context, messageID string, ...) (sent, parent *pmapi.Message, err error) + func (api *FakePMAPI) UnlabelMessages(_ context.Context, apiIDs []string, labelID string) error + func (api *FakePMAPI) Unlock(_ context.Context, passphrase []byte) (err error) + func (api *FakePMAPI) UpdateLabel(_ context.Context, label *pmapi.Label) (*pmapi.Label, error) + func (api *FakePMAPI) UpdateUser(context.Context) (*pmapi.User, error)