dockermocks

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	DoFunc func(req *http.Request) (*http.Response, error)
}

MockClient is a stub implementation of an http.Client with a custom Do method

func (*MockClient) Do

func (m *MockClient) Do(req *http.Request) (*http.Response, error)

Do is the mock client's `Do` func that you can customize

type MockRegistry

type MockRegistry struct {
	ReturnedDigest string
	ReturnedError  error
	InputImageName string
}

MockRegistry is a stub implementation of the `Registry` interface to be used in our unit test suites.

func (*MockRegistry) Digest

func (m *MockRegistry) Digest(image dockerimage.Image) (string, error)

Jump to

Keyboard shortcuts

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