Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoCredentialHelperFound = fmt.Errorf("no credential helper found")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // UseHttps will force https on each proto dependencies fetch. UseHttps bool // UseGitCredentialsHelper will use git credentials helper for authentication. UseGitCredentialsHelper bool // UseNetrc will use netrc file for authentication. UseNetrc 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 }
func (*Config) GetHttpsAuthProvider ¶
func (c *Config) GetHttpsAuthProvider() (auth.AuthProvider, error)
GetHttpsAuthProvider returns auth provider for https
func (*Config) GetSshAuthProvider ¶
func (c *Config) GetSshAuthProvider() (auth.AuthProvider, error)
GetSshAuthProvider returns auth provider for ssh
type CredentialConfigEntry ¶
func (*CredentialConfigEntry) Evaluate ¶
func (c *CredentialConfigEntry) Evaluate(repoURL string) (*GitCredential, error)
type Credentials ¶
type Credentials map[string]*CredentialConfigEntry
func ParseGitCredentials ¶
func ParseGitCredentials() (Credentials, error)
func (Credentials) Get ¶
func (c Credentials) Get(host string) *CredentialConfigEntry
func (Credentials) Has ¶
func (c Credentials) Has(section string) bool
Click to show internal directories.
Click to hide internal directories.