config

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(cfg *Config)

Save saves new config to config file. Needs mutex locked!

Types

type Config

type Config struct {
	Frequency         float64 `json:"freq"`
	Format            string  `json:"format"`
	Multiplier        float64 `json:"multiplier"`
	PS                string  `json:"PS"`
	RT                string  `json:"RT"`
	PI                string  `json:"PI"`
	TP                string  `json:"TP"`
	PTY               uint    `json:"PTY"`
	YouTubeAPIKey     string  `json:"ytApiKey"`
	Port              uint16  `json:"port"`
	Power             uint8   `json:"power"`
	Mpx               uint    `json:"mpx"`
	Preemph           string  `json:"preemph"`
	AntennaGPIO       uint8   `json:"antennaGPIO"`
	SSD1306           bool    `json:"ssd1306"`
	DynamicRT         bool    `json:"dynamicRT"`
	DynamicRTInterval uint    `json:"dynamicRTInterval"`
	Verbose           bool    `json:"verbose"`
}

Config is config.json structure of all available settings.

type SafeConfig added in v1.3.0

type SafeConfig struct {
	sync.Mutex
	Config
}

SafeConfig is just Config combined with mutex.

func Get

func Get() (*SafeConfig, error)

Get returns current config saved in config file with mutex.

Jump to

Keyboard shortcuts

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