helper

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package helper is a generated GoMock package.

Index

Constants

View Source
const (
	SSHAgent authMethod = "SSHAgent"
	SSH                 = "SSH"
	HTTPS               = "HTTPS"
)

Variables

This section is empty.

Functions

func IsAvailableSSH

func IsAvailableSSH(identifyPath string) (bool, error)

IsAvailableSSH is Check whether this machine can use git protocol

func WriteFileWithDirectory

func WriteFileWithDirectory(path string, data []byte, perm os.FileMode) error

func WriteToml

func WriteToml(dest string, input interface{}) error

Types

type AuthOption

type AuthOption interface {
	// contains filtered or unexported methods
}

func WithHTTPS

func WithHTTPS(username, password string) AuthOption

func WithPemFile

func WithPemFile(pemFile, password string) AuthOption

type AuthProvider

type AuthProvider interface {
	GetRepositoryURL(reponame string) string
	AuthMethod() (transport.AuthMethod, error)
}

func NewAuthProvider

func NewAuthProvider(opt ...AuthOption) AuthProvider

type AuthProviderHTTPS

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

func (*AuthProviderHTTPS) AuthMethod

func (p *AuthProviderHTTPS) AuthMethod() (transport.AuthMethod, error)

func (*AuthProviderHTTPS) GetRepositoryURL

func (p *AuthProviderHTTPS) GetRepositoryURL(reponame string) string

type AuthProviderWithSSH

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

func (*AuthProviderWithSSH) AuthMethod

func (p *AuthProviderWithSSH) AuthMethod() (transport.AuthMethod, error)

func (*AuthProviderWithSSH) GetRepositoryURL

func (p *AuthProviderWithSSH) GetRepositoryURL(reponame string) string

type AuthProviderWithSSHAgent

type AuthProviderWithSSHAgent struct {
}

func (*AuthProviderWithSSHAgent) AuthMethod

func (*AuthProviderWithSSHAgent) GetRepositoryURL

func (p *AuthProviderWithSSHAgent) GetRepositoryURL(reponame string) string

type MockAuthOption

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

MockAuthOption is a mock of AuthOption interface.

func NewMockAuthOption

func NewMockAuthOption(ctrl *gomock.Controller) *MockAuthOption

NewMockAuthOption creates a new mock instance.

func (*MockAuthOption) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockAuthOptionMockRecorder

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

MockAuthOptionMockRecorder is the mock recorder for MockAuthOption.

type MockAuthProvider

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

MockAuthProvider is a mock of AuthProvider interface.

func NewMockAuthProvider

func NewMockAuthProvider(ctrl *gomock.Controller) *MockAuthProvider

NewMockAuthProvider creates a new mock instance.

func (*MockAuthProvider) AuthMethod

func (m *MockAuthProvider) AuthMethod() (transport.AuthMethod, error)

AuthMethod mocks base method.

func (*MockAuthProvider) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthProvider) GetRepositoryURL

func (m *MockAuthProvider) GetRepositoryURL(reponame string) string

GetRepositoryURL mocks base method.

type MockAuthProviderMockRecorder

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

MockAuthProviderMockRecorder is the mock recorder for MockAuthProvider.

func (*MockAuthProviderMockRecorder) AuthMethod

func (mr *MockAuthProviderMockRecorder) AuthMethod() *gomock.Call

AuthMethod indicates an expected call of AuthMethod.

func (*MockAuthProviderMockRecorder) GetRepositoryURL

func (mr *MockAuthProviderMockRecorder) GetRepositoryURL(reponame interface{}) *gomock.Call

GetRepositoryURL indicates an expected call of GetRepositoryURL.

type SyncConfig

type SyncConfig struct {
	// UseHttps will force https on each proto dependencies fetch.
	UseHttps bool

	// HomeDir is the home directory, used as root to find ssh identity files.
	HomeDir string

	// TargetDir is the dependencies directory where protodep.toml files are located.
	TargetDir string

	// OutputDir is the directory where proto files will be cloned.
	OutputDir string

	// BasicAuthUsername is used if `https` mode  is enable. Optional, only if dependency repository needs authentication.
	BasicAuthUsername string

	// BasicAuthPassword is used if `https` mode is enable. Optional, only if dependency repository needs authentication.
	BasicAuthPassword string

	// IdentityFile is used if `ssh` mode is enable. Optional, it is computed like {home}/.ssh/
	IdentityFile string

	// IdentityPassword is used if `ssh` mode is enable. Optional, only if identity file needs a passphrase.
	IdentityPassword string
}

Jump to

Keyboard shortcuts

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