commands

package
v0.0.0-...-f7e4e28 Latest Latest
Warning

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

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

Documentation

Overview

Package commands is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd interface {
	// AppendArgs appends a couple of args to the Cmd.
	AppendArgs(args ...string)
	// String prints the command.
	String() string
	// Run launches the command and return the stdout, stderr.
	Run(ctx context.Context) (string, string, error)
	// Execute launches the command and return error, and print stdout and stderr to console.
	Execute(ctx context.Context) error
}

Cmd is the command constructor and runner.

func New

func New(name string, dryrun bool) Cmd

New creates a Cmd object.

type MockCmd

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

MockCmd is a mock of Cmd interface.

func NewMockCmd

func NewMockCmd(ctrl *gomock.Controller) *MockCmd

NewMockCmd creates a new mock instance.

func (*MockCmd) AppendArgs

func (m *MockCmd) AppendArgs(args ...string)

AppendArgs mocks base method.

func (*MockCmd) EXPECT

func (m *MockCmd) EXPECT() *MockCmdMockRecorder

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

func (*MockCmd) Execute

func (m *MockCmd) Execute(ctx context.Context) error

Execute mocks base method.

func (*MockCmd) Run

func (m *MockCmd) Run(ctx context.Context) (string, string, error)

Run mocks base method.

func (*MockCmd) String

func (m *MockCmd) String() string

String mocks base method.

type MockCmdMockRecorder

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

MockCmdMockRecorder is the mock recorder for MockCmd.

func (*MockCmdMockRecorder) AppendArgs

func (mr *MockCmdMockRecorder) AppendArgs(args ...interface{}) *gomock.Call

AppendArgs indicates an expected call of AppendArgs.

func (*MockCmdMockRecorder) Execute

func (mr *MockCmdMockRecorder) Execute(ctx interface{}) *gomock.Call

Execute indicates an expected call of Execute.

func (*MockCmdMockRecorder) Run

func (mr *MockCmdMockRecorder) Run(ctx interface{}) *gomock.Call

Run indicates an expected call of Run.

func (*MockCmdMockRecorder) String

func (mr *MockCmdMockRecorder) String() *gomock.Call

String indicates an expected call of String.

Jump to

Keyboard shortcuts

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