github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/api/types/plugin.go (about)

     1  package types
     2  
     3  // This file was generated by the swagger tool.
     4  // Editing this file might prove futile when you re-run the swagger generate command
     5  
     6  // Plugin A plugin for the Engine API
     7  // swagger:model Plugin
     8  type Plugin struct {
     9  
    10  	// config
    11  	// Required: true
    12  	Config PluginConfig `json:"Config"`
    13  
    14  	// True when the plugin is running. False when the plugin is not running, only installed.
    15  	// Required: true
    16  	Enabled bool `json:"Enabled"`
    17  
    18  	// Id
    19  	ID string `json:"Id,omitempty"`
    20  
    21  	// name
    22  	// Required: true
    23  	Name string `json:"Name"`
    24  
    25  	// settings
    26  	// Required: true
    27  	Settings PluginSettings `json:"Settings"`
    28  
    29  	// tag
    30  	// Required: true
    31  	Tag string `json:"Tag"`
    32  }
    33  
    34  // PluginConfig The config of a plugin.
    35  // swagger:model PluginConfig
    36  type PluginConfig struct {
    37  
    38  	// args
    39  	// Required: true
    40  	Args PluginConfigArgs `json:"Args"`
    41  
    42  	// description
    43  	// Required: true
    44  	Description string `json:"Description"`
    45  
    46  	// documentation
    47  	// Required: true
    48  	Documentation string `json:"Documentation"`
    49  
    50  	// entrypoint
    51  	// Required: true
    52  	Entrypoint []string `json:"Entrypoint"`
    53  
    54  	// env
    55  	// Required: true
    56  	Env []PluginEnv `json:"Env"`
    57  
    58  	// interface
    59  	// Required: true
    60  	Interface PluginConfigInterface `json:"Interface"`
    61  
    62  	// linux
    63  	// Required: true
    64  	Linux PluginConfigLinux `json:"Linux"`
    65  
    66  	// mounts
    67  	// Required: true
    68  	Mounts []PluginMount `json:"Mounts"`
    69  
    70  	// network
    71  	// Required: true
    72  	Network PluginConfigNetwork `json:"Network"`
    73  
    74  	// user
    75  	User PluginConfigUser `json:"User,omitempty"`
    76  
    77  	// workdir
    78  	// Required: true
    79  	Workdir string `json:"Workdir"`
    80  }
    81  
    82  // PluginConfigArgs plugin config args
    83  // swagger:model PluginConfigArgs
    84  type PluginConfigArgs struct {
    85  
    86  	// description
    87  	// Required: true
    88  	Description string `json:"Description"`
    89  
    90  	// name
    91  	// Required: true
    92  	Name string `json:"Name"`
    93  
    94  	// settable
    95  	// Required: true
    96  	Settable []string `json:"Settable"`
    97  
    98  	// value
    99  	// Required: true
   100  	Value []string `json:"Value"`
   101  }
   102  
   103  // PluginConfigInterface The interface between Docker and the plugin
   104  // swagger:model PluginConfigInterface
   105  type PluginConfigInterface struct {
   106  
   107  	// socket
   108  	// Required: true
   109  	Socket string `json:"Socket"`
   110  
   111  	// types
   112  	// Required: true
   113  	Types []PluginInterfaceType `json:"Types"`
   114  }
   115  
   116  // PluginConfigLinux plugin config linux
   117  // swagger:model PluginConfigLinux
   118  type PluginConfigLinux struct {
   119  
   120  	// capabilities
   121  	// Required: true
   122  	Capabilities []string `json:"Capabilities"`
   123  
   124  	// device creation
   125  	// Required: true
   126  	DeviceCreation bool `json:"DeviceCreation"`
   127  
   128  	// devices
   129  	// Required: true
   130  	Devices []PluginDevice `json:"Devices"`
   131  }
   132  
   133  // PluginConfigNetwork plugin config network
   134  // swagger:model PluginConfigNetwork
   135  type PluginConfigNetwork struct {
   136  
   137  	// type
   138  	// Required: true
   139  	Type string `json:"Type"`
   140  }
   141  
   142  // PluginConfigUser plugin config user
   143  // swagger:model PluginConfigUser
   144  type PluginConfigUser struct {
   145  
   146  	// g ID
   147  	GID uint32 `json:"GID,omitempty"`
   148  
   149  	// UID
   150  	UID uint32 `json:"UID,omitempty"`
   151  }
   152  
   153  // PluginSettings Settings that can be modified by users.
   154  // swagger:model PluginSettings
   155  type PluginSettings struct {
   156  
   157  	// args
   158  	// Required: true
   159  	Args []string `json:"Args"`
   160  
   161  	// devices
   162  	// Required: true
   163  	Devices []PluginDevice `json:"Devices"`
   164  
   165  	// env
   166  	// Required: true
   167  	Env []string `json:"Env"`
   168  
   169  	// mounts
   170  	// Required: true
   171  	Mounts []PluginMount `json:"Mounts"`
   172  }