configuration

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 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

type RoverctlConfig added in v1.3.0

type RoverctlConfig struct {
	Author string
	Debug  bool
}

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

Jump to

Keyboard shortcuts

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