settings

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package settings provides access to persistent user settings.

Index

Constants

View Source
const (
	FirstStartKey          = "first_time_start"
	FirstStartGUIKey       = "first_time_start_gui"
	LastHeartbeatKey       = "last_heartbeat"
	APIPortKey             = "user_port_api"
	IMAPPortKey            = "user_port_imap"
	SMTPPortKey            = "user_port_smtp"
	SMTPSSLKey             = "user_ssl_smtp"
	AllowProxyKey          = "allow_proxy"
	AutostartKey           = "autostart"
	AutoUpdateKey          = "autoupdate"
	CookiesKey             = "cookies"
	ReportOutgoingNoEncKey = "report_outgoing_email_without_encryption"
	LastVersionKey         = "last_used_version"
	UpdateChannelKey       = "update_channel"
	RolloutKey             = "rollout"
	PreferredKeychainKey   = "preferred_keychain"
	CacheEnabledKey        = "cache_enabled"
	CacheCompressionKey    = "cache_compression"
	CacheLocationKey       = "cache_location"
	CacheMinFreeAbsKey     = "cache_min_free_abs"
	CacheMinFreeRatKey     = "cache_min_free_rat"
	CacheConcurrencyRead   = "cache_concurrent_read"
	CacheConcurrencyWrite  = "cache_concurrent_write"
	IMAPWorkers            = "imap_workers"
	FetchWorkers           = "fetch_workers"
	AttachmentWorkers      = "attachment_workers"
	ColorScheme            = "color_scheme"
	RebrandingMigrationKey = "rebranding_migrated"
)

Keys of preferences in JSON file.

View Source
const (
	DefaultIMAPPort = "1143"
	DefaultSMTPPort = "1025"
	DefaultAPIPort  = "1042"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// contains filtered or unexported fields
}

func New

func New(settingsPath string) *Settings

func (Settings) Get

func (p Settings) Get(key string) string

func (Settings) GetBool

func (p Settings) GetBool(key string) bool

func (Settings) GetFloat64

func (p Settings) GetFloat64(key string) float64

func (Settings) GetInt

func (p Settings) GetInt(key string) int

func (Settings) Set

func (p Settings) Set(key, value string)

func (Settings) SetBool

func (p Settings) SetBool(key string, value bool)

func (Settings) SetFloat64

func (p Settings) SetFloat64(key string, value float64)

func (Settings) SetInt

func (p Settings) SetInt(key string, value int)

Jump to

Keyboard shortcuts

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