Documentation
¶
Overview ¶
Package git is a generated GoMock package.
Index ¶
- Variables
- type DiffEntries
- type DiffEntry
- type MockRepository
- func (m *MockRepository) Checkout(reference string) error
- func (m *MockRepository) CommitExists(commitHash string) (bool, error)
- func (m *MockRepository) DiffCommits(beforeCommitHash, targetCommitHash string) (DiffEntries, error)
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) IsAncestor(ancestor, other string) (bool, error)
- func (m *MockRepository) ResolveCommitForReference(reference string) (string, error)
- func (m *MockRepository) ResolveTagsForCommit(commitHash string) ([]string, error)
- type MockRepositoryMockRecorder
- func (mr *MockRepositoryMockRecorder) Checkout(reference any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) CommitExists(commitHash any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) DiffCommits(beforeCommitHash, targetCommitHash any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) IsAncestor(ancestor, other any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) ResolveCommitForReference(reference any) *gomock.Call
- func (mr *MockRepositoryMockRecorder) ResolveTagsForCommit(commitHash any) *gomock.Call
- type Repository
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DiffEntries ¶ added in v1.81.1
type DiffEntries []DiffEntry
type MockRepository ¶ added in v1.81.1
type MockRepository struct {
// contains filtered or unexported fields
}
MockRepository is a mock of Repository interface.
func NewMockRepository ¶ added in v1.81.1
func NewMockRepository(ctrl *gomock.Controller) *MockRepository
NewMockRepository creates a new mock instance.
func (*MockRepository) Checkout ¶ added in v1.81.1
func (m *MockRepository) Checkout(reference string) error
Checkout mocks base method.
func (*MockRepository) CommitExists ¶ added in v1.82.0
func (m *MockRepository) CommitExists(commitHash string) (bool, error)
CommitExists mocks base method.
func (*MockRepository) DiffCommits ¶ added in v1.81.1
func (m *MockRepository) DiffCommits(beforeCommitHash, targetCommitHash string) (DiffEntries, error)
DiffCommits mocks base method.
func (*MockRepository) EXPECT ¶ added in v1.81.1
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRepository) IsAncestor ¶ added in v1.81.1
func (m *MockRepository) IsAncestor(ancestor, other string) (bool, error)
IsAncestor mocks base method.
func (*MockRepository) ResolveCommitForReference ¶ added in v1.81.1
func (m *MockRepository) ResolveCommitForReference(reference string) (string, error)
ResolveCommitForReference mocks base method.
func (*MockRepository) ResolveTagsForCommit ¶ added in v1.81.1
func (m *MockRepository) ResolveTagsForCommit(commitHash string) ([]string, error)
ResolveTagsForCommit mocks base method.
type MockRepositoryMockRecorder ¶ added in v1.81.1
type MockRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockRepositoryMockRecorder is the mock recorder for MockRepository.
func (*MockRepositoryMockRecorder) Checkout ¶ added in v1.81.1
func (mr *MockRepositoryMockRecorder) Checkout(reference any) *gomock.Call
Checkout indicates an expected call of Checkout.
func (*MockRepositoryMockRecorder) CommitExists ¶ added in v1.82.0
func (mr *MockRepositoryMockRecorder) CommitExists(commitHash any) *gomock.Call
CommitExists indicates an expected call of CommitExists.
func (*MockRepositoryMockRecorder) DiffCommits ¶ added in v1.81.1
func (mr *MockRepositoryMockRecorder) DiffCommits(beforeCommitHash, targetCommitHash any) *gomock.Call
DiffCommits indicates an expected call of DiffCommits.
func (*MockRepositoryMockRecorder) IsAncestor ¶ added in v1.81.1
func (mr *MockRepositoryMockRecorder) IsAncestor(ancestor, other any) *gomock.Call
IsAncestor indicates an expected call of IsAncestor.
func (*MockRepositoryMockRecorder) ResolveCommitForReference ¶ added in v1.81.1
func (mr *MockRepositoryMockRecorder) ResolveCommitForReference(reference any) *gomock.Call
ResolveCommitForReference indicates an expected call of ResolveCommitForReference.
func (*MockRepositoryMockRecorder) ResolveTagsForCommit ¶ added in v1.81.1
func (mr *MockRepositoryMockRecorder) ResolveTagsForCommit(commitHash any) *gomock.Call
ResolveTagsForCommit indicates an expected call of ResolveTagsForCommit.
type Repository ¶ added in v1.81.1
type Repository interface {
// Checkout a specific commit, or the commit of a branch or tag name.
Checkout(reference string) error
// ResolveCommitForReference gets the current commit for a branch or tag name.
ResolveCommitForReference(reference string) (string, error)
// IsAncestor checks if a commit, branch or tag is ancestor of other commit, branch or tag.
IsAncestor(ancestor, other string) (bool, error)
// ResolveTagsForCommit returns tags for a specific commit.
ResolveTagsForCommit(commitHash string) ([]string, error)
// DiffCommits returns list of changes between two commits.
// If beforeCommitHash is empty, all changes up till targetCommit is returned.
DiffCommits(beforeCommitHash, targetCommitHash string) (DiffEntries, error)
// CommitExists checks if a commit exists.
CommitExists(commitHash string) (bool, error)
}
func Open ¶ added in v1.81.1
func Open(path string) (Repository, error)