git

package
v1.1.19 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Overview

Package git is a generated GoMock package.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type CmdRunner added in v1.1.15

type CmdRunner interface {
	Run(*exec.Cmd) error
	Output(*exec.Cmd) ([]byte, error)
}

func NewCmdRunner added in v1.1.15

func NewCmdRunner() CmdRunner

type DefaultCmdRunner added in v1.1.15

type DefaultCmdRunner struct{}

func (*DefaultCmdRunner) Output added in v1.1.15

func (d *DefaultCmdRunner) Output(cmd *exec.Cmd) ([]byte, error)

func (*DefaultCmdRunner) Run added in v1.1.15

func (d *DefaultCmdRunner) Run(cmd *exec.Cmd) error

type DefaultGit added in v1.1.15

type DefaultGit struct {
	CmdRunner CmdRunner
}

func (*DefaultGit) LastCommit added in v1.1.15

func (g *DefaultGit) LastCommit(short bool) (string, error)

LastCommit gets the last commit SHA

func (*DefaultGit) LastCommitMessage added in v1.1.15

func (g *DefaultGit) LastCommitMessage() (string, error)

LastCommitMessage gets the last commit message

func (*DefaultGit) Tag added in v1.1.15

func (g *DefaultGit) Tag(tag string) error

Tag calls git to create a new tag from a string

func (*DefaultGit) Tagged added in v1.1.15

func (g *DefaultGit) Tagged() (bool, error)

Tagged returns true if the specified commit has been tagged

func (*DefaultGit) Tags added in v1.1.15

func (g *DefaultGit) Tags(merged bool) ([]string, error)

Tags returns the list of git tags as a string slice

type Git added in v1.1.15

type Git interface {
	LastCommit(short bool) (string, error)
	LastCommitMessage() (string, error)
	Tag(tag string) error
	Tags(merged bool) ([]string, error)
	Tagged() (bool, error)
}

func NewGit added in v1.1.15

func NewGit() Git

type MockCmdRunner added in v1.1.15

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

MockCmdRunner is a mock of CmdRunner interface.

func NewMockCmdRunner added in v1.1.15

func NewMockCmdRunner(ctrl *gomock.Controller) *MockCmdRunner

NewMockCmdRunner creates a new mock instance.

func (*MockCmdRunner) EXPECT added in v1.1.15

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCmdRunner) Output added in v1.1.15

func (m *MockCmdRunner) Output(arg0 *exec.Cmd) ([]byte, error)

Output mocks base method.

func (*MockCmdRunner) Run added in v1.1.15

func (m *MockCmdRunner) Run(arg0 *exec.Cmd) error

Run mocks base method.

type MockCmdRunnerMockRecorder added in v1.1.15

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

MockCmdRunnerMockRecorder is the mock recorder for MockCmdRunner.

func (*MockCmdRunnerMockRecorder) Output added in v1.1.15

func (mr *MockCmdRunnerMockRecorder) Output(arg0 interface{}) *gomock.Call

Output indicates an expected call of Output.

func (*MockCmdRunnerMockRecorder) Run added in v1.1.15

func (mr *MockCmdRunnerMockRecorder) Run(arg0 interface{}) *gomock.Call

Run indicates an expected call of Run.

type MockGit added in v1.1.15

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

MockGit is a mock of Git interface.

func NewMockGit added in v1.1.15

func NewMockGit(ctrl *gomock.Controller) *MockGit

NewMockGit creates a new mock instance.

func (*MockGit) EXPECT added in v1.1.15

func (m *MockGit) EXPECT() *MockGitMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGit) LastCommit added in v1.1.15

func (m *MockGit) LastCommit(short bool) (string, error)

LastCommit mocks base method.

func (*MockGit) LastCommitMessage added in v1.1.15

func (m *MockGit) LastCommitMessage() (string, error)

LastCommitMessage mocks base method.

func (*MockGit) Tag added in v1.1.15

func (m *MockGit) Tag(tag string) error

Tag mocks base method.

func (*MockGit) Tagged added in v1.1.15

func (m *MockGit) Tagged() (bool, error)

Tagged mocks base method.

func (*MockGit) Tags added in v1.1.15

func (m *MockGit) Tags(merged bool) ([]string, error)

Tags mocks base method.

type MockGitMockRecorder added in v1.1.15

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

MockGitMockRecorder is the mock recorder for MockGit.

func (*MockGitMockRecorder) LastCommit added in v1.1.15

func (mr *MockGitMockRecorder) LastCommit(short interface{}) *gomock.Call

LastCommit indicates an expected call of LastCommit.

func (*MockGitMockRecorder) LastCommitMessage added in v1.1.15

func (mr *MockGitMockRecorder) LastCommitMessage() *gomock.Call

LastCommitMessage indicates an expected call of LastCommitMessage.

func (*MockGitMockRecorder) Tag added in v1.1.15

func (mr *MockGitMockRecorder) Tag(tag interface{}) *gomock.Call

Tag indicates an expected call of Tag.

func (*MockGitMockRecorder) Tagged added in v1.1.15

func (mr *MockGitMockRecorder) Tagged() *gomock.Call

Tagged indicates an expected call of Tagged.

func (*MockGitMockRecorder) Tags added in v1.1.15

func (mr *MockGitMockRecorder) Tags(merged interface{}) *gomock.Call

Tags indicates an expected call of Tags.

Jump to

Keyboard shortcuts

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