git

package
v0.81.3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Checkout(branchName string, logger log.FieldLogger) error
	Commit(filePath, commitMsg string, logger log.FieldLogger) error
	Push(logger log.FieldLogger) error
	Close(tempDir string, logger log.FieldLogger) error
}

func NewGitClient

func NewGitClient(oauthToken, tempDir, remoteURL, authorName string) (Client, error)

Git is a wrapper around go-git to provide a simple interface for interacting with git. TODO: Handle concurrent access to the repo.

type Git

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

func (*Git) Checkout

func (g *Git) Checkout(branchName string, logger log.FieldLogger) error

func (*Git) Close

func (g *Git) Close(tempDir string, logger log.FieldLogger) error

func (*Git) Commit

func (g *Git) Commit(filePath, commitMsg string, logger log.FieldLogger) error

func (*Git) Push

func (g *Git) Push(logger log.FieldLogger) error

Jump to

Keyboard shortcuts

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