commands

package
v2.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []cli.Command{
	{
		Name:        "connect",
		Usage:       "Connect to host SSH socket, used by ProxyCommand",
		Description: "Argument is a host.",
		Action:      cmdProxy,
		Hidden:      true,
		Flags: []cli.Flag{
			cli.IntFlag{
				Name:  "port, p",
				Value: 0,
				Usage: "SSH destination port",
			},
			cli.BoolFlag{
				Name:  "dry-run",
				Usage: "Only show how assh would connect but don't actually do it",
			},
		},
	},

	{
		Name:   "info",
		Usage:  "Display system-wide information",
		Action: cmdInfo,
	},
	{
		Name:  "config",
		Usage: "Manage ssh and assh configuration",
		Subcommands: []cli.Command{
			{
				Name:  "build",
				Usage: "Build .ssh/config",
				Flags: []cli.Flag{
					cli.BoolFlag{
						Name:  "expand, e",
						Usage: "Expand all fields",
					},
				},
				Action: cmdBuild,
			},
			{
				Name:   "json",
				Usage:  "Returns the JSON output",
				Action: cmdBuildJSON,
				Flags: []cli.Flag{
					cli.BoolFlag{
						Name:  "expand, e",
						Usage: "Expand all fields",
					},
				},
			},
			{
				Name:   "list",
				Usage:  "List all hosts from assh config",
				Action: cmdList,
			},
			{
				Name:   "search",
				Usage:  "Search entries by given search text",
				Action: cmdSearch,
			},
		},
	},
	{
		Name:  "sockets",
		Usage: "Manage control sockets",
		Subcommands: []cli.Command{
			{
				Name:   "list",
				Action: cmdCsList,
				Usage:  "List active control sockets",
			},
			{
				Name:   "flush",
				Action: cmdCsFlush,
				Usage:  "Close control sockets",
			},
			{
				Name:   "master",
				Action: cmdCsMaster,
				Usage:  "Open a master control socket",
			},
		},
	},

	{
		Name:   "wrapper",
		Usage:  "Initialize assh, then run ssh/scp/rsync...",
		Hidden: true,
		Subcommands: []cli.Command{
			{
				Name:   "ssh",
				Action: cmdWrapper,
				Usage:  "Wrap ssh",
				Flags:  config.SSHFlags,
			},
		},
	},
}

Commands is the list of cli commands

Functions

This section is empty.

Types

type ConnectHookArgs

type ConnectHookArgs struct {
	Host  *config.Host
	Stats *ConnectionStats
	Error error
}

ConnectHookArgs is the struture sent to the hooks and used in Go templates by the hook drivers

type ConnectionStats

type ConnectionStats struct {
	WrittenBytes            uint64
	WrittenBytesHuman       string
	CreatedAt               time.Time
	ConnectedAt             time.Time
	DisconnectedAt          time.Time
	ConnectionDuration      time.Duration
	ConnectionDurationHuman string
	AverageSpeed            float64
	AverageSpeedHuman       string
}

ConnectionStats contains network and timing informations about a connection

Jump to

Keyboard shortcuts

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