mirror of
https://github.com/0x1d/rcond.git
synced 2025-12-14 18:25:21 +01:00
feat: apply configuration on start
This commit is contained in:
@@ -7,8 +7,10 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Rcond RcondConfig `yaml:"rcond"`
|
||||
Cluster ClusterConfig `yaml:"cluster"`
|
||||
Hostname string `yaml:"hostname"`
|
||||
Rcond RcondConfig `yaml:"rcond"`
|
||||
Network NetworkConfig `yaml:"network"`
|
||||
Cluster ClusterConfig `yaml:"cluster"`
|
||||
}
|
||||
|
||||
type RcondConfig struct {
|
||||
@@ -16,6 +18,25 @@ type RcondConfig struct {
|
||||
ApiToken string `yaml:"api_token"`
|
||||
}
|
||||
|
||||
type NetworkConfig struct {
|
||||
Connections []ConnectionConfig `yaml:"connections"`
|
||||
}
|
||||
|
||||
type ConnectionConfig struct {
|
||||
Type string `yaml:"type,omitempty"`
|
||||
UUID string `yaml:"uuid,omitempty"`
|
||||
ID string `yaml:"id,omitempty"`
|
||||
AutoConnect bool `yaml:"autoconnect,omitempty"`
|
||||
SSID string `yaml:"ssid,omitempty"`
|
||||
Mode string `yaml:"mode,omitempty"`
|
||||
Band string `yaml:"band,omitempty"`
|
||||
Channel uint32 `yaml:"channel,omitempty"`
|
||||
KeyMgmt string `yaml:"keymgmt,omitempty"`
|
||||
PSK string `yaml:"psk,omitempty"`
|
||||
IPv4Method string `yaml:"ipv4method,omitempty"`
|
||||
IPv6Method string `yaml:"ipv6method,omitempty"`
|
||||
}
|
||||
|
||||
type ClusterConfig struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
NodeName string `yaml:"node_name"`
|
||||
|
||||
Reference in New Issue
Block a user