docker

package
v0.28.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package docker provides a mock for using the Docker API.

https://pkg.go.dev/github.com/docker/docker/client

Usage:

import "github.com/go-vela/worker/mock/docker"

Index

Constants

View Source
const Version = "v1.44"

Version represents the supported Docker API version for the mock.

The Docker API version is pinned to ensure compatibility between the Docker API and client. The goal is to maintain n-1 compatibility.

The maximum supported Docker API version for the client is here:

https://docs.docker.com/engine/api/#api-version-matrix

For example (use the compatibility matrix above for reference):

* the Docker version of v26.0 has a maximum API version of v1.45 * to maintain n-1, the API version is pinned to v1.44 .

Variables

This section is empty.

Functions

func New

func New() (*mock, error)

Types

type CheckpointService added in v0.28.0

type CheckpointService struct{}

CheckpointService implements all the checkpoint related functions for the Docker mock.

func (*CheckpointService) CheckpointCreate added in v0.28.0

func (cp *CheckpointService) CheckpointCreate(_ context.Context, _ string, _ checkpoint.CreateOptions) error

func (*CheckpointService) CheckpointDelete

func (cp *CheckpointService) CheckpointDelete(_ context.Context, _ string, _ checkpoint.DeleteOptions) error

func (*CheckpointService) CheckpointList added in v0.28.0

type ConfigService

type ConfigService struct{}

ConfigService implements all the config related functions for the Docker mock.

func (*ConfigService) ConfigCreate

ConfigCreate is a helper function to simulate a mocked call to create a config for a Docker swarm cluster.

func (*ConfigService) ConfigInspectWithRaw

func (c *ConfigService) ConfigInspectWithRaw(_ context.Context, _ string) (swarm.Config, []byte, error)

ConfigInspectWithRaw is a helper function to simulate a mocked call to inspect a config for a Docker swarm cluster and return the raw body received from the API.

func (*ConfigService) ConfigList

ConfigList is a helper function to simulate a mocked call to list the configs for a Docker swarm cluster.

func (*ConfigService) ConfigRemove

func (c *ConfigService) ConfigRemove(_ context.Context, _ string) error

ConfigRemove is a helper function to simulate a mocked call to remove a config for a Docker swarm cluster.

func (*ConfigService) ConfigUpdate

func (c *ConfigService) ConfigUpdate(_ context.Context, _ string, _ swarm.Version, _ swarm.ConfigSpec) error

ConfigUpdate is a helper function to simulate a mocked call to update a config for a Docker swarm cluster.

type ContainerService

type ContainerService struct{}

ContainerService implements all the container related functions for the Docker mock.

func (*ContainerService) ContainerAttach

ContainerAttach is a helper function to simulate a mocked call to attach a connection to a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerAttach

func (*ContainerService) ContainerCommit

ContainerCommit is a helper function to simulate a mocked call to apply changes to a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerCommit

func (*ContainerService) ContainerCreate

ContainerCreate is a helper function to simulate a mocked call to create a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerCreate

func (*ContainerService) ContainerDiff

ContainerDiff is a helper function to simulate a mocked call to show the differences in the filesystem between two Docker containers.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerDiff

func (*ContainerService) ContainerExecAttach

ContainerExecAttach is a helper function to simulate a mocked call to attach a connection to a process running inside a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerExecAttach

func (*ContainerService) ContainerExecCreate

func (c *ContainerService) ContainerExecCreate(_ context.Context, ctn string, config container.ExecOptions) (container.ExecCreateResponse, error)

ContainerExecCreate is a helper function to simulate a mocked call to create a process to run inside a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerExecCreate

func (*ContainerService) ContainerExecInspect

func (c *ContainerService) ContainerExecInspect(_ context.Context, _ string) (container.ExecInspect, error)

ContainerExecInspect is a helper function to simulate a mocked call to inspect a process running inside a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerExecInspect

func (*ContainerService) ContainerExecResize

func (c *ContainerService) ContainerExecResize(_ context.Context, _ string, _ container.ResizeOptions) error

ContainerExecResize is a helper function to simulate a mocked call to resize the tty for a process running inside a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerExecResize

func (*ContainerService) ContainerExecStart

func (c *ContainerService) ContainerExecStart(_ context.Context, _ string, _ container.ExecStartOptions) error

ContainerExecStart is a helper function to simulate a mocked call to start a process inside a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerExecStart

