Documentation
¶
Overview ¶
Package settings provides an API for reading and writing the app's settings.
Index ¶
- type ColorTheme
- type Settings
- func (s *Settings) ApprovedContactCost() int
- func (s *Settings) ApprovedContactCostPresets() (minimum int, maximum int, def int)
- func (s *Settings) Close()
- func (s *Settings) ColorTheme() ColorTheme
- func (s *Settings) ColorThemeDefault() ColorTheme
- func (s *Settings) DeveloperMode() bool
- func (s *Settings) DisableDPIDetection() bool
- func (s *Settings) Flush()
- func (s *Settings) FyneScale() float64
- func (s *Settings) FyneScaleDefault() float64
- func (s *Settings) HideLimitedCorporations() bool
- func (s *Settings) HideLimitedCorporationsDefault() bool
- func (s *Settings) LastCharacterID() int64
- func (s *Settings) LastCorporationID() int64
- func (s *Settings) LogLevel() string
- func (s *Settings) LogLevelDefault() string
- func (s *Settings) LogLevelNames() []string
- func (s *Settings) LogLevelSlog() slog.Level
- func (s *Settings) MarketOrderRetentionDays() int
- func (s *Settings) MarketOrderRetentionDaysPresets() (minimum int, maximum int, def int)
- func (s *Settings) MaxMails() int
- func (s *Settings) MaxMailsPresets() (minimum int, maximum int, def int)
- func (s *Settings) MaxWalletTransactions() int
- func (s *Settings) MaxWalletTransactionsPresets() (minimum int, maximum int, def int)
- func (s *Settings) NotificationTypesEnabled() set.Set[string]
- func (s *Settings) NotifyCommunicationsEarliest() time.Time
- func (s *Settings) NotifyCommunicationsEnabled() bool
- func (s *Settings) NotifyCommunicationsEnabledDefault() bool
- func (s *Settings) NotifyContractsEarliest() time.Time
- func (s *Settings) NotifyContractsEnabled() bool
- func (s *Settings) NotifyContractsEnabledDefault() bool
- func (s *Settings) NotifyMailsEarliest() time.Time
- func (s *Settings) NotifyMailsEnabled() bool
- func (s *Settings) NotifyMailsEnabledDefault() bool
- func (s *Settings) NotifyPIEarliest() time.Time
- func (s *Settings) NotifyPIEnabled() bool
- func (s *Settings) NotifyPIEnabledDefault() bool
- func (s *Settings) NotifyTimeoutHours() int
- func (s *Settings) NotifyTimeoutHoursPresets() (minimum int, maximum int, def int)
- func (s *Settings) NotifyTrainingEarliest() time.Time
- func (s *Settings) NotifyTrainingEnabled() bool
- func (s *Settings) NotifyTrainingEnabledDefault() bool
- func (s *Settings) PreferMarketTab() bool
- func (s *Settings) RecentSearches() []int64
- func (s *Settings) ResetColorTheme()
- func (s *Settings) ResetDisableDPIDetection()
- func (s *Settings) ResetFyneScale()
- func (s *Settings) ResetLastCharacterID()
- func (s *Settings) ResetLastCorporationID()
- func (s *Settings) ResetLogLevel()
- func (s *Settings) ResetMaxWalletTransactions()
- func (s *Settings) ResetNotificationTypesEnabled()
- func (s *Settings) ResetNotifyTimeoutHours()
- func (s *Settings) ResetPreferMarketTab()
- func (s *Settings) ResetTabsMainID()
- func (s *Settings) ResetUI()
- func (s *Settings) ResetWindowSize()
- func (s *Settings) SetApprovedContactCost(v int)
- func (s *Settings) SetColorTheme(v ColorTheme)
- func (s *Settings) SetDeveloperMode(v bool)
- func (s *Settings) SetDisableDPIDetection(v bool)
- func (s *Settings) SetFyneScale(v float64)
- func (s *Settings) SetHideLimitedCorporations(v bool)
- func (s *Settings) SetLastCharacterID(id int64)
- func (s *Settings) SetLastCorporationID(id int64)
- func (s *Settings) SetLogLevel(l string)
- func (s *Settings) SetMarketOrdersRetentionDay(v int)
- func (s *Settings) SetMaxMails(v int)
- func (s *Settings) SetMaxWalletTransactions(v int)
- func (s *Settings) SetNotificationTypesEnabled(v set.Set[string])
- func (s *Settings) SetNotifyCommunicationsEarliest(t time.Time)
- func (s *Settings) SetNotifyCommunicationsEnabled(v bool)
- func (s *Settings) SetNotifyContractsEarliest(t time.Time)
- func (s *Settings) SetNotifyContractsEnabled(v bool)
- func (s *Settings) SetNotifyMailsEarliest(t time.Time)
- func (s *Settings) SetNotifyMailsEnabled(v bool)
- func (s *Settings) SetNotifyPIEarliest(t time.Time)
- func (s *Settings) SetNotifyPIEnabled(v bool)
- func (s *Settings) SetNotifyTimeoutHours(v int)
- func (s *Settings) SetNotifyTrainingEarliest(t time.Time)
- func (s *Settings) SetNotifyTrainingEnabled(v bool)
- func (s *Settings) SetPreferMarketTab(v bool)
- func (s *Settings) SetRecentSearches(v []int64)
- func (s *Settings) SetSysTrayEnabled(v bool)
- func (s *Settings) SetTabsMainID(v int)
- func (s *Settings) SetWindowSize(v fyne.Size)
- func (s *Settings) SysTrayEnabled() bool
- func (s *Settings) SysTrayEnabledDefault() bool
- func (s *Settings) TabsMainID() int
- func (s *Settings) WindowSize() fyne.Size
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorTheme ¶ added in v0.31.0
type ColorTheme string
const ( Auto ColorTheme = "Auto" Light ColorTheme = "Light" Dark ColorTheme = "Dark" )
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
Settings represents the settings for the app and provides an API for reading and writing settings. Values are cached in memory and persisted to storage asynchronously by a background goroutine, so getters and setters never block on I/O and are safe to call from any goroutine, including Fyne's UI thread. Call Close before closing the database to persist pending writes.
func (*Settings) ApprovedContactCost ¶ added in v0.68.0
func (*Settings) ApprovedContactCostPresets ¶ added in v0.68.0
func (*Settings) Close ¶ added in v0.76.0
func (s *Settings) Close()
Close persists all pending writes and stops the background writer. Later Set* calls are ignored. Repeated calls return immediately.
func (*Settings) ColorTheme ¶ added in v0.31.0
func (s *Settings) ColorTheme() ColorTheme
func (*Settings) ColorThemeDefault ¶ added in v0.31.0
func (s *Settings) ColorThemeDefault() ColorTheme
func (*Settings) DeveloperMode ¶
func (*Settings) DisableDPIDetection ¶ added in v0.39.0
func (*Settings) Flush ¶ added in v0.74.0
func (s *Settings) Flush()
Flush blocks until every write enqueued before this call has been persisted to storage. It returns immediately after Close.
func (*Settings) FyneScaleDefault ¶ added in v0.39.0
func (*Settings) HideLimitedCorporations ¶ added in v0.40.0
func (*Settings) HideLimitedCorporationsDefault ¶ added in v0.40.0
func (*Settings) LastCharacterID ¶
func (*Settings) LastCorporationID ¶ added in v0.35.0
func (*Settings) LogLevelDefault ¶
func (*Settings) LogLevelNames ¶
LogLevelNames returns the names of all log levels in ascending order of severity.
func (*Settings) LogLevelSlog ¶
func (*Settings) MarketOrderRetentionDays ¶ added in v0.41.0
func (*Settings) MarketOrderRetentionDaysPresets ¶ added in v0.41.0
func (*Settings) MaxMailsPresets ¶
func (*Settings) MaxWalletTransactions ¶
func (*Settings) MaxWalletTransactionsPresets ¶
func (*Settings) NotificationTypesEnabled ¶
func (*Settings) NotifyCommunicationsEarliest ¶
func (*Settings) NotifyCommunicationsEnabled ¶
func (*Settings) NotifyCommunicationsEnabledDefault ¶ added in v0.39.0
func (*Settings) NotifyContractsEarliest ¶
func (*Settings) NotifyContractsEnabled ¶
func (*Settings) NotifyContractsEnabledDefault ¶ added in v0.39.0
func (*Settings) NotifyMailsEarliest ¶
func (*Settings) NotifyMailsEnabled ¶
func (*Settings) NotifyMailsEnabledDefault ¶ added in v0.39.0
func (*Settings) NotifyPIEarliest ¶
func (*Settings) NotifyPIEnabled ¶
func (*Settings) NotifyPIEnabledDefault ¶ added in v0.39.0
func (*Settings) NotifyTimeoutHours ¶
func (*Settings) NotifyTimeoutHoursPresets ¶
func (*Settings) NotifyTrainingEarliest ¶
func (*Settings) NotifyTrainingEnabled ¶
func (*Settings) NotifyTrainingEnabledDefault ¶ added in v0.39.0
func (*Settings) PreferMarketTab ¶ added in v0.25.0
func (*Settings) RecentSearches ¶
func (*Settings) ResetColorTheme ¶ added in v0.31.0
func (s *Settings) ResetColorTheme()
func (*Settings) ResetDisableDPIDetection ¶ added in v0.39.0
func (s *Settings) ResetDisableDPIDetection()
func (*Settings) ResetFyneScale ¶ added in v0.39.0
func (s *Settings) ResetFyneScale()
func (*Settings) ResetLastCharacterID ¶
func (s *Settings) ResetLastCharacterID()
func (*Settings) ResetLastCorporationID ¶ added in v0.35.0
func (s *Settings) ResetLastCorporationID()
func (*Settings) ResetLogLevel ¶
func (s *Settings) ResetLogLevel()
func (*Settings) ResetMaxWalletTransactions ¶
func (s *Settings) ResetMaxWalletTransactions()
func (*Settings) ResetNotificationTypesEnabled ¶
func (s *Settings) ResetNotificationTypesEnabled()
func (*Settings) ResetNotifyTimeoutHours ¶
func (s *Settings) ResetNotifyTimeoutHours()
func (*Settings) ResetPreferMarketTab ¶ added in v0.25.0
func (s *Settings) ResetPreferMarketTab()
func (*Settings) ResetTabsMainID ¶
func (s *Settings) ResetTabsMainID()
func (*Settings) ResetUI ¶ added in v0.39.0
func (s *Settings) ResetUI()
ResetUI resets all UI related settings to default.
func (*Settings) ResetWindowSize ¶
func (s *Settings) ResetWindowSize()
func (*Settings) SetApprovedContactCost ¶ added in v0.68.0
func (*Settings) SetColorTheme ¶ added in v0.31.0
func (s *Settings) SetColorTheme(v ColorTheme)