Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrCannotReachHost = errWinRM.Code("cannot_reach_host").ErrorPref("Cannot reach the Client host: %s") ErrNoPeerCertificate = errWinRM.Code("no_peer_cert").Error("Could not get the peer certificate") ErrCertNotTrusted = errWinRM.Code("peer_not_trusted").Error("Peer certificate is not trusted") ErrExecutingCommand = errWinRM.Code("executing_command").ErrorPref("An error occurred while executing the command : %s") ErrCertAuthNoClientKey = errWinRM.Code("no_client_key_certificate_authentication").Error("No client key was supplied to use for certificate authentication") ErrCertAuthNoClientCert = errWinRM.Code("no_client_certificate_certificate_authentication").Error("No client certificate was supplied to use for certificate authentication") ErrBasicAuthNoUsername = errWinRM.Code("no_username_basic_authentication").Error("No username was supplied to use for basic authentication") ErrBasicAuthNoPassword = errWinRM.Code("no_password_basic_authentication").Error("No password was supplied to use for basic authentication") )
Errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client contains all necessary data for a Client connection.
func NewBasicClient ¶
NewBasicClient returns a Client with basic authentication using username and password. This validates if a proper username and password is given. It uses a authBasic implementation for authMethod.
func NewCertClient ¶
NewCertClient returns a Client with certificate authentication using client certificate and key. This validates if a clientKey and clientCert is given. It uses a authCert implementation for authMethod.
func (*Client) CopyFile ¶
CopyFile copies the data from a io.Reader to a file at the destination path on the host. The progress (in amount of bytes transferred) of the copy is published on the progress channel.
func (*Client) GetServerCert ¶
GetServerCert retrieves the server TLS certificate of a Client-host. If the certificate is not trusted, the user is asked whether to trust the certificate fingerprint. If the user trusts the fingerprint, the server certificate is set as the Client CA certificate, so a following TLS connection will succeed.