sshkey

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMethodSources

func AuthMethodSources(sources []Source) ssh.AuthMethod

Types

type Agent

type Agent struct {
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent() (*Agent, error)

func (*Agent) Close

func (a *Agent) Close() error

func (*Agent) Signers

func (a *Agent) Signers() ([]ssh.Signer, error)

type GitHubKeys

type GitHubKeys struct {
	// contains filtered or unexported fields
}

func NewGitHubKeys

func NewGitHubKeys(ctx context.Context) (*GitHubKeys, error)

func (*GitHubKeys) PublicKey

func (g *GitHubKeys) PublicKey(username string) (map[string]struct{}, error)

type Source

type Source interface {
	Close() error
	Signers() ([]ssh.Signer, error)
}

type UserKey

type UserKey struct {
	// contains filtered or unexported fields
}

func NewUserKey

func NewUserKey(
	promptKeyfile func(def string) (string, error),
	promptPassphrase func() ([]byte, error),
) *UserKey

func (*UserKey) Close

func (k *UserKey) Close() error

func (*UserKey) Signers

func (k *UserKey) Signers() ([]ssh.Signer, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL