cli

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Note: Don't use iota here, we don't want these to change dynamically over time
	// as external tools may depend on these values.
	SuccessCode             = 0
	InvalidFormatCode       = 1
	CouldNotReadInputCode   = 2
	CouldNotWriteOutputCode = 3
	InternalErrorCode       = 4
	FlagParseErrorCode      = 5
)

Exit codes:

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Run(args []string, stdin io.Reader, stdout io.Writer) int
}

Engine facilitates control of the system via a CLI.

type EngineImpl

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

func NewEngineImpl

func NewEngineImpl(rowIOGateway adapter.RowIOGateway) *EngineImpl

func (*EngineImpl) Run

func (ei *EngineImpl) Run(args []string, stdin io.Reader, stdout io.Writer) int

type MockEngine

type MockEngine struct {
	mock.Mock
}

MockEngine is an autogenerated mock type for the Engine type

func NewMockEngine

func NewMockEngine(t mockConstructorTestingTNewMockEngine) *MockEngine

NewMockEngine creates a new instance of MockEngine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockEngine) Run

func (_m *MockEngine) Run(args []string, stdin io.Reader, stdout io.Writer) int

Run provides a mock function with given fields: args, stdin, stdout

Jump to

Keyboard shortcuts

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