configs.go 2.1 KB

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