git

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultRemoteName will provide default origin.
	DefaultRemoteName = git.DefaultRemoteName
)

Variables

View Source
var (
	// ErrPackageNotAvailable is an error for handling incorrect package
	ErrPackageNotAvailable = errors.New("package is not available. Supported packages can be found here: https://techdocs.akamai.com/home/page/products-tools-a-z")
)

Functions

This section is empty.

Types

type MockRepo added in v1.5.2

type MockRepo struct {
	mock.Mock
}

MockRepo impl of Repository interface

func (*MockRepo) Clone added in v1.5.2

func (m *MockRepo) Clone(_ context.Context, path, repo string, isBare bool, progress terminal.Spinner) error

Clone mock

func (*MockRepo) CommitObject added in v1.5.2

func (m *MockRepo) CommitObject(h plumbing.Hash) (*object.Commit, error)

CommitObject mock

func (*MockRepo) Head added in v1.5.2

func (m *MockRepo) Head() (*plumbing.Reference, error)

Head mock

func (*MockRepo) Open added in v1.5.2

func (m *MockRepo) Open(path string) error

Open mock

func (*MockRepo) Pull added in v1.5.2

func (m *MockRepo) Pull(_ context.Context, worktree *git.Worktree) error

Pull mock

func (*MockRepo) Reset added in v1.5.2

func (m *MockRepo) Reset(opts *git.ResetOptions) error

Reset mock

func (*MockRepo) Worktree added in v1.5.2

func (m *MockRepo) Worktree() (*git.Worktree, error)

Worktree mock

type Repository

type Repository interface {
	Open(path string) error
	Clone(ctx context.Context, path, repo string, isBare bool, progress terminal.Spinner) error
	Pull(ctx context.Context, worktree *git.Worktree) error
	Head() (*plumbing.Reference, error)
	Worktree() (*git.Worktree, error)
	CommitObject(h plumbing.Hash) (*object.Commit, error)
	Reset(opts *git.ResetOptions) error
}

Repository interface.

func NewRepository

func NewRepository() Repository

NewRepository will initialize new git integrations instance.

Jump to

Keyboard shortcuts

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