docker

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Overview

Package docker provides a mock for using the Docker API.

https://pkg.go.dev/github.com/docker/docker/client?tab=doc

Usage:

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

Index

Constants

View Source
const Version = "v1.40"

nolint: godot // ignore comment ending in a list

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 v20.10 has a maximum API version of v1.41 * to maintain n-1, the API version is pinned to v1.40

Variables

This section is empty.

Functions

func New

func New() (*mock, error)

New returns a client that is capable of handling Docker client calls and returning stub responses. nolint:golint // returning unexported type intentionally

Types

type ConfigService

type ConfigService struct{}

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

func (*ConfigService) ConfigCreate

func (c *ConfigService) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error)

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(ctx context.Context, name 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

func (c *ConfigService) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error)

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(ctx context.Context, id 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(ctx context.Context, id string, version swarm.Version, config 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?tab=doc#Client.ContainerAttach

func (*ContainerService) ContainerCommit

func (c *ContainerService) ContainerCommit(ctx context.Context, ctn string, options types.ContainerCommitOptions) (types.IDResponse, error)

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?tab=doc#Client.ContainerCommit

func (*ContainerService) ContainerCreate

func (c *ContainerService) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, p *v1.Platform, ctn string) (container.ContainerCreateCreatedBody, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#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?tab=doc#Client.ContainerDiff

func (*ContainerService) ContainerExecAttach

func (c *ContainerService) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)

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?tab=doc#Client.ContainerExecAttach

func (*ContainerService) ContainerExecCreate

func (c *ContainerService) ContainerExecCreate(ctx context.Context, ctn string, config types.ExecConfig) (types.IDResponse, 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?tab=doc#Client.ContainerExecCreate

func (*ContainerService) ContainerExecInspect

func (c *ContainerService) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, 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?tab=doc#Client.ContainerExecInspect

func (*ContainerService) ContainerExecResize

func (c *ContainerService) ContainerExecResize(ctx context.Context, execID string, options types.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?tab=doc#Client.ContainerExecResize

func (*ContainerService) ContainerExecStart

func (c *ContainerService) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) 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?tab=doc#Client.ContainerExecStart

func (*ContainerService) ContainerExport

func (c *ContainerService) ContainerExport(ctx context.Context, ctn 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?tab=doc#Client.ContainerExport

func (*ContainerService) ContainerInspect

func (c *ContainerService) ContainerInspect(ctx context.Context, ctn string) (types.ContainerJSON, 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?tab=doc#Client.ContainerInspect

func (*ContainerService) ContainerInspectWithRaw

func (c *ContainerService) ContainerInspectWithRaw(ctx context.Context, ctn string, getSize bool) (types.ContainerJSON, []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?tab=doc#Client.ContainerInspectWithRaw

func (*ContainerService) ContainerKill

func (c *ContainerService) ContainerKill(ctx context.Context, ctn, signal 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?tab=doc#Client.ContainerKill

func (*ContainerService) ContainerList

func (c *ContainerService) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ContainerList

func (*ContainerService) ContainerLogs

func (c *ContainerService) ContainerLogs(ctx context.Context, ctn string, options types.ContainerLogsOptions) (io.ReadCloser, error)

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?tab=doc#Client.ContainerLogs

func (*ContainerService) ContainerPause

func (c *ContainerService) ContainerPause(ctx context.Context, ctn 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?tab=doc#Client.ContainerPause

func (*ContainerService) ContainerRemove

func (c *ContainerService) ContainerRemove(ctx context.Context, ctn string, options types.ContainerRemoveOptions) 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?tab=doc#Client.ContainerRemove

func (*ContainerService) ContainerRename

func (c *ContainerService) ContainerRename(ctx context.Context, container, newContainerName 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?tab=doc#Client.ContainerRename

func (*ContainerService) ContainerResize

func (c *ContainerService) ContainerResize(ctx context.Context, ctn string, options types.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?tab=doc#Client.ContainerResize

func (*ContainerService) ContainerRestart

func (c *ContainerService) ContainerRestart(ctx context.Context, ctn string, timeout *time.Duration) 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?tab=doc#Client.ContainerRestart

func (*ContainerService) ContainerStart

func (c *ContainerService) ContainerStart(ctx context.Context, ctn string, options types.ContainerStartOptions) 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?tab=doc#Client.ContainerStart

func (*ContainerService) ContainerStatPath

func (c *ContainerService) ContainerStatPath(ctx context.Context, container, path string) (types.ContainerPathStat, 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?tab=doc#Client.ContainerStatPath

func (*ContainerService) ContainerStats

func (c *ContainerService) ContainerStats(ctx context.Context, ctn string, stream bool) (types.ContainerStats, error)

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?tab=doc#Client.ContainerStats

func (*ContainerService) ContainerStatsOneShot added in v0.8.0

func (c *ContainerService) ContainerStatsOneShot(ctx context.Context, containerID string) (types.ContainerStats, 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?tab=doc#Client.CopyFromContainer

func (*ContainerService) ContainerStop

func (c *ContainerService) ContainerStop(ctx context.Context, ctn string, timeout *time.Duration) 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?tab=doc#Client.ContainerStop

func (*ContainerService) ContainerTop

func (c *ContainerService) ContainerTop(ctx context.Context, ctn string, arguments []string) (container.ContainerTopOKBody, 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?tab=doc#Client.ContainerTop

func (*ContainerService) ContainerUnpause

func (c *ContainerService) ContainerUnpause(ctx context.Context, ctn 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?tab=doc#Client.ContainerUnpause

func (*ContainerService) ContainerUpdate

func (c *ContainerService) ContainerUpdate(ctx context.Context, ctn string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ContainerUpdate

func (*ContainerService) ContainerWait

func (c *ContainerService) ContainerWait(ctx context.Context, ctn string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-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?tab=doc#Client.ContainerWait

func (*ContainerService) ContainersPrune

func (c *ContainerService) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ContainersPrune

func (*ContainerService) CopyFromContainer

func (c *ContainerService) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, 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?tab=doc#Client.CopyFromContainer

func (*ContainerService) CopyToContainer

func (c *ContainerService) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error

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?tab=doc#Client.CopyToContainer

type DistributionService

type DistributionService struct{}

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

func (*DistributionService) DistributionInspect

func (d *DistributionService) DistributionInspect(ctx context.Context, image, encodedRegistryAuth string) (registry.DistributionInspect, error)

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(ctx context.Context, id string) error

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

func (*ImageService) ImageBuild

func (i *ImageService) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ImageBuild

func (*ImageService) ImageCreate

func (i *ImageService) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ImageCreate

func (*ImageService) ImageHistory

func (i *ImageService) ImageHistory(ctx context.Context, image string) ([]image.HistoryResponseItem, error)

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?tab=doc#Client.ImageHistory

func (*ImageService) ImageImport

func (i *ImageService) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ImageImport

func (*ImageService) ImageInspectWithRaw

func (i *ImageService) ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error)

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?tab=doc#Client.ImageInspectWithRaw

func (*ImageService) ImageList

func (i *ImageService) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ImageList

func (*ImageService) ImageLoad

func (i *ImageService) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ImageLoad

func (*ImageService) ImagePull

func (i *ImageService) ImagePull(ctx context.Context, image string, options types.ImagePullOptions) (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?tab=doc#Client.ImagePull

func (*ImageService) ImagePush

func (i *ImageService) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#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?tab=doc#Client.ImageRemove

func (*ImageService) ImageSave

func (i *ImageService) ImageSave(ctx context.Context, images []string) (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?tab=doc#Client.ImageSave

func (*ImageService) ImageSearch

func (i *ImageService) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error)

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?tab=doc#Client.ImageSearch

func (*ImageService) ImageTag

func (i *ImageService) ImageTag(ctx context.Context, image, ref 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?tab=doc#Client.ImageTag

func (*ImageService) ImagesPrune

func (i *ImageService) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (types.ImagesPruneReport, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#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(ctx context.Context, network, container string, config *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?tab=doc#Client.NetworkConnect

func (*NetworkService) NetworkCreate

func (n *NetworkService) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.NetworkCreate

func (*NetworkService) NetworkDisconnect

func (n *NetworkService) NetworkDisconnect(ctx context.Context, network, container string, force 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?tab=doc#Client.NetworkDisconnect

func (*NetworkService) NetworkInspect

func (n *NetworkService) NetworkInspect(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, 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?tab=doc#Client.NetworkInspect

func (*NetworkService) NetworkInspectWithRaw

func (n *NetworkService) NetworkInspectWithRaw(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, []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?tab=doc#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?tab=doc#Client.NetworkList

func (*NetworkService) NetworkRemove

func (n *NetworkService) NetworkRemove(ctx 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?tab=doc#Client.NetworkRemove

func (*NetworkService) NetworksPrune

func (n *NetworkService) NetworksPrune(ctx context.Context, pruneFilter filters.Args) (types.NetworksPruneReport, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#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(ctx context.Context, nodeID 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?tab=doc#Client.NodeInspectWithRaw

func (*NodeService) NodeList

func (n *NodeService) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error)

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?tab=doc#Client.NodeList

func (*NodeService) NodeRemove

func (n *NodeService) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error

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?tab=doc#Client.NodeRemove

func (*NodeService) NodeUpdate

func (n *NodeService) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node 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?tab=doc#Client.NodeUpdate

type PluginService

type PluginService struct{}

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

func (*PluginService) PluginCreate

func (p *PluginService) PluginCreate(ctx context.Context, createContext io.Reader, options types.PluginCreateOptions) error

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.PluginCreate

func (*PluginService) PluginDisable

func (p *PluginService) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.PluginDisable

func (*PluginService) PluginEnable

func (p *PluginService) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.PluginEnable

func (*PluginService) PluginInspectWithRaw

func (p *PluginService) PluginInspectWithRaw(ctx context.Context, name 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?tab=doc#Client.PluginInspectWithRaw

func (*PluginService) PluginInstall

func (p *PluginService) PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.PluginInstall

func (*PluginService) PluginList

func (p *PluginService) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.PluginList

func (*PluginService) PluginPush

func (p *PluginService) PluginPush(ctx context.Context, name string, registryAuth 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?tab=doc#Client.PluginPush

func (*PluginService) PluginRemove

func (p *PluginService) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.PluginRemove

func (*PluginService) PluginSet

func (p *PluginService) PluginSet(ctx context.Context, name string, args []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?tab=doc#Client.PluginSet

func (*PluginService) PluginUpgrade

func (p *PluginService) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.PluginUpgrade

type SecretService

type SecretService struct{}

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

func (*SecretService) SecretCreate

func (s *SecretService) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error)

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?tab=doc#Client.SecretCreate

func (*SecretService) SecretInspectWithRaw

func (s *SecretService) SecretInspectWithRaw(ctx context.Context, name 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?tab=doc#Client.SecretInspectWithRaw

func (*SecretService) SecretList

func (s *SecretService) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error)

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?tab=doc#Client.SecretList

func (*SecretService) SecretRemove

func (s *SecretService) SecretRemove(ctx context.Context, id 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?tab=doc#Client.SecretRemove

func (*SecretService) SecretUpdate

func (s *SecretService) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret 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?tab=doc#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?tab=doc#Client.ServiceCreate

func (*ServiceService) ServiceInspectWithRaw

func (s *ServiceService) ServiceInspectWithRaw(ctx context.Context, serviceID string, options types.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?tab=doc#Client.ServiceInspectWithRaw

func (*ServiceService) ServiceList

func (s *ServiceService) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error)

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?tab=doc#Client.ServiceList

func (*ServiceService) ServiceLogs

func (s *ServiceService) ServiceLogs(ctx context.Context, serviceID string, options types.ContainerLogsOptions) (io.ReadCloser, error)

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?tab=doc#Client.ServiceLogs

func (*ServiceService) ServiceRemove

func (s *ServiceService) ServiceRemove(ctx context.Context, serviceID 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?tab=doc#Client.ServiceRemove

func (*ServiceService) ServiceUpdate

func (s *ServiceService) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error)

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?tab=doc#Client.ServiceUpdate

func (*ServiceService) TaskInspectWithRaw

func (s *ServiceService) TaskInspectWithRaw(ctx context.Context, taskID 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?tab=doc#Client.TaskInspectWithRaw

func (*ServiceService) TaskList

func (s *ServiceService) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error)

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?tab=doc#Client.TaskList

func (*ServiceService) TaskLogs

func (s *ServiceService) TaskLogs(ctx context.Context, taskID string, options types.ContainerLogsOptions) (io.ReadCloser, error)

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(ctx context.Context) (types.SwarmUnlockKeyResponse, 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?tab=doc#Client.SwarmGetUnlockKey

func (*SwarmService) SwarmInit

func (s *SwarmService) SwarmInit(ctx context.Context, req 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?tab=doc#Client.SwarmInit

func (*SwarmService) SwarmInspect

func (s *SwarmService) SwarmInspect(ctx 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?tab=doc#Client.SwarmInspect

func (*SwarmService) SwarmJoin

func (s *SwarmService) SwarmJoin(ctx context.Context, req 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?tab=doc#Client.SwarmJoin

func (*SwarmService) SwarmLeave

func (s *SwarmService) SwarmLeave(ctx context.Context, force 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?tab=doc#Client.SwarmLeave

func (*SwarmService) SwarmUnlock

func (s *SwarmService) SwarmUnlock(ctx context.Context, req 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?tab=doc#Client.SwarmUnlock

func (*SwarmService) SwarmUpdate

func (s *SwarmService) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error

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?tab=doc#Client.SwarmUpdate

type SystemService

type SystemService struct{}

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

func (*SystemService) DiskUsage

func (s *SystemService) DiskUsage(ctx context.Context) (types.DiskUsage, error)

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?tab=doc#Client.DiskUsage

func (*SystemService) Events

func (s *SystemService) Events(ctx context.Context, options types.EventsOptions) (<-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?tab=doc#Client.Events

func (*SystemService) Info

func (s *SystemService) Info(ctx context.Context) (types.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?tab=doc#Client.Info

func (*SystemService) Ping

func (s *SystemService) Ping(ctx 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?tab=doc#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?tab=doc#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(ctx context.Context, options volume.VolumeCreateBody) (types.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?tab=doc#Client.VolumeCreate

func (*VolumeService) VolumeInspect

func (v *VolumeService) VolumeInspect(ctx context.Context, volumeID string) (types.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?tab=doc#Client.VolumeInspect

func (*VolumeService) VolumeInspectWithRaw

func (v *VolumeService) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.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?tab=doc#Client.VolumeInspectWithRaw

func (*VolumeService) VolumeList

func (v *VolumeService) VolumeList(ctx context.Context, filter filters.Args) (volume.VolumeListOKBody, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.VolumeList

func (*VolumeService) VolumeRemove

func (v *VolumeService) VolumeRemove(ctx context.Context, volumeID string, force 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?tab=doc#Client.VolumeRemove

func (*VolumeService) VolumesPrune

func (v *VolumeService) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (types.VolumesPruneReport, error)

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

https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.VolumesPrune

Jump to

Keyboard shortcuts

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