Documentation
¶
Index ¶
- Constants
- func LoadNameMap(path string) (map[string]string, error)
- func RenderNutConf() string
- func RenderUPSConf(devices []DetectedUPS) string
- func RenderUPSDConf() string
- func RenderUPSDUsers(user UPSDUser) string
- func SaveNameMap(path string, names map[string]string) (bool, error)
- func WriteIfChanged(path, content string) (bool, error)
- type DetectedUPS
- type Scanner
- type UPSDUser
Constants ¶
View Source
const (
DefaultNamesPath = "/var/lib/strom/names.json"
)
Variables ¶
This section is empty.
Functions ¶
func RenderNutConf ¶
func RenderNutConf() string
func RenderUPSConf ¶
func RenderUPSConf(devices []DetectedUPS) string
func RenderUPSDConf ¶
func RenderUPSDConf() string
func RenderUPSDUsers ¶
func WriteIfChanged ¶
Types ¶
type DetectedUPS ¶
type DetectedUPS struct {
Name string
Driver string
Port string
VendorID string
ProductID string
Product string
Serial string
Vendor string
Bus string
}
func AssignStableNames ¶
func AssignStableNames(devices []DetectedUPS, persisted map[string]string) ([]DetectedUPS, map[string]string)
func (DetectedUPS) StableKey ¶
func (d DetectedUPS) StableKey() string
type Scanner ¶
func NewScanner ¶
Click to show internal directories.
Click to hide internal directories.