ssh

package
v28.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ssh provides the connection helper for ssh:// URL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spec

type Spec struct {
	User string
	Host string
	Port string
	Path string
}

Spec of SSH URL

func NewSpec

func NewSpec(sshURL *url.URL) (*Spec, error)

NewSpec creates a Spec from the given ssh URL's properties. It returns an error if the URL is using the wrong scheme, contains fragments, query-parameters, or contains a password.

func ParseURL

func ParseURL(daemonURL string) (*Spec, error)

ParseURL creates a Spec from the given ssh URL. It returns an error if the URL is using the wrong scheme, contains fragments, query-parameters, or contains a password.

func (*Spec) Args

func (sp *Spec) Args(add ...string) []string

Args returns args except "ssh" itself combined with optional additional command args

Jump to

Keyboard shortcuts

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