Documentation ¶
Index ¶
Constants ¶
const ( CACertName = "ca.crt" CACertConfig = `# SSL cert [http] sslCAInfo = %[1]s ` )
const ( DefaultUsername = "builder" UsernamePasswordName = "password" UsernameSecret = "username" PasswordSecret = "password" TokenSecret = "token" UserPassGitConfig = `# credential git config [credential] helper = store --file=%s ` )
const GitConfigName = ".gitconfig"
const SSHPrivateKeyMethodName = "ssh-privatekey"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CACert ¶ added in v1.0.6
CACert implements SCMAuth interface for using a custom certificate authority
type GitConfig ¶ added in v1.0.6
type GitConfig struct{}
GitConfig implements SCMAuth interface for using a custom .gitconfig file
type SCMAuth ¶
type SCMAuth interface { // Name is the name of the authentication method for use in log and error messages Name() string // Handles returns true if this authentication method handles a file with the given name Handles(name string) bool // Setup lays down the required files for this authentication method to work. // Returns the the source URL stripped of credentials. Setup(baseDir string) (*url.URL, error) }
SCMAuth is an interface implemented by different authentication providers which are responsible for setting up the credentials to be used when accessing private repository.
type SSHPrivateKey ¶
type SSHPrivateKey struct{}
SSHPrivateKey implements SCMAuth interface for using SSH private keys.
func (SSHPrivateKey) Handles ¶ added in v1.0.6
func (_ SSHPrivateKey) Handles(name string) bool
Handles returns true if the file is an SSH private key
func (SSHPrivateKey) Name ¶
func (_ SSHPrivateKey) Name() string
Name returns the name of this auth method.
type UsernamePassword ¶ added in v1.0.6
UsernamePassword implements SCMAuth interface for using Username and Password credentials
func (UsernamePassword) Handles ¶ added in v1.0.6
func (_ UsernamePassword) Handles(name string) bool
Handles returns true if a username, password or token secret is present
func (UsernamePassword) Name ¶ added in v1.0.6
func (_ UsernamePassword) Name() string
Name returns the name of this auth method.