Documentation
¶
Index ¶
- type CLIOptionParser
- type Config
- func (o *Config) AuthMethods() []interface{}
- func (o *Config) CanonicalHostFormat() string
- func (o *Config) Hostname() string
- func (o *Config) Options() map[OptionName]Option
- func (o *Config) Port() int
- func (o *Config) URLHostnamePort() string
- func (o *Config) UrlPath() string
- func (o *Config) Username() string
- type Option
- type OptionName
- type OptionParser
- type StringOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLIOptionParser ¶
type CLIOptionParser interface {
OptionParser
FlagName() string
Usage() string
// returns whether it should be considered as a boolean flag (parsed using flag.Bool(), with no flag value)
// or as a flag with a value. If IsBoolFlag returns true, the Parse() method will be called with "yes" or "no"
// depending of the boolean value of the arg
IsBoolFlag() bool
}
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) AuthMethods ¶
func (o *Config) AuthMethods() []interface{}
func (*Config) CanonicalHostFormat ¶
Returns the canonical host representation used by SSH3. The format is <urlhostnameport><path> <urlhostnameport> is the host:port pair in the format returned by URLHostnamePort() <path> is the URL path, it always starts with a "/", it is therefore never empty.
func (*Config) Options ¶
func (o *Config) Options() map[OptionName]Option
func (*Config) URLHostnamePort ¶
Returns the pair hostname:port in a valid URL format. This means that an IPv6 will be written inside square brackets []. examples: "127.0.0.1:443", "example.org:1234", "[::1]:22""
type Option ¶
type Option any
Option defnes a generic client option that can be manipulated by the client and by different auth plugins. Plugins can define their own option types
type OptionName ¶
type OptionName string
type OptionParser ¶
type OptionParser interface {
// returns the option config keyword
// This keyword is used when parsing the SSH config.
OptionConfigName() string
// returns the Option represented by this list of config values
// the values are all retrieved from the config.
// values contain several entries if the keyword (see `OptionConfigName`) is
// present several times in the config.
Parse(values []string) (Option, error)
}
OptionParser allows parsing an client config option from a string.
type StringOption ¶
StringOptions is a client option whose value is a string