bridge

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package bridge provides core functionality of Bridge app.

Index

Constants

View Source
const Credits = "" /* 1980-byte string literal not displayed */
View Source
const (
	Host = "127.0.0.1"
)

Host settings.

View Source
const ReleaseFixedBugs = `• AppleMail crashes (timestamp related)
• Encoding errors
• Installation issues on linux
`
View Source
const ReleaseNotes = `• Support read confirmations
• Adding GPLv3 licence button to the GUI
• Improved testing
`

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(
	config Configer,
	pref PreferenceProvider,
	panicHandler users.PanicHandler,
	eventListener listener.Listener,
	clientManager users.ClientManager,
	credStorer users.CredentialsStorer,
) *Bridge

func (*Bridge) GetCurrentClient

func (b *Bridge) GetCurrentClient() string

GetCurrentClient returns currently connected client (e.g. Thunderbird).

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

func (b *Bridge) SetCurrentClient(clientName, clientVersion string)

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

func (b *Bridge) SetCurrentOS(os string)

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.

type Configer

type Configer interface {
	users.Configer
	StoreFactoryConfiger
}

type PreferenceProvider

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

type StoreFactoryConfiger

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

Jump to

Keyboard shortcuts

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