ssh

package
v0.0.0-...-9135743 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	IP   network.IP
	Port int
}

func (Host) Address

func (h Host) Address(ctx context.Context) (string, error)

func (Host) Validate

func (h Host) Validate(ctx context.Context) error

type PrivateKeyPath

type PrivateKeyPath string

func (PrivateKeyPath) Signer

func (p PrivateKeyPath) Signer() (ssh.Signer, error)

func (PrivateKeyPath) String

func (p PrivateKeyPath) String() string

func (PrivateKeyPath) Validate

func (p PrivateKeyPath) Validate(ctx context.Context) error

type PublicKeyPath

type PublicKeyPath string

func (PublicKeyPath) String

func (p PublicKeyPath) String() string

func (PublicKeyPath) Validate

func (p PublicKeyPath) Validate(ctx context.Context) error

type SSH

type SSH struct {
	Host           Host
	PrivateKeyPath PrivateKeyPath
	User           User
	// contains filtered or unexported fields
}

func (*SSH) Close

func (s *SSH) Close()

func (*SSH) RunCommand

func (s *SSH) RunCommand(ctx context.Context, cmd string) error

func (*SSH) RunCommandStdin

func (s *SSH) RunCommandStdin(ctx context.Context, command string, content []byte) error

func (*SSH) RunCommandStdout

func (s *SSH) RunCommandStdout(ctx context.Context, command string) ([]byte, error)

func (*SSH) Validate

func (s *SSH) Validate(ctx context.Context) error

type User

type User string

func (User) String

func (p User) String() string

func (User) Validate

func (h User) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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