Documentation
¶
Index ¶
Constants ¶
View Source
const AppName = "lametric-cli"
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶
ConfigExists checks whether the config file exists on disk.
func ConfigPath ¶
func EnsureKeyringDir ¶
func KeyringDir ¶
func WriteConfig ¶
WriteConfig writes the YAML config file atomically using a .tmp + rename pattern.
Types ¶
type Device ¶
type Device struct {
IP string `yaml:"ip" json:"ip"`
}
Device holds connection details for a single LaMetric device.
type File ¶
type File struct {
DefaultDevice string `yaml:"default_device,omitempty" json:"default_device,omitempty"`
Devices map[string]Device `yaml:"devices,omitempty" json:"devices,omitempty"`
Output Output `yaml:"output,omitempty" json:"output,omitempty"`
KeyringBackend string `yaml:"keyring_backend,omitempty" json:"keyring_backend,omitempty"`
}
File represents the lametric-cli YAML configuration.
func ReadConfig ¶
ReadConfig reads the YAML config file. Returns zero File{} if file does not exist.
Click to show internal directories.
Click to hide internal directories.