Documentation ¶
Index ¶
- Variables
- type Accounts
- type Backend
- type ErrCannotSendFromAddress
- type NullServerManager
- type ServerManager
- type Service
- func (s *Service) HandleAddressEvents(_ context.Context, events []proton.AddressEvent) error
- func (s *Service) HandleRefreshEvent(ctx context.Context, _ proton.RefreshFlag) error
- func (s *Service) HandleUserEvent(_ context.Context, user *proton.User) error
- func (s *Service) OnLogout(ctx context.Context) error
- func (s *Service) Resync(ctx context.Context) error
- func (s *Service) SendMail(ctx context.Context, authID string, from string, to []string, r io.Reader) error
- func (s *Service) SetAddressMode(ctx context.Context, mode usertypes.AddressMode) error
- func (s *Service) Start(ctx context.Context, group *orderedtasks.OrderedCancelGroup) error
- func (s *Service) UserID() string
- type Telemetry
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidRecipient = errors.New("invalid recipient")
View Source
var ErrInvalidReturnPath = errors.New("invalid return path")
View Source
var ErrNoSuchUser = errors.New("no such user")
View Source
var ErrTooManyErrors = errors.New("too many failed requests, please try again later")
Functions ¶
This section is empty.
Types ¶
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
func NewAccounts ¶
func NewAccounts() *Accounts
func (*Accounts) AddAccount ¶
func (*Accounts) RemoveAccount ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
func NewBackend(accounts *Accounts, userAgent identifier.UserAgentUpdater) *Backend
func (*Backend) NewSession ¶
type ErrCannotSendFromAddress ¶ added in v3.11.0
type ErrCannotSendFromAddress struct {
// contains filtered or unexported fields
}
func NewErrCannotSendFromAddress ¶ added in v3.11.0
func NewErrCannotSendFromAddress(address string) *ErrCannotSendFromAddress
func (ErrCannotSendFromAddress) Error ¶ added in v3.11.0
func (e ErrCannotSendFromAddress) Error() string
type NullServerManager ¶
type NullServerManager struct{}
func NewNullServerManager ¶
func NewNullServerManager() *NullServerManager
func (NullServerManager) AddSMTPAccount ¶
func (n NullServerManager) AddSMTPAccount(_ context.Context, _ *Service) error
func (NullServerManager) RemoveSMTPAccount ¶
func (n NullServerManager) RemoveSMTPAccount(_ context.Context, _ *Service) error
type ServerManager ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( userID string, client *proton.Client, recorder *sendrecorder.SendRecorder, handler async.PanicHandler, reporter reporter.Reporter, bridgePassProvider useridentity.BridgePassProvider, keyPassProvider useridentity.KeyPassProvider, telemetry Telemetry, eventService userevents.Subscribable, mode usertypes.AddressMode, identityState *useridentity.State, serverManager ServerManager, ) *Service
func (*Service) HandleAddressEvents ¶
func (*Service) HandleRefreshEvent ¶
func (*Service) HandleUserEvent ¶
func (*Service) SetAddressMode ¶
func (*Service) Start ¶
func (s *Service) Start(ctx context.Context, group *orderedtasks.OrderedCancelGroup) error
Click to show internal directories.
Click to hide internal directories.