gitcommand

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseDir = "/tmp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

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

func NewGit

func NewGit(l logr.Logger, e exec.Interface) (*Git, error)

TODO: this impl only support https (ssh is not implemented yet)

func (*Git) CommitAndPush

func (g *Git) CommitAndPush(ctx context.Context, gp models.InfraRepoLocalDir, message string) (*models.InfraRepoLocalDir, error)

func (*Git) CreateFiles

func (g *Git) CreateFiles(ctx context.Context, gp models.InfraRepoLocalDir, files ...models.File) error

func (*Git) DeleteFiles

func (g *Git) DeleteFiles(ctx context.Context, gp models.InfraRepoLocalDir, files ...models.File) error

func (*Git) ForceClone

func (g *Git) ForceClone(ctx context.Context, infraTarget models.InfraRepoTarget) (models.InfraRepoLocalDir, error)

func (*Git) WithCredential

func (g *Git) WithCredential(credential models.GitCredential) error

Jump to

Keyboard shortcuts

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