config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// UserAppConfig holds the user podman-tui config path.
	UserAppConfig = ".config/" + _configPath
)

Variables

View Source
var (
	ErrRemotePodmanUDSReport   = errors.New("remote podman failed to report its UDS socket")
	ErrInvalidURISchemaName    = errors.New("invalid schema name")
	ErrInvalidTCPSchemaOption  = errors.New("invalid option for tcp")
	ErrInvalidUnixSchemaOption = errors.New("invalid option for unix")
	ErrFileNotUnixSocket       = errors.New("not a unix domain socket")
	ErrEmptySSHIdentity        = errors.New("empty identity field for SSH connection")
	ErrEmptyURIDestination     = errors.New("empty URI destination")
	ErrEmptyServiceName        = errors.New("empty service name")
	ErrDuplicatedServiceName   = errors.New("duplicated service name")
)

Functions

This section is empty.

Types

type Config

type Config struct {

	// Services specify the service destination connections
	Services map[string]Service `toml:"services,omitempty"`
	// contains filtered or unexported fields
}

Config contains configuration options for container tools.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns new config.

func (*Config) Add

func (c *Config) Add(name string, uri string, identity string) error

Add adds new service connection.

func (*Config) Remove

func (c *Config) Remove(name string) error

Remove removes a service from config.

func (*Config) ServicesConnections

func (c *Config) ServicesConnections() []registry.Connection

ServicesConnections returns list of available connections.

func (*Config) SetDefaultService

func (c *Config) SetDefaultService(name string) error

SetDefaultService sets default service name.

func (*Config) Write

func (c *Config) Write() error

Write writes config.

type Service

type Service struct {
	// URI, required. Example: ssh://root@example.com:22/run/podman/podman.sock
	URI string `toml:"uri"`

	// Identity file with ssh key, optional
	Identity string `toml:"identity,omitempty"`

	// Default if its default service, optional
	Default bool `toml:"default,omitempty"`
}

Service represents remote service destination.

Jump to

Keyboard shortcuts

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