github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/api/types/configs.go (about)

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