settings

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package settings provides access to persistent user settings.

Index

Constants

View Source
const (
	APIPortKey            = "UserPortApi"
	IMAPPortKey           = "UserPortImap"
	SMTPPortKey           = "UserPortSmtp"
	AllowProxyKey         = "AllowProxy"
	CacheEnabledKey       = "CacheEnabled"
	CacheCompressionKey   = "CacheCompression"
	CacheMinFreeAbsKey    = "CacheMinFreeAbs"
	CacheMinFreeRatKey    = "CacheMinFreeRat"
	CacheConcurrencyRead  = "CacheConcurrentRead"
	CacheConcurrencyWrite = "CacheConcurrentWrite"
	IMAPWorkers           = "ImapWorkers"
	FetchWorkers          = "FetchWorkers"
	AttachmentWorkers     = "AttachmentWorkers"
	CacheDir              = "CacheDir"
	X509Key               = "X509Key"
	X509Cert              = "X509Cert"
	CookieJar             = "CookieJar"
	ServerAddress         = "ServerAddress"
	CredentialsStore      = "CredentialsStore"
	BCCSelf               = "BCCSelf"
	IsAllMailVisible      = "IsAllMailVisible"
)

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

Jump to

Keyboard shortcuts

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