1package types // import "github.com/ory/dockertest/docker/types"
2
3import (
4	"github.com/ory/dockertest/docker/types/container"
5	"github.com/ory/dockertest/docker/types/network"
6)
7
8// configs holds structs used for internal communication between the
9// frontend (such as an http server) and the backend (such as the
10// docker daemon).
11
12// ContainerCreateConfig is the parameter set to ContainerCreate()
13type ContainerCreateConfig struct {
14	Name             string
15	Config           *container.Config
16	HostConfig       *container.HostConfig
17	NetworkingConfig *network.NetworkingConfig
18	AdjustCPUShares  bool
19}
20
21// ContainerRmConfig holds arguments for the container remove
22// operation. This struct is used to tell the backend what operations
23// to perform.
24type ContainerRmConfig struct {
25	ForceRemove, RemoveVolume, RemoveLink bool
26}
27
28// ExecConfig is a small subset of the Config struct that holds the configuration
29// for the exec feature of docker.
30type ExecConfig struct {
31	User         string   // User that will run the command
32	Privileged   bool     // Is the container in privileged mode
33	Tty          bool     // Attach standard streams to a tty.
34	AttachStdin  bool     // Attach the standard input, makes possible user interaction
35	AttachStderr bool     // Attach the standard error
36	AttachStdout bool     // Attach the standard output
37	Detach       bool     // Execute in detach mode
38	DetachKeys   string   // Escape keys for detach
39	Env          []string // Environment variables
40	WorkingDir   string   // Working directory
41	Cmd          []string // Execution commands and args
42}
43
44// PluginRmConfig holds arguments for plugin remove.
45type PluginRmConfig struct {
46	ForceRemove bool
47}
48
49// PluginEnableConfig holds arguments for plugin enable
50type PluginEnableConfig struct {
51	Timeout int
52}
53
54// PluginDisableConfig holds arguments for plugin disable.
55type PluginDisableConfig struct {
56	ForceDisable bool
57}
58