types

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

Documentation

Overview

Package types provides interfaces used in frontend packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridger

type Bridger interface {
	Login(username string, password []byte) (pmapi.Client, *pmapi.Auth, error)
	FinishLogin(client pmapi.Client, auth *pmapi.Auth, mailboxPassword []byte) (string, error)

	GetUserIDs() []string
	GetUserInfo(string) (users.UserInfo, error)
	LogoutUser(userID string) error
	DeleteUser(userID string, clearCache bool) error
	SetAddressMode(userID string, split users.AddressMode) error

	ClearData() error
	ClearUsers() error
	FactoryReset()

	GetTLSConfig() (*tls.Config, error)
	ProvideLogsPath() (string, error)
	GetLicenseFilePath() string
	GetDependencyLicensesLink() string

	GetCurrentUserAgent() string
	SetCurrentPlatform(string)

	Get(settings.Key) string
	Set(settings.Key, string)
	GetBool(settings.Key) bool
	SetBool(settings.Key, bool)
	GetInt(settings.Key) int
	SetInt(settings.Key, int)

	ConfigureAppleMail(userID, address string) (bool, error)

	ReportBug(osType, osVersion, description, accountName, address, emailClient string, attachLogs bool) error
	SetProxyAllowed(bool)
	GetProxyAllowed() bool
	EnableCache() error
	DisableCache() error
	MigrateCache(from, to string) error
	GetUpdateChannel() updater.UpdateChannel
	SetUpdateChannel(updater.UpdateChannel)
	GetKeychainApp() string
	SetKeychainApp(keychain string)
	HasError(err error) bool
	IsAutostartEnabled() bool
	EnableAutostart() error
	DisableAutostart() error
	GetLastVersion() string
	IsFirstStart() bool
	IsAllMailVisible() bool
	SetIsAllMailVisible(bool)
}

Bridger is an interface of bridge needed by frontend.

type PanicHandler

type PanicHandler interface {
	HandlePanic()
}

PanicHandler is an interface of a type that can be used to gracefully handle panics which occur.

type Restarter

type Restarter interface {
	SetToRestart()
	ForceLauncher(string)
	SetMainExecutable(string)
}

Restarter allows the app to set itself to restart next time it is closed.

type Updater

type Updater interface {
	Check() (updater.VersionInfo, error)
	InstallUpdate(updater.VersionInfo) error
	IsUpdateApplicable(updater.VersionInfo) bool
	CanInstall(updater.VersionInfo) bool
}

Jump to

Keyboard shortcuts

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