func (*ContainerService) ContainerExport

func (c *ContainerService) ContainerExport(_ context.Context, _ string) (io.ReadCloser, error)

ContainerExport is a helper function to simulate a mocked call to expore the contents of a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerExport

func (*ContainerService) ContainerInspect

func (c *ContainerService) ContainerInspect(_ context.Context, ctn string) (container.InspectResponse, error)

ContainerInspect is a helper function to simulate a mocked call to inspect a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerInspect

func (*ContainerService) ContainerInspectWithRaw

func (c *ContainerService) ContainerInspectWithRaw(_ context.Context, ctn string, _ bool) (container.InspectResponse, []byte, error)

ContainerInspectWithRaw is a helper function to simulate a mocked call to inspect a Docker container and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerInspectWithRaw

func (*ContainerService) ContainerKill

func (c *ContainerService) ContainerKill(_ context.Context, ctn, _ string) error

ContainerKill is a helper function to simulate a mocked call to kill a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerKill

func (*ContainerService) ContainerList

ContainerList is a helper function to simulate a mocked call to list Docker containers.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerList

func (*ContainerService) ContainerLogs

ContainerLogs is a helper function to simulate a mocked call to capture the logs from a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerLogs

func (*ContainerService) ContainerPause

func (c *ContainerService) ContainerPause(_ context.Context, _ string) error

ContainerPause is a helper function to simulate a mocked call to pause a running Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerPause

func (*ContainerService) ContainerRemove

func (c *ContainerService) ContainerRemove(_ context.Context, ctn string, _ container.RemoveOptions) error

ContainerRemove is a helper function to simulate a mocked call to remove a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerRemove

func (*ContainerService) ContainerRename

func (c *ContainerService) ContainerRename(_ context.Context, _ string, _ string) error

ContainerRename is a helper function to simulate a mocked call to rename a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerRename

func (*ContainerService) ContainerResize

func (c *ContainerService) ContainerResize(_ context.Context, _ string, _ container.ResizeOptions) error

ContainerResize is a helper function to simulate a mocked call to resize a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerResize

func (*ContainerService) ContainerRestart

func (c *ContainerService) ContainerRestart(_ context.Context, _ string, _ container.StopOptions) error

ContainerRestart is a helper function to simulate a mocked call to restart a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerRestart

func (*ContainerService) ContainerStart

func (c *ContainerService) ContainerStart(_ context.Context, ctn string, _ container.StartOptions) error

ContainerStart is a helper function to simulate a mocked call to start a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerStart

func (*ContainerService) ContainerStatPath

func (c *ContainerService) ContainerStatPath(_ context.Context, _ string, _ string) (container.PathStat, error)

ContainerStatPath is a helper function to simulate a mocked call to capture information about a path inside a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerStatPath

func (*ContainerService) ContainerStats

ContainerStats is a helper function to simulate a mocked call to capture information about a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerStats

func (*ContainerService) ContainerStatsOneShot

func (c *ContainerService) ContainerStatsOneShot(_ context.Context, _ string) (container.StatsResponseReader, error)

ContainerStatsOneShot is a helper function to simulate a mocked call to return near realtime stats for a given container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerStatsOneShot

func (*ContainerService) ContainerStop

func (c *ContainerService) ContainerStop(_ context.Context, ctn string, _ container.StopOptions) error

ContainerStop is a helper function to simulate a mocked call to stop a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerStop

func (*ContainerService) ContainerTop

func (c *ContainerService) ContainerTop(_ context.Context, _ string, _ []string) (container.TopResponse, error)

ContainerTop is a helper function to simulate a mocked call to show running processes inside a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerTop

func (*ContainerService) ContainerUnpause

func (c *ContainerService) ContainerUnpause(_ context.Context, _ string) error

ContainerUnpause is a helper function to simulate a mocked call to unpause a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerUnpause

func (*ContainerService) ContainerUpdate

ContainerUpdate is a helper function to simulate a mocked call to update a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerUpdate

func (*ContainerService) ContainerWait

func (c *ContainerService) ContainerWait(_ context.Context, ctn string, _ container.WaitCondition) (<-chan container.WaitResponse, <-chan error)

ContainerWait is a helper function to simulate a mocked call to wait for a running Docker container to finish.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainerWait

func (*ContainerService) ContainersPrune

