Documentation
¶
Index ¶
- func Initialize() error
- func LocalConfigDir() string
- type RoverConnection
- type RoverConnections
- func (c RoverConnections) Add(new RoverConnection) RoverConnections
- func (c RoverConnections) Get(name string) *RoverConnection
- func (c RoverConnections) GetActive() *RoverConnection
- func (c RoverConnections) Remove(name string) RoverConnections
- func (c RoverConnections) Save() error
- func (c RoverConnections) SetActive(name string) RoverConnections
- type RoverctlConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocalConfigDir ¶
func LocalConfigDir() string
Types ¶
type RoverConnection ¶
type RoverConnection struct {
Name string `yaml:"name"`
Host string `yaml:"host"`
Username string `yaml:"username"`
Password string `yaml:"password"`
// contains filtered or unexported fields
}
func (RoverConnection) ToApiClient ¶
func (c RoverConnection) ToApiClient() *openapi.APIClient
func (RoverConnection) ToSsh ¶
func (c RoverConnection) ToSsh() (*goph.Client, error)
Convert the RoverConnection to a goph SSH connection object (which often is more useful) Don't forget to close!
func (RoverConnection) ToSshConnection ¶
func (c RoverConnection) ToSshConnection() (*ssh.Client, error)
Convert the RoverConnection to an SSH connection object Don't forget to close!
type RoverConnections ¶
type RoverConnections struct {
Available []RoverConnection `yaml:"available"`
Active string `yaml:"active"`
}
An overview of all the available connections, as is written to the configuration file
func (RoverConnections) Add ¶
func (c RoverConnections) Add(new RoverConnection) RoverConnections
func (RoverConnections) Get ¶
func (c RoverConnections) Get(name string) *RoverConnection
func (RoverConnections) GetActive ¶
func (c RoverConnections) GetActive() *RoverConnection
func (RoverConnections) Remove ¶
func (c RoverConnections) Remove(name string) RoverConnections
func (RoverConnections) Save ¶
func (c RoverConnections) Save() error
func (RoverConnections) SetActive ¶
func (c RoverConnections) SetActive(name string) RoverConnections
type RoverctlConfig ¶ added in v1.3.0
All the configuration options that can be accessed throughout the application
func ReadConfig ¶ added in v1.3.0
func ReadConfig() (RoverctlConfig, error)
To read config from disk
func (RoverctlConfig) Save ¶ added in v1.3.0
func (c RoverctlConfig) Save() error
Marshal the config to YAML and save it to disk
Click to show internal directories.
Click to hide internal directories.