Documentation
¶
Index ¶
- Constants
- Variables
- func GetContainerHandler(containerID string, containerInfo *dockerContainer.InspectResponse) http.HandlerFunc
- func GetContainerHandlers(containerRefs ...*ContainerRef) []http.HandlerFunc
- func GetImageHandler(imageInfo *dockerImage.InspectResponse) http.HandlerFunc
- func KillContainerHandler(containerID string, found FoundStatus) http.HandlerFunc
- func ListContainersHandler(statuses ...string) http.HandlerFunc
- func RemoveContainerHandler(containerID string, found FoundStatus) http.HandlerFunc
- func RemoveImageHandler(imagesWithParents map[string][]string) http.HandlerFunc
- func RespondWithJSONFile(relPath string, statusCode int, optionalHeader ...http.Header) http.HandlerFunc
- type ContainerRef
- type FilterableContainer
- type FoundStatus
- type MockClient
- func (_m *MockClient) EXPECT() *MockClient_Expecter
- func (_mock *MockClient) ExecuteCommand(ctx context.Context, container types.Container, command string, timeout int, ...) (bool, error)
- func (_mock *MockClient) GetContainer(ctx context.Context, containerID types.ContainerID) (types.Container, error)
- func (_mock *MockClient) GetCurrentWatchtowerContainer(ctx context.Context, containerID types.ContainerID) (types.Container, error)
- func (_mock *MockClient) GetInfo(ctx context.Context) (map[string]any, error)
- func (_mock *MockClient) GetVersion() string
- func (_mock *MockClient) IsContainerStale(ctx context.Context, container types.Container, params types.UpdateParams) (bool, types.ImageID, error)
- func (_mock *MockClient) ListContainers(ctx context.Context, filter ...types.Filter) ([]types.Container, error)
- func (_mock *MockClient) RemoveContainer(ctx context.Context, container types.Container) error
- func (_mock *MockClient) RemoveImageByID(ctx context.Context, imageID types.ImageID, imageName string) error
- func (_mock *MockClient) RenameContainer(ctx context.Context, container types.Container, newName string) error
- func (_mock *MockClient) StartContainer(ctx context.Context, container types.Container) (types.ContainerID, error)
- func (_mock *MockClient) StopAndRemoveContainer(ctx context.Context, container types.Container, timeout time.Duration) error
- func (_mock *MockClient) StopContainer(ctx context.Context, container types.Container, timeout time.Duration) error
- func (_mock *MockClient) UpdateContainer(ctx context.Context, container1 types.Container, config container.UpdateConfig) error
- func (_mock *MockClient) WaitForContainerHealthy(ctx context.Context, containerID types.ContainerID, timeout time.Duration) error
- func (_mock *MockClient) WarnOnHeadPullFailed(container1 types.Container) bool
- type MockClient_ExecuteCommand_Call
- type MockClient_Expecter
- func (_e *MockClient_Expecter) ExecuteCommand(ctx interface{}, container interface{}, command interface{}, ...) *MockClient_ExecuteCommand_Call
- func (_e *MockClient_Expecter) GetContainer(ctx interface{}, containerID interface{}) *MockClient_GetContainer_Call
- func (_e *MockClient_Expecter) GetCurrentWatchtowerContainer(ctx interface{}, containerID interface{}) *MockClient_GetCurrentWatchtowerContainer_Call
- func (_e *MockClient_Expecter) GetInfo(ctx interface{}) *MockClient_GetInfo_Call
- func (_e *MockClient_Expecter) GetVersion() *MockClient_GetVersion_Call
- func (_e *MockClient_Expecter) IsContainerStale(ctx interface{}, container interface{}, params interface{}) *MockClient_IsContainerStale_Call
- func (_e *MockClient_Expecter) ListContainers(ctx interface{}, filter ...interface{}) *MockClient_ListContainers_Call
- func (_e *MockClient_Expecter) RemoveContainer(ctx interface{}, container interface{}) *MockClient_RemoveContainer_Call
- func (_e *MockClient_Expecter) RemoveImageByID(ctx interface{}, imageID interface{}, imageName interface{}) *MockClient_RemoveImageByID_Call
- func (_e *MockClient_Expecter) RenameContainer(ctx interface{}, container interface{}, newName interface{}) *MockClient_RenameContainer_Call
- func (_e *MockClient_Expecter) StartContainer(ctx interface{}, container interface{}) *MockClient_StartContainer_Call
- func (_e *MockClient_Expecter) StopAndRemoveContainer(ctx interface{}, container interface{}, timeout interface{}) *MockClient_StopAndRemoveContainer_Call
- func (_e *MockClient_Expecter) StopContainer(ctx interface{}, container interface{}, timeout interface{}) *MockClient_StopContainer_Call
- func (_e *MockClient_Expecter) UpdateContainer(ctx interface{}, container1 interface{}, config interface{}) *MockClient_UpdateContainer_Call
- func (_e *MockClient_Expecter) WaitForContainerHealthy(ctx interface{}, containerID interface{}, timeout interface{}) *MockClient_WaitForContainerHealthy_Call
- func (_e *MockClient_Expecter) WarnOnHeadPullFailed(container1 interface{}) *MockClient_WarnOnHeadPullFailed_Call
- type MockClient_GetContainer_Call
- func (_c *MockClient_GetContainer_Call) Return(container types.Container, err error) *MockClient_GetContainer_Call
- func (_c *MockClient_GetContainer_Call) Run(run func(ctx context.Context, containerID types.ContainerID)) *MockClient_GetContainer_Call
- func (_c *MockClient_GetContainer_Call) RunAndReturn(...) *MockClient_GetContainer_Call
- type MockClient_GetCurrentWatchtowerContainer_Call
- func (_c *MockClient_GetCurrentWatchtowerContainer_Call) Return(container types.Container, err error) *MockClient_GetCurrentWatchtowerContainer_Call
- func (_c *MockClient_GetCurrentWatchtowerContainer_Call) Run(run func(ctx context.Context, containerID types.ContainerID)) *MockClient_GetCurrentWatchtowerContainer_Call
- func (_c *MockClient_GetCurrentWatchtowerContainer_Call) RunAndReturn(...) *MockClient_GetCurrentWatchtowerContainer_Call
- type MockClient_GetInfo_Call
- func (_c *MockClient_GetInfo_Call) Return(stringToV map[string]any, err error) *MockClient_GetInfo_Call
- func (_c *MockClient_GetInfo_Call) Run(run func(ctx context.Context)) *MockClient_GetInfo_Call
- func (_c *MockClient_GetInfo_Call) RunAndReturn(run func(ctx context.Context) (map[string]any, error)) *MockClient_GetInfo_Call
- type MockClient_GetVersion_Call
- type MockClient_IsContainerStale_Call
- func (_c *MockClient_IsContainerStale_Call) Return(b bool, imageID types.ImageID, err error) *MockClient_IsContainerStale_Call
- func (_c *MockClient_IsContainerStale_Call) Run(...) *MockClient_IsContainerStale_Call
- func (_c *MockClient_IsContainerStale_Call) RunAndReturn(...) *MockClient_IsContainerStale_Call
- type MockClient_ListContainers_Call
- func (_c *MockClient_ListContainers_Call) Return(containers []types.Container, err error) *MockClient_ListContainers_Call
- func (_c *MockClient_ListContainers_Call) Run(run func(ctx context.Context, filter ...types.Filter)) *MockClient_ListContainers_Call
- func (_c *MockClient_ListContainers_Call) RunAndReturn(...) *MockClient_ListContainers_Call
- type MockClient_RemoveContainer_Call
- func (_c *MockClient_RemoveContainer_Call) Return(err error) *MockClient_RemoveContainer_Call
- func (_c *MockClient_RemoveContainer_Call) Run(run func(ctx context.Context, container types.Container)) *MockClient_RemoveContainer_Call
- func (_c *MockClient_RemoveContainer_Call) RunAndReturn(run func(ctx context.Context, container types.Container) error) *MockClient_RemoveContainer_Call
- type MockClient_RemoveImageByID_Call
- func (_c *MockClient_RemoveImageByID_Call) Return(err error) *MockClient_RemoveImageByID_Call
- func (_c *MockClient_RemoveImageByID_Call) Run(run func(ctx context.Context, imageID types.ImageID, imageName string)) *MockClient_RemoveImageByID_Call
- func (_c *MockClient_RemoveImageByID_Call) RunAndReturn(run func(ctx context.Context, imageID types.ImageID, imageName string) error) *MockClient_RemoveImageByID_Call
- type MockClient_RenameContainer_Call
- func (_c *MockClient_RenameContainer_Call) Return(err error) *MockClient_RenameContainer_Call
- func (_c *MockClient_RenameContainer_Call) Run(run func(ctx context.Context, container types.Container, newName string)) *MockClient_RenameContainer_Call
- func (_c *MockClient_RenameContainer_Call) RunAndReturn(run func(ctx context.Context, container types.Container, newName string) error) *MockClient_RenameContainer_Call
- type MockClient_StartContainer_Call
- func (_c *MockClient_StartContainer_Call) Return(containerID types.ContainerID, err error) *MockClient_StartContainer_Call
- func (_c *MockClient_StartContainer_Call) Run(run func(ctx context.Context, container types.Container)) *MockClient_StartContainer_Call
- func (_c *MockClient_StartContainer_Call) RunAndReturn(...) *MockClient_StartContainer_Call
- type MockClient_StopAndRemoveContainer_Call
- func (_c *MockClient_StopAndRemoveContainer_Call) Return(err error) *MockClient_StopAndRemoveContainer_Call
- func (_c *MockClient_StopAndRemoveContainer_Call) Run(...) *MockClient_StopAndRemoveContainer_Call
- func (_c *MockClient_StopAndRemoveContainer_Call) RunAndReturn(...) *MockClient_StopAndRemoveContainer_Call
- type MockClient_StopContainer_Call
- type MockClient_UpdateContainer_Call
- type MockClient_WaitForContainerHealthy_Call
- func (_c *MockClient_WaitForContainerHealthy_Call) Return(err error) *MockClient_WaitForContainerHealthy_Call
- func (_c *MockClient_WaitForContainerHealthy_Call) Run(...) *MockClient_WaitForContainerHealthy_Call
- func (_c *MockClient_WaitForContainerHealthy_Call) RunAndReturn(...) *MockClient_WaitForContainerHealthy_Call
- type MockClient_WarnOnHeadPullFailed_Call
- func (_c *MockClient_WarnOnHeadPullFailed_Call) Return(b bool) *MockClient_WarnOnHeadPullFailed_Call
- func (_c *MockClient_WarnOnHeadPullFailed_Call) Run(run func(container1 types.Container)) *MockClient_WarnOnHeadPullFailed_Call
- func (_c *MockClient_WarnOnHeadPullFailed_Call) RunAndReturn(run func(container1 types.Container) bool) *MockClient_WarnOnHeadPullFailed_Call
- type MockOperations
- func (_mock *MockOperations) ContainerCreate(ctx context.Context, config *container.Config, ...) (container.CreateResponse, error)
- func (_mock *MockOperations) ContainerRemove(ctx context.Context, containerID string, options container.RemoveOptions) error
- func (_mock *MockOperations) ContainerRename(ctx context.Context, containerID string, newContainerName string) error
- func (_mock *MockOperations) ContainerStart(ctx context.Context, containerID string, options container.StartOptions) error
- func (_m *MockOperations) EXPECT() *MockOperations_Expecter
- func (_mock *MockOperations) NetworkConnect(ctx context.Context, networkID string, containerID string, ...) error
- type MockOperations_ContainerCreate_Call
- func (_c *MockOperations_ContainerCreate_Call) Return(createResponse container.CreateResponse, err error) *MockOperations_ContainerCreate_Call
- func (_c *MockOperations_ContainerCreate_Call) Run(run func(ctx context.Context, config *container.Config, ...)) *MockOperations_ContainerCreate_Call
- func (_c *MockOperations_ContainerCreate_Call) RunAndReturn(...) *MockOperations_ContainerCreate_Call
- type MockOperations_ContainerRemove_Call
- type MockOperations_ContainerRename_Call
- func (_c *MockOperations_ContainerRename_Call) Return(err error) *MockOperations_ContainerRename_Call
- func (_c *MockOperations_ContainerRename_Call) Run(run func(ctx context.Context, containerID string, newContainerName string)) *MockOperations_ContainerRename_Call
- func (_c *MockOperations_ContainerRename_Call) RunAndReturn(...) *MockOperations_ContainerRename_Call
- type MockOperations_ContainerStart_Call
- type MockOperations_Expecter
- func (_e *MockOperations_Expecter) ContainerCreate(ctx interface{}, config interface{}, hostConfig interface{}, ...) *MockOperations_ContainerCreate_Call
- func (_e *MockOperations_Expecter) ContainerRemove(ctx interface{}, containerID interface{}, options interface{}) *MockOperations_ContainerRemove_Call
- func (_e *MockOperations_Expecter) ContainerRename(ctx interface{}, containerID interface{}, newContainerName interface{}) *MockOperations_ContainerRename_Call
- func (_e *MockOperations_Expecter) ContainerStart(ctx interface{}, containerID interface{}, options interface{}) *MockOperations_ContainerStart_Call
- func (_e *MockOperations_Expecter) NetworkConnect(ctx interface{}, networkID interface{}, containerID interface{}, ...) *MockOperations_NetworkConnect_Call
- type MockOperations_NetworkConnect_Call
- func (_c *MockOperations_NetworkConnect_Call) Return(err error) *MockOperations_NetworkConnect_Call
- func (_c *MockOperations_NetworkConnect_Call) Run(run func(ctx context.Context, networkID string, containerID string, ...)) *MockOperations_NetworkConnect_Call
- func (_c *MockOperations_NetworkConnect_Call) RunAndReturn(run func(ctx context.Context, networkID string, containerID string, ...) error) *MockOperations_NetworkConnect_Call
Constants ¶
const ( NetSupplierNotFoundID = "badc1dbadc1dbadc1dbadc1dbadc1dbadc1dbadc1dbadc1dbadc1dbadc1dbadc" NetSupplierContainerName = "/wt-contnet-producer-1" )
Variables ¶
var NetConsumerInvalidSupplier = ContainerRef{ // contains filtered or unexported fields }
Mock container fixture referencing a non-existent network supplier.
var NetConsumerOK = ContainerRef{ // contains filtered or unexported fields }
Mock container fixture consuming an existing network supplier.
var Restarting = ContainerRef{ // contains filtered or unexported fields }
Mock container fixture in a restarting state.
var Running = ContainerRef{ // contains filtered or unexported fields }
Mock container fixture in a running state with a Portainer image.
var Stopped = ContainerRef{ // contains filtered or unexported fields }
Mock container fixture in a stopped state.
var Watchtower = ContainerRef{ // contains filtered or unexported fields }
Mock container fixture representing a Watchtower instance.
Functions ¶
func GetContainerHandler ¶
func GetContainerHandler( containerID string, containerInfo *dockerContainer.InspectResponse, ) http.HandlerFunc
Returns a 404 if containerInfo is nil; otherwise, serves the provided info.
func GetContainerHandlers ¶
func GetContainerHandlers(containerRefs ...*ContainerRef) []http.HandlerFunc
Includes handlers for the given containers, their references, and associated images.
func GetImageHandler ¶
func GetImageHandler(imageInfo *dockerImage.InspectResponse) http.HandlerFunc
Serves the provided image info as a JSON response.
func KillContainerHandler ¶
func KillContainerHandler(containerID string, found FoundStatus) http.HandlerFunc
Returns 204 if found, 404 if not.
func ListContainersHandler ¶
func ListContainersHandler(statuses ...string) http.HandlerFunc
Filters containers by the given statuses and serves the filtered list.
func RemoveContainerHandler ¶
func RemoveContainerHandler(containerID string, found FoundStatus) http.HandlerFunc
Returns 204 if found, 404 if not.
func RemoveImageHandler ¶
func RemoveImageHandler(imagesWithParents map[string][]string) http.HandlerFunc
Simulates image removal with optional parent images; returns 404 if not found.
func RespondWithJSONFile ¶
func RespondWithJSONFile( relPath string, statusCode int, optionalHeader ...http.Header, ) http.HandlerFunc
RespondWithJSONFile expects the file to exist at the given relative path; fails the test otherwise.
Types ¶
type ContainerRef ¶
type ContainerRef struct {
// contains filtered or unexported fields
}
ContainerRef represents a mock container with associated metadata. Includes name, ID, image reference, file path, linked containers, and existence status.
func (*ContainerRef) ContainerID ¶
func (cr *ContainerRef) ContainerID() types.ContainerID
ContainerID returns the mock container’s ID.
type FilterableContainer ¶
FilterableContainer is a mock type for the FilterableContainer type.
func (*FilterableContainer) Enabled ¶
func (_m *FilterableContainer) Enabled() (bool, bool)
Enabled provides a mock function with given fields:.
func (*FilterableContainer) ImageName ¶
func (_m *FilterableContainer) ImageName() string
ImageName provides a mock function with given fields:.
func (*FilterableContainer) IsWatchtower ¶
func (_m *FilterableContainer) IsWatchtower() bool
IsWatchtower provides a mock function with given fields:.
func (*FilterableContainer) Name ¶
func (_m *FilterableContainer) Name() string
Name provides a mock function with given fields:.
func (*FilterableContainer) Scope ¶
func (_m *FilterableContainer) Scope() (string, bool)
Scope provides a mock function with given fields:.
type FoundStatus ¶
type FoundStatus bool
const ( Found FoundStatus = true Missing FoundStatus = false )
type MockClient ¶
MockClient is an autogenerated mock type for the Client type
func NewMockClient ¶
func NewMockClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockClient
NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockClient) EXPECT ¶
func (_m *MockClient) EXPECT() *MockClient_Expecter
func (*MockClient) ExecuteCommand ¶
func (_mock *MockClient) ExecuteCommand(ctx context.Context, container types.Container, command string, timeout int, uid int, gid int) (bool, error)
ExecuteCommand provides a mock function for the type MockClient
func (*MockClient) GetContainer ¶
func (_mock *MockClient) GetContainer(ctx context.Context, containerID types.ContainerID) (types.Container, error)
GetContainer provides a mock function for the type MockClient
func (*MockClient) GetCurrentWatchtowerContainer ¶
func (_mock *MockClient) GetCurrentWatchtowerContainer(ctx context.Context, containerID types.ContainerID) (types.Container, error)
GetCurrentWatchtowerContainer provides a mock function for the type MockClient
func (*MockClient) GetVersion ¶
func (_mock *MockClient) GetVersion() string
GetVersion provides a mock function for the type MockClient
func (*MockClient) IsContainerStale ¶
func (_mock *MockClient) IsContainerStale(ctx context.Context, container types.Container, params types.UpdateParams) (bool, types.ImageID, error)
IsContainerStale provides a mock function for the type MockClient
func (*MockClient) ListContainers ¶
func (_mock *MockClient) ListContainers(ctx context.Context, filter ...types.Filter) ([]types.Container, error)
ListContainers provides a mock function for the type MockClient
func (*MockClient) RemoveContainer ¶
RemoveContainer provides a mock function for the type MockClient
func (*MockClient) RemoveImageByID ¶
func (_mock *MockClient) RemoveImageByID(ctx context.Context, imageID types.ImageID, imageName string) error
RemoveImageByID provides a mock function for the type MockClient
func (*MockClient) RenameContainer ¶
func (_mock *MockClient) RenameContainer(ctx context.Context, container types.Container, newName string) error
RenameContainer provides a mock function for the type MockClient
func (*MockClient) StartContainer ¶
func (_mock *MockClient) StartContainer(ctx context.Context, container types.Container) (types.ContainerID, error)
StartContainer provides a mock function for the type MockClient
func (*MockClient) StopAndRemoveContainer ¶
func (_mock *MockClient) StopAndRemoveContainer(ctx context.Context, container types.Container, timeout time.Duration) error
StopAndRemoveContainer provides a mock function for the type MockClient
func (*MockClient) StopContainer ¶
func (_mock *MockClient) StopContainer(ctx context.Context, container types.Container, timeout time.Duration) error
StopContainer provides a mock function for the type MockClient
func (*MockClient) UpdateContainer ¶
func (_mock *MockClient) UpdateContainer(ctx context.Context, container1 types.Container, config container.UpdateConfig) error
UpdateContainer provides a mock function for the type MockClient
func (*MockClient) WaitForContainerHealthy ¶
func (_mock *MockClient) WaitForContainerHealthy(ctx context.Context, containerID types.ContainerID, timeout time.Duration) error
WaitForContainerHealthy provides a mock function for the type MockClient
func (*MockClient) WarnOnHeadPullFailed ¶
func (_mock *MockClient) WarnOnHeadPullFailed(container1 types.Container) bool
WarnOnHeadPullFailed provides a mock function for the type MockClient
type MockClient_ExecuteCommand_Call ¶
MockClient_ExecuteCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteCommand'
func (*MockClient_ExecuteCommand_Call) Return ¶
func (_c *MockClient_ExecuteCommand_Call) Return(b bool, err error) *MockClient_ExecuteCommand_Call
func (*MockClient_ExecuteCommand_Call) Run ¶
func (_c *MockClient_ExecuteCommand_Call) Run(run func(ctx context.Context, container types.Container, command string, timeout int, uid int, gid int)) *MockClient_ExecuteCommand_Call
func (*MockClient_ExecuteCommand_Call) RunAndReturn ¶
type MockClient_Expecter ¶
type MockClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockClient_Expecter) ExecuteCommand ¶
func (_e *MockClient_Expecter) ExecuteCommand(ctx interface{}, container interface{}, command interface{}, timeout interface{}, uid interface{}, gid interface{}) *MockClient_ExecuteCommand_Call
ExecuteCommand is a helper method to define mock.On call
- ctx context.Context
- container types.Container
- command string
- timeout int
- uid int
- gid int
func (*MockClient_Expecter) GetContainer ¶
func (_e *MockClient_Expecter) GetContainer(ctx interface{}, containerID interface{}) *MockClient_GetContainer_Call
GetContainer is a helper method to define mock.On call
- ctx context.Context
- containerID types.ContainerID
func (*MockClient_Expecter) GetCurrentWatchtowerContainer ¶
func (_e *MockClient_Expecter) GetCurrentWatchtowerContainer(ctx interface{}, containerID interface{}) *MockClient_GetCurrentWatchtowerContainer_Call
GetCurrentWatchtowerContainer is a helper method to define mock.On call
- ctx context.Context
- containerID types.ContainerID
func (*MockClient_Expecter) GetInfo ¶
func (_e *MockClient_Expecter) GetInfo(ctx interface{}) *MockClient_GetInfo_Call
GetInfo is a helper method to define mock.On call
- ctx context.Context
func (*MockClient_Expecter) GetVersion ¶
func (_e *MockClient_Expecter) GetVersion() *MockClient_GetVersion_Call
GetVersion is a helper method to define mock.On call
func (*MockClient_Expecter) IsContainerStale ¶
func (_e *MockClient_Expecter) IsContainerStale(ctx interface{}, container interface{}, params interface{}) *MockClient_IsContainerStale_Call
IsContainerStale is a helper method to define mock.On call
- ctx context.Context
- container types.Container
- params types.UpdateParams
func (*MockClient_Expecter) ListContainers ¶
func (_e *MockClient_Expecter) ListContainers(ctx interface{}, filter ...interface{}) *MockClient_ListContainers_Call
ListContainers is a helper method to define mock.On call
- ctx context.Context
- filter ...types.Filter
func (*MockClient_Expecter) RemoveContainer ¶
func (_e *MockClient_Expecter) RemoveContainer(ctx interface{}, container interface{}) *MockClient_RemoveContainer_Call
RemoveContainer is a helper method to define mock.On call
- ctx context.Context
- container types.Container
func (*MockClient_Expecter) RemoveImageByID ¶
func (_e *MockClient_Expecter) RemoveImageByID(ctx interface{}, imageID interface{}, imageName interface{}) *MockClient_RemoveImageByID_Call
RemoveImageByID is a helper method to define mock.On call
- ctx context.Context
- imageID types.ImageID
- imageName string
func (*MockClient_Expecter) RenameContainer ¶
func (_e *MockClient_Expecter) RenameContainer(ctx interface{}, container interface{}, newName interface{}) *MockClient_RenameContainer_Call
RenameContainer is a helper method to define mock.On call
- ctx context.Context
- container types.Container
- newName string
func (*MockClient_Expecter) StartContainer ¶
func (_e *MockClient_Expecter) StartContainer(ctx interface{}, container interface{}) *MockClient_StartContainer_Call
StartContainer is a helper method to define mock.On call
- ctx context.Context
- container types.Container
func (*MockClient_Expecter) StopAndRemoveContainer ¶
func (_e *MockClient_Expecter) StopAndRemoveContainer(ctx interface{}, container interface{}, timeout interface{}) *MockClient_StopAndRemoveContainer_Call
StopAndRemoveContainer is a helper method to define mock.On call
- ctx context.Context
- container types.Container
- timeout time.Duration
func (*MockClient_Expecter) StopContainer ¶
func (_e *MockClient_Expecter) StopContainer(ctx interface{}, container interface{}, timeout interface{}) *MockClient_StopContainer_Call
StopContainer is a helper method to define mock.On call
- ctx context.Context
- container types.Container
- timeout time.Duration
func (*MockClient_Expecter) UpdateContainer ¶
func (_e *MockClient_Expecter) UpdateContainer(ctx interface{}, container1 interface{}, config interface{}) *MockClient_UpdateContainer_Call
UpdateContainer is a helper method to define mock.On call
- ctx context.Context
- container1 types.Container
- config container.UpdateConfig
func (*MockClient_Expecter) WaitForContainerHealthy ¶
func (_e *MockClient_Expecter) WaitForContainerHealthy(ctx interface{}, containerID interface{}, timeout interface{}) *MockClient_WaitForContainerHealthy_Call
WaitForContainerHealthy is a helper method to define mock.On call
- ctx context.Context
- containerID types.ContainerID
- timeout time.Duration
func (*MockClient_Expecter) WarnOnHeadPullFailed ¶
func (_e *MockClient_Expecter) WarnOnHeadPullFailed(container1 interface{}) *MockClient_WarnOnHeadPullFailed_Call
WarnOnHeadPullFailed is a helper method to define mock.On call
- container1 types.Container
type MockClient_GetContainer_Call ¶
MockClient_GetContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetContainer'
func (*MockClient_GetContainer_Call) Return ¶
func (_c *MockClient_GetContainer_Call) Return(container types.Container, err error) *MockClient_GetContainer_Call
func (*MockClient_GetContainer_Call) Run ¶
func (_c *MockClient_GetContainer_Call) Run(run func(ctx context.Context, containerID types.ContainerID)) *MockClient_GetContainer_Call
func (*MockClient_GetContainer_Call) RunAndReturn ¶
func (_c *MockClient_GetContainer_Call) RunAndReturn(run func(ctx context.Context, containerID types.ContainerID) (types.Container, error)) *MockClient_GetContainer_Call
type MockClient_GetCurrentWatchtowerContainer_Call ¶
MockClient_GetCurrentWatchtowerContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentWatchtowerContainer'
func (*MockClient_GetCurrentWatchtowerContainer_Call) Return ¶
func (_c *MockClient_GetCurrentWatchtowerContainer_Call) Return(container types.Container, err error) *MockClient_GetCurrentWatchtowerContainer_Call
func (*MockClient_GetCurrentWatchtowerContainer_Call) Run ¶
func (_c *MockClient_GetCurrentWatchtowerContainer_Call) Run(run func(ctx context.Context, containerID types.ContainerID)) *MockClient_GetCurrentWatchtowerContainer_Call
func (*MockClient_GetCurrentWatchtowerContainer_Call) RunAndReturn ¶
func (_c *MockClient_GetCurrentWatchtowerContainer_Call) RunAndReturn(run func(ctx context.Context, containerID types.ContainerID) (types.Container, error)) *MockClient_GetCurrentWatchtowerContainer_Call
type MockClient_GetInfo_Call ¶
MockClient_GetInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInfo'
func (*MockClient_GetInfo_Call) Return ¶
func (_c *MockClient_GetInfo_Call) Return(stringToV map[string]any, err error) *MockClient_GetInfo_Call
func (*MockClient_GetInfo_Call) Run ¶
func (_c *MockClient_GetInfo_Call) Run(run func(ctx context.Context)) *MockClient_GetInfo_Call
func (*MockClient_GetInfo_Call) RunAndReturn ¶
func (_c *MockClient_GetInfo_Call) RunAndReturn(run func(ctx context.Context) (map[string]any, error)) *MockClient_GetInfo_Call
type MockClient_GetVersion_Call ¶
MockClient_GetVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVersion'
func (*MockClient_GetVersion_Call) Return ¶
func (_c *MockClient_GetVersion_Call) Return(s string) *MockClient_GetVersion_Call
func (*MockClient_GetVersion_Call) Run ¶
func (_c *MockClient_GetVersion_Call) Run(run func()) *MockClient_GetVersion_Call
func (*MockClient_GetVersion_Call) RunAndReturn ¶
func (_c *MockClient_GetVersion_Call) RunAndReturn(run func() string) *MockClient_GetVersion_Call
type MockClient_IsContainerStale_Call ¶
MockClient_IsContainerStale_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsContainerStale'
func (*MockClient_IsContainerStale_Call) Return ¶
func (_c *MockClient_IsContainerStale_Call) Return(b bool, imageID types.ImageID, err error) *MockClient_IsContainerStale_Call
func (*MockClient_IsContainerStale_Call) Run ¶
func (_c *MockClient_IsContainerStale_Call) Run(run func(ctx context.Context, container types.Container, params types.UpdateParams)) *MockClient_IsContainerStale_Call
func (*MockClient_IsContainerStale_Call) RunAndReturn ¶
func (_c *MockClient_IsContainerStale_Call) RunAndReturn(run func(ctx context.Context, container types.Container, params types.UpdateParams) (bool, types.ImageID, error)) *MockClient_IsContainerStale_Call
type MockClient_ListContainers_Call ¶
MockClient_ListContainers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListContainers'
func (*MockClient_ListContainers_Call) Return ¶
func (_c *MockClient_ListContainers_Call) Return(containers []types.Container, err error) *MockClient_ListContainers_Call
func (*MockClient_ListContainers_Call) Run ¶
func (_c *MockClient_ListContainers_Call) Run(run func(ctx context.Context, filter ...types.Filter)) *MockClient_ListContainers_Call
func (*MockClient_ListContainers_Call) RunAndReturn ¶
func (_c *MockClient_ListContainers_Call) RunAndReturn(run func(ctx context.Context, filter ...types.Filter) ([]types.Container, error)) *MockClient_ListContainers_Call
type MockClient_RemoveContainer_Call ¶
MockClient_RemoveContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveContainer'
func (*MockClient_RemoveContainer_Call) Return ¶
func (_c *MockClient_RemoveContainer_Call) Return(err error) *MockClient_RemoveContainer_Call
func (*MockClient_RemoveContainer_Call) Run ¶
func (_c *MockClient_RemoveContainer_Call) Run(run func(ctx context.Context, container types.Container)) *MockClient_RemoveContainer_Call
func (*MockClient_RemoveContainer_Call) RunAndReturn ¶
func (_c *MockClient_RemoveContainer_Call) RunAndReturn(run func(ctx context.Context, container types.Container) error) *MockClient_RemoveContainer_Call
type MockClient_RemoveImageByID_Call ¶
MockClient_RemoveImageByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveImageByID'
func (*MockClient_RemoveImageByID_Call) Return ¶
func (_c *MockClient_RemoveImageByID_Call) Return(err error) *MockClient_RemoveImageByID_Call
func (*MockClient_RemoveImageByID_Call) Run ¶
func (_c *MockClient_RemoveImageByID_Call) Run(run func(ctx context.Context, imageID types.ImageID, imageName string)) *MockClient_RemoveImageByID_Call
func (*MockClient_RemoveImageByID_Call) RunAndReturn ¶
func (_c *MockClient_RemoveImageByID_Call) RunAndReturn(run func(ctx context.Context, imageID types.ImageID, imageName string) error) *MockClient_RemoveImageByID_Call
type MockClient_RenameContainer_Call ¶
MockClient_RenameContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RenameContainer'
func (*MockClient_RenameContainer_Call) Return ¶
func (_c *MockClient_RenameContainer_Call) Return(err error) *MockClient_RenameContainer_Call
func (*MockClient_RenameContainer_Call) Run ¶
func (_c *MockClient_RenameContainer_Call) Run(run func(ctx context.Context, container types.Container, newName string)) *MockClient_RenameContainer_Call
func (*MockClient_RenameContainer_Call) RunAndReturn ¶
func (_c *MockClient_RenameContainer_Call) RunAndReturn(run func(ctx context.Context, container types.Container, newName string) error) *MockClient_RenameContainer_Call
type MockClient_StartContainer_Call ¶
MockClient_StartContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartContainer'
func (*MockClient_StartContainer_Call) Return ¶
func (_c *MockClient_StartContainer_Call) Return(containerID types.ContainerID, err error) *MockClient_StartContainer_Call
func (*MockClient_StartContainer_Call) Run ¶
func (_c *MockClient_StartContainer_Call) Run(run func(ctx context.Context, container types.Container)) *MockClient_StartContainer_Call
func (*MockClient_StartContainer_Call) RunAndReturn ¶
func (_c *MockClient_StartContainer_Call) RunAndReturn(run func(ctx context.Context, container types.Container) (types.ContainerID, error)) *MockClient_StartContainer_Call
type MockClient_StopAndRemoveContainer_Call ¶
MockClient_StopAndRemoveContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopAndRemoveContainer'
func (*MockClient_StopAndRemoveContainer_Call) Return ¶
func (_c *MockClient_StopAndRemoveContainer_Call) Return(err error) *MockClient_StopAndRemoveContainer_Call
func (*MockClient_StopAndRemoveContainer_Call) Run ¶
func (_c *MockClient_StopAndRemoveContainer_Call) Run(run func(ctx context.Context, container types.Container, timeout time.Duration)) *MockClient_StopAndRemoveContainer_Call
func (*MockClient_StopAndRemoveContainer_Call) RunAndReturn ¶
func (_c *MockClient_StopAndRemoveContainer_Call) RunAndReturn(run func(ctx context.Context, container types.Container, timeout time.Duration) error) *MockClient_StopAndRemoveContainer_Call
type MockClient_StopContainer_Call ¶
MockClient_StopContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopContainer'
func (*MockClient_StopContainer_Call) Return ¶
func (_c *MockClient_StopContainer_Call) Return(err error) *MockClient_StopContainer_Call
func (*MockClient_StopContainer_Call) Run ¶
func (_c *MockClient_StopContainer_Call) Run(run func(ctx context.Context, container types.Container, timeout time.Duration)) *MockClient_StopContainer_Call
func (*MockClient_StopContainer_Call) RunAndReturn ¶
func (_c *MockClient_StopContainer_Call) RunAndReturn(run func(ctx context.Context, container types.Container, timeout time.Duration) error) *MockClient_StopContainer_Call
type MockClient_UpdateContainer_Call ¶
MockClient_UpdateContainer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateContainer'
func (*MockClient_UpdateContainer_Call) Return ¶
func (_c *MockClient_UpdateContainer_Call) Return(err error) *MockClient_UpdateContainer_Call
func (*MockClient_UpdateContainer_Call) Run ¶
func (_c *MockClient_UpdateContainer_Call) Run(run func(ctx context.Context, container1 types.Container, config container.UpdateConfig)) *MockClient_UpdateContainer_Call
func (*MockClient_UpdateContainer_Call) RunAndReturn ¶
func (_c *MockClient_UpdateContainer_Call) RunAndReturn(run func(ctx context.Context, container1 types.Container, config container.UpdateConfig) error) *MockClient_UpdateContainer_Call
type MockClient_WaitForContainerHealthy_Call ¶
MockClient_WaitForContainerHealthy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForContainerHealthy'
func (*MockClient_WaitForContainerHealthy_Call) Return ¶
func (_c *MockClient_WaitForContainerHealthy_Call) Return(err error) *MockClient_WaitForContainerHealthy_Call
func (*MockClient_WaitForContainerHealthy_Call) Run ¶
func (_c *MockClient_WaitForContainerHealthy_Call) Run(run func(ctx context.Context, containerID types.ContainerID, timeout time.Duration)) *MockClient_WaitForContainerHealthy_Call
func (*MockClient_WaitForContainerHealthy_Call) RunAndReturn ¶
func (_c *MockClient_WaitForContainerHealthy_Call) RunAndReturn(run func(ctx context.Context, containerID types.ContainerID, timeout time.Duration) error) *MockClient_WaitForContainerHealthy_Call
type MockClient_WarnOnHeadPullFailed_Call ¶
MockClient_WarnOnHeadPullFailed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WarnOnHeadPullFailed'
func (*MockClient_WarnOnHeadPullFailed_Call) Return ¶
func (_c *MockClient_WarnOnHeadPullFailed_Call) Return(b bool) *MockClient_WarnOnHeadPullFailed_Call
func (*MockClient_WarnOnHeadPullFailed_Call) Run ¶
func (_c *MockClient_WarnOnHeadPullFailed_Call) Run(run func(container1 types.Container)) *MockClient_WarnOnHeadPullFailed_Call
func (*MockClient_WarnOnHeadPullFailed_Call) RunAndReturn ¶
func (_c *MockClient_WarnOnHeadPullFailed_Call) RunAndReturn(run func(container1 types.Container) bool) *MockClient_WarnOnHeadPullFailed_Call
type MockOperations ¶
MockOperations is an autogenerated mock type for the Operations type
func NewMockOperations ¶
func NewMockOperations(t interface {
mock.TestingT
Cleanup(func())
}) *MockOperations
NewMockOperations creates a new instance of MockOperations. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockOperations) ContainerCreate ¶
func (_mock *MockOperations) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.CreateResponse, error)
ContainerCreate provides a mock function for the type MockOperations
func (*MockOperations) ContainerRemove ¶
func (_mock *MockOperations) ContainerRemove(ctx context.Context, containerID string, options container.RemoveOptions) error
ContainerRemove provides a mock function for the type MockOperations
func (*MockOperations) ContainerRename ¶
func (_mock *MockOperations) ContainerRename(ctx context.Context, containerID string, newContainerName string) error
ContainerRename provides a mock function for the type MockOperations
func (*MockOperations) ContainerStart ¶
func (_mock *MockOperations) ContainerStart(ctx context.Context, containerID string, options container.StartOptions) error
ContainerStart provides a mock function for the type MockOperations
func (*MockOperations) EXPECT ¶
func (_m *MockOperations) EXPECT() *MockOperations_Expecter
func (*MockOperations) NetworkConnect ¶
func (_mock *MockOperations) NetworkConnect(ctx context.Context, networkID string, containerID string, config *network.EndpointSettings) error
NetworkConnect provides a mock function for the type MockOperations
type MockOperations_ContainerCreate_Call ¶
MockOperations_ContainerCreate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainerCreate'
func (*MockOperations_ContainerCreate_Call) Return ¶
func (_c *MockOperations_ContainerCreate_Call) Return(createResponse container.CreateResponse, err error) *MockOperations_ContainerCreate_Call
func (*MockOperations_ContainerCreate_Call) Run ¶
func (_c *MockOperations_ContainerCreate_Call) Run(run func(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string)) *MockOperations_ContainerCreate_Call
func (*MockOperations_ContainerCreate_Call) RunAndReturn ¶
func (_c *MockOperations_ContainerCreate_Call) RunAndReturn(run func(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *v1.Platform, containerName string) (container.CreateResponse, error)) *MockOperations_ContainerCreate_Call
type MockOperations_ContainerRemove_Call ¶
MockOperations_ContainerRemove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainerRemove'
func (*MockOperations_ContainerRemove_Call) Return ¶
func (_c *MockOperations_ContainerRemove_Call) Return(err error) *MockOperations_ContainerRemove_Call
func (*MockOperations_ContainerRemove_Call) Run ¶
func (_c *MockOperations_ContainerRemove_Call) Run(run func(ctx context.Context, containerID string, options container.RemoveOptions)) *MockOperations_ContainerRemove_Call
func (*MockOperations_ContainerRemove_Call) RunAndReturn ¶
func (_c *MockOperations_ContainerRemove_Call) RunAndReturn(run func(ctx context.Context, containerID string, options container.RemoveOptions) error) *MockOperations_ContainerRemove_Call
type MockOperations_ContainerRename_Call ¶
MockOperations_ContainerRename_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainerRename'
func (*MockOperations_ContainerRename_Call) Return ¶
func (_c *MockOperations_ContainerRename_Call) Return(err error) *MockOperations_ContainerRename_Call
func (*MockOperations_ContainerRename_Call) Run ¶
func (_c *MockOperations_ContainerRename_Call) Run(run func(ctx context.Context, containerID string, newContainerName string)) *MockOperations_ContainerRename_Call
func (*MockOperations_ContainerRename_Call) RunAndReturn ¶
func (_c *MockOperations_ContainerRename_Call) RunAndReturn(run func(ctx context.Context, containerID string, newContainerName string) error) *MockOperations_ContainerRename_Call
type MockOperations_ContainerStart_Call ¶
MockOperations_ContainerStart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContainerStart'
func (*MockOperations_ContainerStart_Call) Return ¶
func (_c *MockOperations_ContainerStart_Call) Return(err error) *MockOperations_ContainerStart_Call
func (*MockOperations_ContainerStart_Call) Run ¶
func (_c *MockOperations_ContainerStart_Call) Run(run func(ctx context.Context, containerID string, options container.StartOptions)) *MockOperations_ContainerStart_Call
func (*MockOperations_ContainerStart_Call) RunAndReturn ¶
func (_c *MockOperations_ContainerStart_Call) RunAndReturn(run func(ctx context.Context, containerID string, options container.StartOptions) error) *MockOperations_ContainerStart_Call
type MockOperations_Expecter ¶
type MockOperations_Expecter struct {
// contains filtered or unexported fields
}
func (*MockOperations_Expecter) ContainerCreate ¶
func (_e *MockOperations_Expecter) ContainerCreate(ctx interface{}, config interface{}, hostConfig interface{}, networkingConfig interface{}, platform interface{}, containerName interface{}) *MockOperations_ContainerCreate_Call
ContainerCreate is a helper method to define mock.On call
- ctx context.Context
- config *container.Config
- hostConfig *container.HostConfig
- networkingConfig *network.NetworkingConfig
- platform *v1.Platform
- containerName string
func (*MockOperations_Expecter) ContainerRemove ¶
func (_e *MockOperations_Expecter) ContainerRemove(ctx interface{}, containerID interface{}, options interface{}) *MockOperations_ContainerRemove_Call
ContainerRemove is a helper method to define mock.On call
- ctx context.Context
- containerID string
- options container.RemoveOptions
func (*MockOperations_Expecter) ContainerRename ¶
func (_e *MockOperations_Expecter) ContainerRename(ctx interface{}, containerID interface{}, newContainerName interface{}) *MockOperations_ContainerRename_Call
ContainerRename is a helper method to define mock.On call
- ctx context.Context
- containerID string
- newContainerName string
func (*MockOperations_Expecter) ContainerStart ¶
func (_e *MockOperations_Expecter) ContainerStart(ctx interface{}, containerID interface{}, options interface{}) *MockOperations_ContainerStart_Call
ContainerStart is a helper method to define mock.On call
- ctx context.Context
- containerID string
- options container.StartOptions
func (*MockOperations_Expecter) NetworkConnect ¶
func (_e *MockOperations_Expecter) NetworkConnect(ctx interface{}, networkID interface{}, containerID interface{}, config interface{}) *MockOperations_NetworkConnect_Call
NetworkConnect is a helper method to define mock.On call
- ctx context.Context
- networkID string
- containerID string
- config *network.EndpointSettings
type MockOperations_NetworkConnect_Call ¶
MockOperations_NetworkConnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NetworkConnect'
func (*MockOperations_NetworkConnect_Call) Return ¶
func (_c *MockOperations_NetworkConnect_Call) Return(err error) *MockOperations_NetworkConnect_Call
func (*MockOperations_NetworkConnect_Call) Run ¶
func (_c *MockOperations_NetworkConnect_Call) Run(run func(ctx context.Context, networkID string, containerID string, config *network.EndpointSettings)) *MockOperations_NetworkConnect_Call
func (*MockOperations_NetworkConnect_Call) RunAndReturn ¶
func (_c *MockOperations_NetworkConnect_Call) RunAndReturn(run func(ctx context.Context, networkID string, containerID string, config *network.EndpointSettings) error) *MockOperations_NetworkConnect_Call