github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/api/types/configs.go (about)

     1  package types // import "github.com/demonoid81/moby/api/types"
     2  
     3  import (
     4  	"github.com/demonoid81/moby/api/types/container"
     5  	"github.com/demonoid81/moby/api/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()
    13  type 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.
    24  type 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.
    30  type 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.
    45  type PluginRmConfig struct {
    46  	ForceRemove bool
    47  }
    48  
    49  // PluginEnableConfig holds arguments for plugin enable
    50  type PluginEnableConfig struct {
    51  	Timeout int
    52  }
    53  
    54  // PluginDisableConfig holds arguments for plugin disable.
    55  type PluginDisableConfig struct {
    56  	ForceDisable bool
    57  }
    58  
    59  // NetworkListConfig stores the options available for listing networks
    60  type NetworkListConfig struct {
    61  	// TODO(@cpuguy83): naming is hard, this is pulled from what was being used in the router before moving here
    62  	Detailed bool
    63  	Verbose  bool
    64  }