configs.go 2.2 KB

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