liveapi

package
v2.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupPersistentClients

func CleanupPersistentClients()

func SetupPersistentClients

func SetupPersistentClients()

Types

type Controller

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

Controller implements PMAPIController interface for specified endpoint.

func NewController

func NewController() (*Controller, pmapi.Manager)

func (*Controller) AddUser

func (ctl *Controller) AddUser(account *accounts.TestAccount) error

func (*Controller) AddUserLabel

func (ctl *Controller) AddUserLabel(username string, label *pmapi.Label) error

func (*Controller) AddUserMessage

func (ctl *Controller) AddUserMessage(username string, message *pmapi.Message) (string, error)

func (*Controller) GetAuthClient

func (ctl *Controller) GetAuthClient(username string) pmapi.Client

func (*Controller) GetCalls

func (ctl *Controller) GetCalls(method, path string) [][]byte

func (*Controller) GetLabelIDs

func (ctl *Controller) GetLabelIDs(username string, labelNames []string) ([]string, error)

func (*Controller) GetMessages

func (ctl *Controller) GetMessages(username, labelID string) ([]*pmapi.Message, error)

func (*Controller) LockEvents

func (ctl *Controller) LockEvents(username string)

func (*Controller) PrintCalls

func (ctl *Controller) PrintCalls()

func (*Controller) RemoveUserMessageWithoutEvent

func (ctl *Controller) RemoveUserMessageWithoutEvent(username string, messageID string) error

func (*Controller) ReorderAddresses

func (ctl *Controller) ReorderAddresses(user *pmapi.User, addressIDs []string) error

func (*Controller) RevokeSession

func (ctl *Controller) RevokeSession(username string) error

func (*Controller) SetDraftBody

func (ctl *Controller) SetDraftBody(username string, messageID string, body string) error

func (*Controller) TurnInternetConnectionOff

func (ctl *Controller) TurnInternetConnectionOff()

func (*Controller) TurnInternetConnectionOn

func (ctl *Controller) TurnInternetConnectionOn()

func (*Controller) UnlockEvents

func (ctl *Controller) UnlockEvents(username string)

func (*Controller) WasCalled

func (ctl *Controller) WasCalled(method, path string, expectedRequest []byte) bool

func (*Controller) WasCalledRegex

func (ctl *Controller) WasCalledRegex(methodRegex, pathRegex string, expectedRequest []byte) (bool, error)

Jump to

Keyboard shortcuts

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