Documentation ¶
Overview ¶
Package credentials describes credentials.
Index ¶
- func GetLogin() string
- type Credentials
- type CredentialsOption
- func WithLogger(logger *zap.Logger) CredentialsOption
- func WithPassphrase(passphrase Secret) CredentialsOption
- func WithPassword(password Secret) CredentialsOption
- func WithPasswords(password []Secret) CredentialsOption
- func WithPrivateKey(key []byte) CredentialsOption
- func WithSSHAgent() CredentialsOption
- func WithUsername(username string) CredentialsOption
- type Secret
- type SimpleCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Credentials ¶
type CredentialsOption ¶
type CredentialsOption func(*SimpleCredentials)
func WithLogger ¶
func WithLogger(logger *zap.Logger) CredentialsOption
func WithPassphrase ¶
func WithPassphrase(passphrase Secret) CredentialsOption
func WithPassword ¶
func WithPassword(password Secret) CredentialsOption
func WithPasswords ¶
func WithPasswords(password []Secret) CredentialsOption
func WithPrivateKey ¶
func WithPrivateKey(key []byte) CredentialsOption
func WithSSHAgent ¶
func WithSSHAgent() CredentialsOption
func WithUsername ¶
func WithUsername(username string) CredentialsOption
type SimpleCredentials ¶
type SimpleCredentials struct {
// contains filtered or unexported fields
}
func NewSimpleCredentials ¶
func NewSimpleCredentials(opts ...CredentialsOption) *SimpleCredentials
func (SimpleCredentials) AgentEnabled ¶
func (m SimpleCredentials) AgentEnabled() bool
func (SimpleCredentials) GetPassphrase ¶
func (m SimpleCredentials) GetPassphrase() Secret
func (SimpleCredentials) GetPasswords ¶
func (m SimpleCredentials) GetPasswords() []Secret
func (SimpleCredentials) GetPrivateKey ¶
func (m SimpleCredentials) GetPrivateKey() []byte
func (SimpleCredentials) GetUsername ¶
func (m SimpleCredentials) GetUsername() (string, error)
Click to show internal directories.
Click to hide internal directories.