Documentation ¶
Overview ¶
Package helper is a generated GoMock package.
Index ¶
- Constants
- func IsAvailableSSH(identifyPath string) (bool, error)
- func WriteFileWithDirectory(path string, data []byte, perm os.FileMode) error
- func WriteToml(dest string, input interface{}) error
- type AuthOption
- type AuthProvider
- type AuthProviderHTTPS
- type AuthProviderWithSSH
- type AuthProviderWithSSHAgent
- type MockAuthOption
- type MockAuthOptionMockRecorder
- type MockAuthProvider
- type MockAuthProviderMockRecorder
- type SyncConfig
Constants ¶
const ( SSHAgent authMethod = "SSHAgent" SSH = "SSH" HTTPS = "HTTPS" )
Variables ¶
This section is empty.
Functions ¶
func IsAvailableSSH ¶
IsAvailableSSH is Check whether this machine can use git protocol
func WriteFileWithDirectory ¶
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 (p *AuthProviderWithSSHAgent) AuthMethod() (transport.AuthMethod, error)
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 ¶
func (m *MockAuthOption) EXPECT() *MockAuthOptionMockRecorder
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 ¶
func (m *MockAuthProvider) EXPECT() *MockAuthProviderMockRecorder
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 }