spiegel_podman/cmd/podman/remoteclientconfig/config.go
baude dc7ae31171 podman-remote.conf enablement
add the ability for the podman remote client to use a configuration file
which describes its connections. users can now define a connection the
configuration and then call it by name like:

podman-remote -c connection1

and the destination and user will be derived from the configuration
file.  if no -c is provided, we look for a connection in the
configuration file designated as 'default'.  If the configuration file
has only one connection, it will be deemed the 'default'.

Signed-off-by: baude <bbaude@redhat.com>
2019-05-30 09:41:17 -05:00

21 lines
609 B
Go

package remoteclientconfig
const remoteConfigFileName string = "podman-remote.conf"
// RemoteConfig describes the podman remote configuration file
type RemoteConfig struct {
Connections map[string]RemoteConnection
}
// RemoteConnection describes the attributes of a podman-remote endpoint
type RemoteConnection struct {
Destination string `toml:"destination"`
Username string `toml:"username"`
IsDefault bool `toml:"default"`
}
// GetConfigFilePath is a simple helper to export the configuration file's
// path based on arch, etc
func GetConfigFilePath() string {
return getConfigFilePath()
}