git

package
v0.0.0-...-cc7cbc4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UsernameKey = "username"
	PasswordKey = "password"
	KeyKey      = "key"
)

Variables

This section is empty.

Functions

func GetAuth

func GetAuth(options *AuthOptions) (git2go.RemoteCallbacks, error)

func IsAuthErr

func IsAuthErr(err error) bool

func IsNotRecoverableError

func IsNotRecoverableError(err error) bool

Types

type AuthOptions

type AuthOptions struct {
	Type        RepositoryAuthType
	Credentials map[string]string
	SecretName  string
}

type Git2GoClient

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

func NewGit2Go

func NewGit2Go() *Git2GoClient

func (*Git2GoClient) Clone

func (g *Git2GoClient) Clone(path string, options Options) (string, error)

func (*Git2GoClient) LastCommit

func (g *Git2GoClient) LastCommit(options Options) (string, error)

type Options

type Options struct {
	URL       string
	Reference string
	Auth      *AuthOptions
}

type RepositoryAuthType

type RepositoryAuthType string
const (
	RepositoryAuthBasic  RepositoryAuthType = "basic"
	RepositoryAuthSSHKey                    = "key"
)

Jump to

Keyboard shortcuts

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