git

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 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 Mock

type Mock struct {
	mock.Mock
}

Mock impl of Repository interface

func (*Mock) Clone

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

Clone mock

func (*Mock) CommitObject

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

CommitObject mock

func (*Mock) Head

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

Head mock

func (*Mock) Open

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

Open mock

func (*Mock) Pull

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

Pull mock

func (*Mock) Worktree

func (m *Mock) 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)
}

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