config

package
v0.0.0-...-3a21935 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandTilde

func ExpandTilde(inPath string) (outPath string)

expandTilde expands filenames and paths that use the tilde convention to imply relative to homedir.

Types

type Config

type Config struct {
	LogLevel       string `yaml:"loglevel"`
	Authentication struct {
		SSHKeyDir string            `yaml:"ssh_dir"`
		SSHKeys   map[string]string `yaml:"ssh_private_keys"`
	} `yaml:"authentication"`
	Source struct {
		KeyDir string `yaml:"ssh_keys_dir"`
	} `yaml:"source"`
	Dest struct {
		BaseHomedir  string   `yaml:"base_homedir"`
		KeyDir       string   `yaml:"ssh_dir"`
		AuthKeysFile string   `yaml:"authorized_keys"`
		Hosts        []string `yaml:"hosts"`
	} `yaml:"destination"`
}

func ParseConfig

func ParseConfig(filename string) (*Config, error)

type Flags

type Flags struct {
	Config   string
	Hosts    string
	KeyDir   string
	Loglevel string
	DestDir  string // Directory where authorized_keys files will be written
	Force    bool   // Overwrite existing authorized_keys files
	Limit    string // Comma separated list of user accounts for limited scope
}

func ParseFlags

func ParseFlags() *Flags

Jump to

Keyboard shortcuts

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