Documentation ¶
Index ¶
- Constants
- func RegisterClient(identifier ClientType, newFunc func(config Config) (Client, error), ...)
- type AuthTypes
- type AuthenticationError
- type Client
- type ClientDesc
- type ClientType
- type Config
- type ConnectionError
- type EncryptionPassphraseCallback
- type Option
- type OptionType
- type OptionValue
- type PasswordCallback
- type PrivateKeysCallback
- type Tristate
Constants ¶
View Source
const ( OptionTypeString = iota OptionTypeBool OptionTypeEnum )
Variables ¶
This section is empty.
Functions ¶
func RegisterClient ¶
func RegisterClient(identifier ClientType, newFunc func(config Config) (Client, error), desc ClientDesc)
RegisterClient registers a new device client. This function is not intended for use from external packages.
Types ¶
type AuthenticationError ¶
func (*AuthenticationError) Error ¶
func (e *AuthenticationError) Error() string
func (*AuthenticationError) Unwrap ¶
func (e *AuthenticationError) Unwrap() error
type Client ¶
type ClientDesc ¶
type ClientType ¶
type ClientType string
func GetClientTypes ¶
func GetClientTypes() []ClientType
func (ClientType) ClientDesc ¶
func (t ClientType) ClientDesc() ClientDesc
func (ClientType) IsValid ¶
func (t ClientType) IsValid() bool
type Config ¶
type Config struct { Type ClientType Host string User string AuthPassword PasswordCallback AuthPrivateKeys PrivateKeysCallback EncryptionPassphrase EncryptionPassphraseCallback KnownHosts string Options map[string]string }
type ConnectionError ¶
type ConnectionError struct {
Err error
}
func (*ConnectionError) Error ¶
func (e *ConnectionError) Error() string
func (*ConnectionError) Unwrap ¶
func (e *ConnectionError) Unwrap() error
type EncryptionPassphraseCallback ¶
func EncryptionPassphrase ¶
func EncryptionPassphrase(passphrase string) EncryptionPassphraseCallback
type Option ¶
type Option struct { Description string Type OptionType Values []OptionValue }
type OptionType ¶
type OptionType int
type OptionValue ¶
type PasswordCallback ¶
func Password ¶
func Password(password string) PasswordCallback
type PrivateKeysCallback ¶
type PrivateKeysCallback struct { Keys func() ([]string, error) Passphrase func(fingerprint string) (string, error) }
func PrivateKey ¶
func PrivateKey(key string, passphrase string) PrivateKeysCallback
Click to show internal directories.
Click to hide internal directories.