Documentation ¶
Overview ¶
Package bridge provides core functionality of Bridge app.
Index ¶
- Constants
- type Bridge
- func (b *Bridge) GetCurrentClient() string
- func (b *Bridge) GetUpdateChannel() updater.UpdateChannel
- func (b *Bridge) ReportBug(osType, osVersion, description, accountName, address, emailClient string) error
- func (b *Bridge) SetCurrentClient(clientName, clientVersion string)
- func (b *Bridge) SetCurrentOS(os string)
- func (b *Bridge) SetUpdateChannel(channel updater.UpdateChannel) error
- type Cacher
- type Locator
- type SettingsProvider
- type Updater
- type Versioner
Constants ¶
const Credits = "" /* 1801-byte string literal not displayed */
const (
Host = "127.0.0.1"
)
Host settings.
const ReleaseFixedBugs = `• Fixed sending error caused by inconsistent use of upper and lower case in sender’s email address
`
const ReleaseNotes = `
`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
func New ¶
func New( locations Locator, cache Cacher, s SettingsProvider, panicHandler users.PanicHandler, eventListener listener.Listener, clientManager users.ClientManager, credStorer users.CredentialsStorer, updater Updater, versioner Versioner, ) *Bridge
func (*Bridge) GetCurrentClient ¶
GetCurrentClient returns currently connected client (e.g. Thunderbird).
func (*Bridge) GetUpdateChannel ¶ added in v1.6.3
func (b *Bridge) GetUpdateChannel() updater.UpdateChannel
GetUpdateChannel returns currently set update channel.
func (*Bridge) ReportBug ¶
func (b *Bridge) ReportBug(osType, osVersion, description, accountName, address, emailClient string) error
ReportBug reports a new bug from the user.
func (*Bridge) SetCurrentClient ¶
SetCurrentClient updates client info (e.g. Thunderbird) and sets the user agent on pmapi. By default no client is used, IMAP has to detect it on first login.
func (*Bridge) SetCurrentOS ¶
SetCurrentOS updates OS and sets the user agent on pmapi. By default we use `runtime.GOOS`, but this can be overridden in case of better detection.
func (*Bridge) SetUpdateChannel ¶ added in v1.6.3
func (b *Bridge) SetUpdateChannel(channel updater.UpdateChannel) error
SetUpdateChannel switches update channel. Downgrading to previous version (by switching from early to stable, for example) requires clearing all data including update files due to possibility of inconsistency between versions and absence of backwards migration scripts.
type SettingsProvider ¶ added in v1.6.3
type Updater ¶ added in v1.6.3
type Updater interface { Check() (updater.VersionInfo, error) IsDowngrade(updater.VersionInfo) bool InstallUpdate(updater.VersionInfo) error }