conn

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.2.3

func Debug(cfg *Config)

func Sudo

func Sudo(cfg *Config)

Types

type Config

type Config struct {
	Addr    string
	User    string
	Key     string
	Pass    string
	HasSudo bool
	Debug   bool
}

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(addr, user string, args ...LoginArg) *Conn

func (*Conn) Close

func (c *Conn) Close()

func (*Conn) Execute

func (c *Conn) Execute(command string) string

func (*Conn) OS

func (c *Conn) OS() OS

func (*Conn) SFTP added in v0.3.0

func (c *Conn) SFTP() *sftp.Client

func (*Conn) User added in v0.5.4

func (c *Conn) User() string

type LoginArg

type LoginArg func(cfg *Config)

func Key

func Key(path string) LoginArg

type OS

type OS uint8
const (
	UNKNOWN OS = iota
	RHEL
	FEDORA
	DEBIAN
	SBERLINUX
	UBUNTU
)

func (OS) String

func (os OS) String() string

Jump to

Keyboard shortcuts

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