func (c *ContainerService) ContainersPrune(_ context.Context, _ filters.Args) (container.PruneReport, error)

ContainersPrune is a helper function to simulate a mocked call to prune Docker containers.

https://pkg.go.dev/github.com/docker/docker/client#Client.ContainersPrune

func (*ContainerService) CopyFromContainer

func (c *ContainerService) CopyFromContainer(_ context.Context, _ string, path string) (io.ReadCloser, container.PathStat, error)

CopyFromContainer is a helper function to simulate a mocked call to copy content from a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.CopyFromContainer

func (*ContainerService) CopyToContainer

CopyToContainer is a helper function to simulate a mocked call to copy content to a Docker container.

https://pkg.go.dev/github.com/docker/docker/client#Client.CopyToContainer

type DistributionService

type DistributionService struct{}

DistributionService implements all the distribution related functions for the Docker mock.

func (*DistributionService) DistributionInspect

DistributionInspect is a helper function to simulate a mocked call to inspect a Docker image and return the digest and manifest.

type ImageService

type ImageService struct{}

ImageService implements all the image related functions for the Docker mock.

func (*ImageService) BuildCachePrune

BuildCachePrune is a helper function to simulate a mocked call to prune the build cache for the Docker daemon.

func (*ImageService) BuildCancel

func (i *ImageService) BuildCancel(_ context.Context, _ string) error

BuildCancel is a helper function to simulate a mocked call to cancel building a Docker image.

func (*ImageService) ImageBuild

ImageBuild is a helper function to simulate a mocked call to build a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageBuild

func (*ImageService) ImageCreate

ImageCreate is a helper function to simulate a mocked call to create a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageCreate

func (*ImageService) ImageHistory

ImageHistory is a helper function to simulate a mocked call to inspect the history for a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageHistory

func (*ImageService) ImageImport

ImageImport is a helper function to simulate a mocked call to import a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageImport

func (*ImageService) ImageInspect added in v0.27.0

ImageInspectWithRaw is a helper function to simulate a mocked call to inspect a Docker image and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageInspectWithRaw

func (*ImageService) ImageInspectWithRaw

func (i *ImageService) ImageInspectWithRaw(_ context.Context, _ string) (image.InspectResponse, []byte, error)

ImageInspect is a helper function to simulate a mocked call to inspect a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageInspect

func (*ImageService) ImageList

func (i *ImageService) ImageList(_ context.Context, _ image.ListOptions) ([]image.Summary, error)

ImageList is a helper function to simulate a mocked call to list Docker images.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageList

func (*ImageService) ImageLoad

ImageLoad is a helper function to simulate a mocked call to load a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageLoad

func (*ImageService) ImagePull

func (i *ImageService) ImagePull(_ context.Context, image string, _ image.PullOptions) (io.ReadCloser, error)

ImagePull is a helper function to simulate a mocked call to pull a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImagePull

func (*ImageService) ImagePush

ImagePush is a helper function to simulate a mocked call to push a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImagePush

func (*ImageService) ImageRemove

ImageRemove is a helper function to simulate a mocked call to remove a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageRemove

func (*ImageService) ImageSave

func (i *ImageService) ImageSave(_ context.Context, _ []string, _ ...client.ImageSaveOption) (io.ReadCloser, error)

ImageSave is a helper function to simulate a mocked call to save a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageSave

func (*ImageService) ImageSearch

ImageSearch is a helper function to simulate a mocked call to search for a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageSearch

func (*ImageService) ImageTag

func (i *ImageService) ImageTag(_ context.Context, _ string, _ string) error

ImageTag is a helper function to simulate a mocked call to tag a Docker image.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImageTag

func (*ImageService) ImagesPrune

func (i *ImageService) ImagesPrune(_ context.Context, _ filters.Args) (image.PruneReport, error)

ImagesPrune is a helper function to simulate a mocked call to prune Docker images.

https://pkg.go.dev/github.com/docker/docker/client#Client.ImagesPrune

type NetworkService

type NetworkService struct{}

NetworkService implements all the network related functions for the Docker mock.

func (*NetworkService) NetworkConnect

func (n *NetworkService) NetworkConnect(_ context.Context, _, _ string, _ *network.EndpointSettings) error

NetworkConnect is a helper function to simulate a mocked call to connect to a Docker network.

