git

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitUtil

type GitUtil struct {
	RepoPath string
}

GitUtil allows for fetching information about a Git repository using Git CLI commands.

func (*GitUtil) HeadCommitLog

func (g *GitUtil) HeadCommitLog() (string, error)

HeadCommitLog returns the log of the current HEAD commit, including a list of the files that were modified.

func (*GitUtil) HeadHash

func (g *GitUtil) HeadHash() (string, error)

HeadHash returns the hash of the current HEAD commit.

type GitUtilInterface

type GitUtilInterface interface {
	HeadHash() (string, error)
	HeadCommitLog() (string, error)
}

GitUtilInterface allows for mocking out the functionality of GitUtil when testing the full process of an apply run.

type MockGitUtilInterface

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

Mock of GitUtilInterface interface

func NewMockGitUtilInterface

func NewMockGitUtilInterface(ctrl *gomock.Controller) *MockGitUtilInterface

func (*MockGitUtilInterface) EXPECT

func (_m *MockGitUtilInterface) EXPECT() *_MockGitUtilInterfaceRecorder

func (*MockGitUtilInterface) HeadCommitLog

func (_m *MockGitUtilInterface) HeadCommitLog() (string, error)

func (*MockGitUtilInterface) HeadHash

func (_m *MockGitUtilInterface) HeadHash() (string, error)

Jump to

Keyboard shortcuts

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