git

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasicAuthUsernameKey = "username"
	BasicAuthPasswordKey = "password"
	SSHAuthPrivateKey    = "ssh-privatekey"
)

Variables

View Source
var ErrNoSecret = fmt.Errorf("failed to find one of the following keys in secret: %v", []string{
	BasicAuthUsernameKey,
	BasicAuthPasswordKey,
	SSHAuthPrivateKey,
})

Functions

func BranchCommit

func BranchCommit(ctx context.Context, url string, branch string, auth *Auth) (string, error)

func CloneRepo

func CloneRepo(ctx context.Context, url string, commit string, auth *Auth) error

Types

type Auth

type Auth struct {
	Basic Basic
	SSH   SSH
}

func FromSecret

func FromSecret(secret map[string][]byte) (Auth, error)

func (Auth) Populate

func (a Auth) Populate(url string) (string, []string, func())

type Basic

type Basic struct {
	Username string
	Password string
}

type SSH

type SSH struct {
	Key []byte
}

Jump to

Keyboard shortcuts

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