https://pkg.go.dev/github.com/docker/docker/client#Client.NetworkConnect

func (*NetworkService) NetworkCreate

NetworkCreate is a helper function to simulate a mocked call to create a Docker network.

https://pkg.go.dev/github.com/docker/docker/client#Client.NetworkCreate

func (*NetworkService) NetworkDisconnect

func (n *NetworkService) NetworkDisconnect(_ context.Context, _, _ string, _ bool) error

NetworkDisconnect is a helper function to simulate a mocked call to disconnect from a Docker network.

https://pkg.go.dev/github.com/docker/docker/client#Client.NetworkDisconnect

func (*NetworkService) NetworkInspect

func (n *NetworkService) NetworkInspect(_ context.Context, networkID string, _ network.InspectOptions) (network.Inspect, error)

NetworkInspect is a helper function to simulate a mocked call to inspect a Docker network.

https://pkg.go.dev/github.com/docker/docker/client#Client.NetworkInspect

func (*NetworkService) NetworkInspectWithRaw

func (n *NetworkService) NetworkInspectWithRaw(_ context.Context, networkID string, _ network.InspectOptions) (network.Inspect, []byte, error)

NetworkInspectWithRaw is a helper function to simulate a mocked call to inspect a Docker network and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.NetworkInspectWithRaw

func (*NetworkService) NetworkList

NetworkList is a helper function to simulate a mocked call to list Docker networks.

https://pkg.go.dev/github.com/docker/docker/client#Client.NetworkList

func (*NetworkService) NetworkRemove

func (n *NetworkService) NetworkRemove(_ context.Context, network string) error

NetworkRemove is a helper function to simulate a mocked call to remove Docker a network.

https://pkg.go.dev/github.com/docker/docker/client#Client.NetworkRemove

func (*NetworkService) NetworksPrune

func (n *NetworkService) NetworksPrune(_ context.Context, _ filters.Args) (network.PruneReport, error)

NetworksPrune is a helper function to simulate a mocked call to prune Docker networks.

https://pkg.go.dev/github.com/docker/docker/client#Client.NetworksPrune

type NodeService

type NodeService struct{}

NodeService implements all the node related functions for the Docker mock.

func (*NodeService) NodeInspectWithRaw

func (n *NodeService) NodeInspectWithRaw(_ context.Context, _ string) (swarm.Node, []byte, error)

NodeInspectWithRaw is a helper function to simulate a mocked call to inspect a node for a Docker swarm cluster and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.NodeInspectWithRaw

func (*NodeService) NodeList

NodeList is a helper function to simulate a mocked call to list the nodes for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.NodeList

func (*NodeService) NodeRemove

NodeRemove is a helper function to simulate a mocked call to remove a node from a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.NodeRemove

func (*NodeService) NodeUpdate

func (n *NodeService) NodeUpdate(_ context.Context, _ string, _ swarm.Version, _ swarm.NodeSpec) error

NodeUpdate is a helper function to simulate a mocked call to update a node for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.NodeUpdate

type PluginService

type PluginService struct{}

PluginService implements all the plugin related functions for the Docker mock.

func (*PluginService) PluginCreate

PluginCreate is a helper function to simulate a mocked call to create a Docker plugin.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginCreate

func (*PluginService) PluginDisable

PluginDisable is a helper function to simulate a mocked call to disable a Docker plugin.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginDisable

func (*PluginService) PluginEnable

PluginEnable is a helper function to simulate a mocked call to enable a Docker plugin.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginEnable

func (*PluginService) PluginInspectWithRaw

func (p *PluginService) PluginInspectWithRaw(_ context.Context, _ string) (*types.Plugin, []byte, error)

PluginInspectWithRaw is a helper function to simulate a mocked call to inspect a Docker plugin and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginInspectWithRaw

func (*PluginService) PluginInstall

PluginInstall is a helper function to simulate a mocked call to install a Docker plugin.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginInstall

func (*PluginService) PluginList

PluginList is a helper function to simulate a mocked call to list Docker plugins.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginList

func (*PluginService) PluginPush

func (p *PluginService) PluginPush(_ context.Context, _ string, _ string) (io.ReadCloser, error)

PluginPush is a helper function to simulate a mocked call to push a Docker plugin.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginPush

func (*PluginService) PluginRemove

PluginRemove is a helper function to simulate a mocked call to remove a Docker plugin.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginRemove

