configuration

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize() error

Initialize the configuration directory

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 ReadConnections

func ReadConnections() (RoverConnections, error)

To read state from disk

func (RoverConnections) Add

func (RoverConnections) Get

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL