settings

package
v0.0.0-...-27a9bf3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateSettings

func UpdateSettings(fields ...ISettingsField) bool

UpdateSettings todo: this isn't a good idea when your settings are larger. you'll end up pushing more data than is needed back and forth. refactor so it's more flexible

Types

type ISettingsField

type ISettingsField interface {
	Apply(*Settings) bool
}

type MetricsEnabledField

type MetricsEnabledField bool

func (MetricsEnabledField) Apply

func (m MetricsEnabledField) Apply(s *Settings) bool

type Settings

type Settings struct {
	MetricsEnabled bool `json:"metricsEnabled"`
}

func Get

func Get() Settings

Jump to

Keyboard shortcuts

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