git

package
v0.88.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 9 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 {
	Commit(filePath, commitMsg string, logger log.FieldLogger) error
	Push(logger log.FieldLogger) error
	Close(tempDir string, logger log.FieldLogger) error
	Pull(logger log.FieldLogger) error
}

func NewGitClient

func NewGitClient(oauthToken, tempDir, remoteURL, authorName, branchName 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) 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) Pull added in v0.84.0

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

func (*Git) Push

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

type NoOpClient added in v0.84.0

type NoOpClient struct{}

noopClient is a Git Client that is not configured.

func (*NoOpClient) Close added in v0.84.0

func (n *NoOpClient) Close(tempDir string, logger log.FieldLogger) error

func (*NoOpClient) Commit added in v0.84.0

func (n *NoOpClient) Commit(filePath, commitMsg string, logger log.FieldLogger) error

func (*NoOpClient) Pull added in v0.84.0

func (n *NoOpClient) Pull(logger log.FieldLogger) error

func (*NoOpClient) Push added in v0.84.0

func (n *NoOpClient) Push(logger log.FieldLogger) error

Jump to

Keyboard shortcuts

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