settings

package
v1.8.12 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 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"
)

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