ext

package
v0.31.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultAmbassador = &ambassador{}
)

Functions

This section is empty.

Types

type Ambassador

type Ambassador interface {
	Environ() []string
	LookPath(string) (string, error)
	TempFile(string, string) (*os.File, error)
	RunCmd(cmd *exec.Cmd) ([]byte, error)
	RemoteImage(name.Reference, ...remote.Option) (v1.Image, error)
}

Ambassador the ambassador to the outside "world". Wraps methods that modify global state and hence make the code that use them very hard to test.

type MockAmbassador

type MockAmbassador struct {
	mock.Mock
}

func NewMockAmbassador

func NewMockAmbassador() *MockAmbassador

func (*MockAmbassador) Environ

func (m *MockAmbassador) Environ() []string

func (*MockAmbassador) LookPath

func (m *MockAmbassador) LookPath(file string) (string, error)

func (*MockAmbassador) RemoteImage added in v0.31.0

func (m *MockAmbassador) RemoteImage(ref name.Reference, options ...remote.Option) (v1.Image, error)

func (*MockAmbassador) RunCmd

func (m *MockAmbassador) RunCmd(cmd *exec.Cmd) ([]byte, error)

func (*MockAmbassador) TempFile

func (m *MockAmbassador) TempFile(dir, pattern string) (*os.File, error)

Jump to

Keyboard shortcuts

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