osys

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSHAuthSock = "SSH_AUTH_SOCK"
)

Variables

View Source
var ErrNoGitProviderTokenSet = errors.New("no git provider token env variable set")

Functions

This section is empty.

Types

type Osys

type Osys interface {
	UserHomeDir() (string, error)
	SelectAuthMethod(privateKeyPath string) (ssh.AuthMethod, error)
	GetGitProviderToken() (string, error)
	Getenv(envVar string) string
	LookupEnv(envVar string) (string, bool)
	Setenv(envVar, value string) error
	Exit(code int)
	Stdin() *os.File
	Stdout() *os.File
	Stderr() *os.File
}

type OsysClient

type OsysClient struct{}

func New

func New() *OsysClient

func (*OsysClient) Exit

func (o *OsysClient) Exit(code int)

func (*OsysClient) GetGitProviderToken added in v0.2.3

func (o *OsysClient) GetGitProviderToken() (string, error)

func (*OsysClient) Getenv added in v0.2.3

func (o *OsysClient) Getenv(envVar string) string

func (*OsysClient) LookupEnv added in v0.2.3

func (o *OsysClient) LookupEnv(envVar string) (string, bool)

func (*OsysClient) SelectAuthMethod added in v0.2.3

func (o *OsysClient) SelectAuthMethod(privateKeyPath string) (ssh.AuthMethod, error)

func (*OsysClient) Setenv added in v0.2.3

func (o *OsysClient) Setenv(envVar, value string) error

func (*OsysClient) Stderr

func (o *OsysClient) Stderr() *os.File

func (*OsysClient) Stdin

func (o *OsysClient) Stdin() *os.File

func (*OsysClient) Stdout

func (o *OsysClient) Stdout() *os.File

func (*OsysClient) UserHomeDir

func (o *OsysClient) UserHomeDir() (string, error)

type SshAgentOrFindKeyFile added in v0.2.3

type SshAgentOrFindKeyFile struct {
	ssh.HostKeyCallbackHelper
	// contains filtered or unexported fields
}

SshAgentOrFindKeyFile implements ssh.AuthMethod by attempting to use SSH agent, and failing that, trying standard key locations.

func (*SshAgentOrFindKeyFile) ClientConfig added in v0.2.3

func (a *SshAgentOrFindKeyFile) ClientConfig() (*cryptossh.ClientConfig, error)

func (*SshAgentOrFindKeyFile) Name added in v0.2.3

func (*SshAgentOrFindKeyFile) Name() string

func (*SshAgentOrFindKeyFile) String added in v0.2.3

func (a *SshAgentOrFindKeyFile) String() string

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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