bridge

package
v1.8.12 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package bridge provides core functionality of Bridge app.

Index

Constants

View Source
const (
	Host = "127.0.0.1"
)

Host settings.

View Source
const ReleaseFixedBugs = `• Fixed sending error caused by inconsistent use of upper and lower case in sender’s email address
`
View Source
const ReleaseNotes = `
`

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {
	*users.Users
	// contains filtered or unexported fields
}

func New

func New(
	locations Locator,
	cache Cacher,
	s SettingsProvider,
	sentryReporter *sentry.Reporter,
	panicHandler users.PanicHandler,
	eventListener listener.Listener,
	clientManager pmapi.Manager,
	credStorer users.CredentialsStorer,
	updater Updater,
	versioner Versioner,
) *Bridge

func (*Bridge) GetKeychainApp

func (b *Bridge) GetKeychainApp() string

GetKeychainApp returns current keychain helper.

func (*Bridge) GetUpdateChannel

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) SetKeychainApp

func (b *Bridge) SetKeychainApp(helper string)

SetKeychainApp sets current keychain helper.

func (*Bridge) SetUpdateChannel

func (b *Bridge) SetUpdateChannel(channel updater.UpdateChannel) (needRestart bool, err 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 Cacher

type Cacher interface {
	GetIMAPCachePath() string
	GetDBDir() string
}

type Locator

type Locator interface {
	Clear() error
	ClearUpdates() error
}

type SettingsProvider

type SettingsProvider interface {
	Get(key string) string
	Set(key string, value string)
	GetBool(key string) bool
	SetBool(key string, val bool)
}

type Updater

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

type Versioner

type Versioner interface {
	RemoveOtherVersions(*semver.Version) error
}

Jump to

Keyboard shortcuts

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