remoteclientconfig

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoDefaultConnection no default connection is defined in the podman-remote.conf file
	ErrNoDefaultConnection = errors.New("no default connection is defined")
	// ErrNoDefinedConnections no connections are defined in the podman-remote.conf file
	ErrNoDefinedConnections = errors.New("no remote connections have been defined")
	// ErrConnectionNotFound unable to lookup connection by name
	ErrConnectionNotFound = errors.New("remote connection not found by name")
	// ErrNoConfigationFile no config file found
	ErrNoConfigationFile = errors.New("no configuration file found")
)

Functions

func GetConfigFilePath

func GetConfigFilePath() string

GetConfigFilePath is a simple helper to export the configuration file's path based on arch, etc

Types

type RemoteConfig

type RemoteConfig struct {
	Connections map[string]RemoteConnection
}

RemoteConfig describes the podman remote configuration file

func ReadRemoteConfig

func ReadRemoteConfig(reader io.Reader) (*RemoteConfig, error)

ReadRemoteConfig takes an io.Reader representing the remote configuration file and returns a remoteconfig

func (*RemoteConfig) GetDefault

func (r *RemoteConfig) GetDefault() (*RemoteConnection, error)

GetDefault returns the default RemoteConnection. If there is only one connection, we assume it is the default as well

func (*RemoteConfig) GetRemoteConnection

func (r *RemoteConfig) GetRemoteConnection(name string) (*RemoteConnection, error)

GetRemoteConnection "looks up" a remote connection by name and returns it in the form of a RemoteConnection

type RemoteConnection

type RemoteConnection struct {
	Destination string `toml:"destination"`
	Username    string `toml:"username"`
	IsDefault   bool   `toml:"default"`
}

RemoteConnection describes the attributes of a podman-remote endpoint

Jump to

Keyboard shortcuts

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