Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStatError ¶
FileStatError wraps os.Stat failures.
func (FileStatError) Error ¶
func (e FileStatError) Error() string
func (FileStatError) Unwrap ¶
func (e FileStatError) Unwrap() error
type KeyGenerateError ¶
type KeyGenerateError struct {
Err error
}
KeyGenerateError wraps RSA key generation failures.
func (KeyGenerateError) Error ¶
func (e KeyGenerateError) Error() string
func (KeyGenerateError) Unwrap ¶
func (e KeyGenerateError) Unwrap() error
type KeyPairInfo ¶
type KeyPairInfo struct {
PrivatePath string
PublicPath string
KeyGenerated bool
PublicCreated bool
}
KeyPairInfo describes the ensured key pair.
func EnsureKeyPair ¶
func EnsureKeyPair(privatePath string, opts ...Option) (*KeyPairInfo, error)
EnsureKeyPair checks for an RSA SSH key pair and creates it when missing.
type KeyParseError ¶
KeyParseError indicates unsupported or corrupt key data.
func (KeyParseError) Error ¶
func (e KeyParseError) Error() string
func (KeyParseError) Unwrap ¶
func (e KeyParseError) Unwrap() error
type KeyReadError ¶
KeyReadError indicates failure to load a key from disk.
func (KeyReadError) Error ¶
func (e KeyReadError) Error() string
func (KeyReadError) Unwrap ¶
func (e KeyReadError) Unwrap() error
type KeyWriteError ¶
KeyWriteError wraps write/permission problems when writing keys.
func (KeyWriteError) Error ¶
func (e KeyWriteError) Error() string
func (KeyWriteError) Unwrap ¶
func (e KeyWriteError) Unwrap() error
type Option ¶
type Option func(*ensureOptions) error
Option configures EnsureKeyPair behavior.
func WithComment ¶
WithComment overrides the comment appended to the public key line.
type OptionError ¶
type OptionError struct {
Reason string
}
OptionError surfaces invalid option configurations.
func (OptionError) Error ¶
func (e OptionError) Error() string
Click to show internal directories.
Click to hide internal directories.