gitcommand

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloneOpt

type CloneOpt struct {
	Branch string
	Depth  int
}

type GitCommandClient

type GitCommandClient interface {
	Clone(ctx context.Context, org, repo string, opt CloneOpt) (string, error)
	CommitAll(ctx context.Context, dirPath, commitMsg string) error
	CommitAllAmend(ctx context.Context, dirPath string) error
	HealthCheck() (err error)
	Push(ctx context.Context, dirPath string) error
	Remove(ctx context.Context, dirPath string) error
	Restore(ctx context.Context, dirPath, sourceBranch string, filePaths []string) error
	SwitchNewBranch(ctx context.Context, dirPath, branch string) error
}

func NewGitCommandClientImpl

func NewGitCommandClientImpl(user, token string) GitCommandClient

type GitCommandClientImpl

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

func (*GitCommandClientImpl) Clone

func (g *GitCommandClientImpl) Clone(ctx context.Context, org, repo string, opt CloneOpt) (string, error)

func (*GitCommandClientImpl) CommitAll

func (g *GitCommandClientImpl) CommitAll(ctx context.Context, dirPath, commitMsg string) error

func (*GitCommandClientImpl) CommitAllAmend

func (g *GitCommandClientImpl) CommitAllAmend(ctx context.Context, dirPath string) error

func (*GitCommandClientImpl) HealthCheck

func (g *GitCommandClientImpl) HealthCheck() (err error)

func (*GitCommandClientImpl) Push

func (g *GitCommandClientImpl) Push(ctx context.Context, dirPath string) error

func (*GitCommandClientImpl) Remove

func (g *GitCommandClientImpl) Remove(ctx context.Context, dirPath string) error

func (*GitCommandClientImpl) Restore

func (g *GitCommandClientImpl) Restore(ctx context.Context, dirPath, sourceBranch string, filePaths []string) error

func (*GitCommandClientImpl) SwitchNewBranch

func (g *GitCommandClientImpl) SwitchNewBranch(ctx context.Context, dirPath, branch string) error

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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