func (*PluginService) PluginSet

func (p *PluginService) PluginSet(_ context.Context, _ string, _ []string) error

PluginSet is a helper function to simulate a mocked call to update settings for a Docker plugin.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginSet

func (*PluginService) PluginUpgrade

PluginUpgrade is a helper function to simulate a mocked call to upgrade a Docker plugin.

https://pkg.go.dev/github.com/docker/docker/client#Client.PluginUpgrade

type SecretService

type SecretService struct{}

SecretService implements all the secret related functions for the Docker mock.

func (*SecretService) SecretCreate

SecretCreate is a helper function to simulate a mocked call to create a secret for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SecretCreate

func (*SecretService) SecretInspectWithRaw

func (s *SecretService) SecretInspectWithRaw(_ context.Context, _ string) (swarm.Secret, []byte, error)

SecretInspectWithRaw is a helper function to simulate a mocked call to inspect a Docker secret and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.SecretInspectWithRaw

func (*SecretService) SecretList

SecretList is a helper function to simulate a mocked call to list secrets for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SecretList

func (*SecretService) SecretRemove

func (s *SecretService) SecretRemove(_ context.Context, _ string) error

SecretRemove is a helper function to simulate a mocked call to remove a secret for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SecretRemove

func (*SecretService) SecretUpdate

func (s *SecretService) SecretUpdate(_ context.Context, _ string, _ swarm.Version, _ swarm.SecretSpec) error

SecretUpdate is a helper function to simulate a mocked call to update a secret for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SecretUpdate

type ServiceService

type ServiceService struct{}

ServiceService implements all the service related functions for the Docker mock.

func (*ServiceService) ServiceCreate

ServiceCreate is a helper function to simulate a mocked call to create a service for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.ServiceCreate

func (*ServiceService) ServiceInspectWithRaw

func (s *ServiceService) ServiceInspectWithRaw(_ context.Context, _ string, _ swarm.ServiceInspectOptions) (swarm.Service, []byte, error)

ServiceInspectWithRaw is a helper function to simulate a mocked call to inspect a Docker service and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.ServiceInspectWithRaw

func (*ServiceService) ServiceList

ServiceList is a helper function to simulate a mocked call to list services for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.ServiceList

func (*ServiceService) ServiceLogs

ServiceLogs is a helper function to simulate a mocked call to capture the logs from a service for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.ServiceLogs

func (*ServiceService) ServiceRemove

func (s *ServiceService) ServiceRemove(_ context.Context, _ string) error

ServiceRemove is a helper function to simulate a mocked call to remove a service for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.ServiceRemove

func (*ServiceService) ServiceUpdate

ServiceUpdate is a helper function to simulate a mocked call to update a service for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.ServiceUpdate

func (*ServiceService) TaskInspectWithRaw

func (s *ServiceService) TaskInspectWithRaw(_ context.Context, _ string) (swarm.Task, []byte, error)

TaskInspectWithRaw is a helper function to simulate a mocked call to inspect a task for a Docker swarm cluster and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.TaskInspectWithRaw

func (*ServiceService) TaskList

TaskList is a helper function to simulate a mocked call to list tasks for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.TaskList

func (*ServiceService) TaskLogs

TaskLogs is a helper function to simulate a mocked call to capture the logs from a task for a Docker swarm cluster.

type SwarmService

type SwarmService struct{}

SwarmService implements all the swarm related functions for the Docker mock.

func (*SwarmService) SwarmGetUnlockKey

func (s *SwarmService) SwarmGetUnlockKey(_ context.Context) (swarm.UnlockKeyResponse, error)

SwarmGetUnlockKey is a helper function to simulate a mocked call to capture the unlock key for a Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SwarmGetUnlockKey

func (*SwarmService) SwarmInit

func (s *SwarmService) SwarmInit(_ context.Context, _ swarm.InitRequest) (string, error)

SwarmInit is a helper function to simulate a mocked call to initialize the Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SwarmInit

func (*SwarmService) SwarmInspect

func (s *SwarmService) SwarmInspect(_ context.Context) (swarm.Swarm, error)

SwarmInspect is a helper function to simulate a mocked call to inspect the Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SwarmInspect

func (*SwarmService) SwarmJoin

func (s *SwarmService) SwarmJoin(_ context.Context, _ swarm.JoinRequest) error

