config

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config is the internal configuration used for Efs2. This configuration is for the internal application execution. It exists to pave the way for non-cli instances of Efs2 in the future.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserDetails

func UserDetails(u string) (string, string, error)

UserDetails is a helper function to fetch the username and home directory of a specified user. If no user is specified, UserDetails will return the current runtime user.

Types

type Config

type Config struct {

	// Verbose if set to true, will enable verbose output of command execution.
	Verbose bool

	// Quiet if set to true, will silence all output and focus only on exit codes.
	Quiet bool

	// Efs2File specifies the location of the Efs2File to execute. The default value is the current directory.
	Efs2File string

	// KeyFile specifies the user's SSH key location. The default value is the .ssh directory within the users home directory.
	KeyFile string

	// Parallel if set to true, will trigger Efs2 to execute the Efs2file against all hosts in parallel.
	Parallel bool

	// DryRun if set to true, will prevent the execution of tasks against hosts. The end-user will see instructions logged to stdout.
	DryRun bool

	// Port allows users to specify a default port when hosts do not have a port already specified.
	Port string

	// User is the remote user name to use for authentication.
	User string

	// Passphrase holds the user-provided SSH key passphrase.
	Passphrase []byte

	// Password holds the user-provided SSH password.
	Password string

	// Hosts will contain a list of remote servers to use for execution.
	Hosts []string
}

Config provides a configuration structure used within the Efs2 application.

func New

func New() Config

New will return Config populated with pre-defined defaults.

Source Files

Jump to

Keyboard shortcuts

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