git

package
v0.0.0-...-ed847e1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (
	FieldNameGitCredentialUsername = "username"
	FieldNameGitCredentialPassword = "password"

	StorageKeyConfigurationGitCredential = "configuration_git_credential"
)

Variables

This section is empty.

Functions

func AddWorktreeFilesToTar

func AddWorktreeFilesToTar(tw *tar.Writer, gitRepo *git.Repository) error

func CloneInMemory

func CloneInMemory(url string, opts CloneOptions) (*git.Repository, error)

func CredentialsPaths

func CredentialsPaths() []*framework.Path

func DeleteGitCredential

func DeleteGitCredential(ctx context.Context, storage logical.Storage) error

func ForEachWorktreeFile

func ForEachWorktreeFile(gitRepo *git.Repository, fileFunc func(path string, link string, fileReader io.Reader, info os.FileInfo) error) error

func IsAncestor

func IsAncestor(gitRepo *git.Repository, ancestorCommit, descendantCommit string) (bool, error)

func PutGitCredential

func PutGitCredential(ctx context.Context, storage logical.Storage, gitCredential GitCredential) error

func ReadWorktreeFile

func ReadWorktreeFile(gitRepo *git.Repository, path string) ([]byte, error)

func VerifyCommitSignatures

func VerifyCommitSignatures(repo *git.Repository, commit string, pgpKeys []string, requiredNumberOfVerifiedSignatures int) error

func VerifyTagSignatures

func VerifyTagSignatures(repo *git.Repository, tagName string, pgpKeys []string, requiredNumberOfVerifiedSignatures int) error

Types

type CloneOptions

type CloneOptions struct {
	TagName           string
	BranchName        string
	ReferenceName     string
	RecurseSubmodules git.SubmoduleRescursivity
	Auth              transport.AuthMethod
}

type GitCredential

type GitCredential struct {
	Username string `structs:"username" json:"username"`
	Password string `structs:"password" json:"password"`
}

func GetGitCredential

func GetGitCredential(ctx context.Context, storage logical.Storage) (*GitCredential, error)

Jump to

Keyboard shortcuts

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