Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveControllerConfig ¶
func SaveControllerConfig(configPath string, cfg *ControllerConfig, overwrite bool) error
SaveControllerConfig writes the ControllerConfig for a controller with the given name under the configPath directory. An error is returned if a config for the controller already exists unless the overwrite flag is set.
func WriteConfig ¶
WriteConfig writes data to path but first writes it to a temporary file to avoid errors where the write fails & the data from the original config is lost.
Types ¶
type AccessoryPairing ¶
type AccessoryPairing struct { Name string DeviceName string Model string DeviceID string PublicKey []byte IPConnectionInfo client.IPConnectionInfo }
AccessoryPairing details a paired accessory
type ControllerConfig ¶
type ControllerConfig struct { Name string DeviceID string PublicKey []byte PrivateKey []byte AccessoryPairings []*AccessoryPairing }
ControllerConfig details a controller and its pairings
func ReadControllerConfig ¶
func ReadControllerConfig(configPath string, name string) (*ControllerConfig, error)
ReadControllerConfig reads the ControllerConfig for a controller with the given name stored under the configPath directory
Click to show internal directories.
Click to hide internal directories.