SwarmJoin is a helper function to simulate a mocked call to join the Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SwarmJoin

func (*SwarmService) SwarmLeave

func (s *SwarmService) SwarmLeave(_ context.Context, _ bool) error

SwarmLeave is a helper function to simulate a mocked call to leave the Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SwarmLeave

func (*SwarmService) SwarmUnlock

func (s *SwarmService) SwarmUnlock(_ context.Context, _ swarm.UnlockRequest) error

SwarmUnlock is a helper function to simulate a mocked call to unlock the Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SwarmUnlock

func (*SwarmService) SwarmUpdate

SwarmUpdate is a helper function to simulate a mocked call to update the Docker swarm cluster.

https://pkg.go.dev/github.com/docker/docker/client#Client.SwarmUpdate

type SystemService

type SystemService struct{}

SystemService implements all the system related functions for the Docker mock.

func (*SystemService) DiskUsage

DiskUsage is a helper function to simulate a mocked call to capture the data usage from the Docker daemon.

https://pkg.go.dev/github.com/docker/docker/client#Client.DiskUsage

func (*SystemService) Events

func (s *SystemService) Events(_ context.Context, _ events.ListOptions) (<-chan events.Message, <-chan error)

Events is a helper function to simulate a mocked call to capture the events from the Docker daemon.

https://pkg.go.dev/github.com/docker/docker/client#Client.Events

func (*SystemService) Info

func (s *SystemService) Info(_ context.Context) (system.Info, error)

Info is a helper function to simulate a mocked call to capture the system information from the Docker daemon.

https://pkg.go.dev/github.com/docker/docker/client#Client.Info

func (*SystemService) Ping

func (s *SystemService) Ping(_ context.Context) (types.Ping, error)

Ping is a helper function to simulate a mocked call to ping the Docker daemon and return version information.

https://pkg.go.dev/github.com/docker/docker/client#Client.Ping

func (*SystemService) RegistryLogin

RegistryLogin is a helper function to simulate a mocked call to authenticate the Docker daemon against a Docker registry.

https://pkg.go.dev/github.com/docker/docker/client#Client.RegistryLogin

type VolumeService

type VolumeService struct{}

VolumeService implements all the volume related functions for the Docker mock.

func (*VolumeService) VolumeCreate

func (v *VolumeService) VolumeCreate(_ context.Context, options volume.CreateOptions) (volume.Volume, error)

VolumeCreate is a helper function to simulate a mocked call to create a Docker volume.

https://pkg.go.dev/github.com/docker/docker/client#Client.VolumeCreate

func (*VolumeService) VolumeInspect

func (v *VolumeService) VolumeInspect(_ context.Context, volumeID string) (volume.Volume, error)

VolumeInspect is a helper function to simulate a mocked call to inspect a Docker volume.

https://pkg.go.dev/github.com/docker/docker/client#Client.VolumeInspect

func (*VolumeService) VolumeInspectWithRaw

func (v *VolumeService) VolumeInspectWithRaw(_ context.Context, volumeID string) (volume.Volume, []byte, error)

VolumeInspectWithRaw is a helper function to simulate a mocked call to inspect a Docker volume and return the raw body received from the API.

https://pkg.go.dev/github.com/docker/docker/client#Client.VolumeInspectWithRaw

func (*VolumeService) VolumeList

VolumeList is a helper function to simulate a mocked call to list Docker volumes.

https://pkg.go.dev/github.com/docker/docker/client#Client.VolumeList

func (*VolumeService) VolumeRemove

func (v *VolumeService) VolumeRemove(_ context.Context, volumeID string, _ bool) error

VolumeRemove is a helper function to simulate a mocked call to remove Docker a volume.

https://pkg.go.dev/github.com/docker/docker/client#Client.VolumeRemove

func (*VolumeService) VolumeUpdate added in v0.22.0

VolumeUpdate is a helper function to simulate a mocked call to update Docker volumes.

https://pkg.go.dev/github.com/docker/docker/client#Client.VolumeUpdate

func (*VolumeService) VolumesPrune

func (v *VolumeService) VolumesPrune(_ context.Context, _ filters.Args) (volume.PruneReport, error)

VolumesPrune is a helper function to simulate a mocked call to prune Docker volumes.

https://pkg.go.dev/github.com/docker/docker/client#Client.VolumesPrune

Jump to

Keyboard shortcuts

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