Skip to content

Commit 268ba48

Browse files
committed
[Clean] build lint error
1 parent 7c9fb31 commit 268ba48

File tree

2 files changed

+82
-5
lines changed

2 files changed

+82
-5
lines changed

plugin.go

Lines changed: 81 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ type PluginPrivilege struct {
2020
Value []string `json:"Value,omitempty" yaml:"Value,omitempty" toml:"Value,omitempty"`
2121
}
2222

23+
// InstallPluginOptions This is a TBD Comments.
24+
//
25+
// See https://goo.gl/kaOHGw for more details.
2326
type InstallPluginOptions struct {
2427
Remote string
2528
Name string
2629
Plugins []PluginPrivilege
2730
Context context.Context
2831
}
2932

30-
// ListContainers returns a slice of containers matching the given criteria.
33+
// InstallPlugins returns a slice of containers matching the given criteria.
3134
//
3235
// See https://goo.gl/kaOHGw for more details.
3336
func (c *Client) InstallPlugins(opts InstallPluginOptions, auth AuthConfiguration) (error) {
@@ -46,50 +49,80 @@ func (c *Client) InstallPlugins(opts InstallPluginOptions, auth AuthConfiguratio
4649
return nil
4750
}
4851

52+
// PluginSetting This is a TBD Comments.
53+
//
54+
// See https://goo.gl/kaOHGw for more details.
4955
type PluginSetting struct {
5056
Env []string `json:"Env,omitempty" yaml:"Env,omitempty" toml:"Env,omitempty"`
5157
Args []string `json:"Args,omitempty" yaml:"Args,omitempty" toml:"Args,omitempty"`
5258
Devices []string `json:"Devices,omitempty" yaml:"Devices,omitempty" toml:"Devices,omitempty"`
5359
}
5460

61+
// PluginInterface This is a TBD Comments.
62+
//
63+
// See https://goo.gl/kaOHGw for more details.
5564
type PluginInterface struct {
5665
Types []string `json:"Types,omitempty" yaml:"Types,omitempty" toml:"Types,omitempty"`
5766
Socket string `json:"Socket,omitempty" yaml:"Socket,omitempty" toml:"Socket,omitempty"`
5867
}
5968

69+
// PluginNetwork This is a TBD Comments.
70+
//
71+
// See https://goo.gl/kaOHGw for more details.
6072
type PluginNetwork struct {
6173
Type string `json:"Type,omitempty" yaml:"Type,omitempty" toml:"Type,omitempty"`
6274
}
75+
76+
// PluginLinux This is a TBD Comments.
77+
//
78+
// See https://goo.gl/kaOHGw for more details.
6379
type PluginLinux struct {
6480
Capabilities []string `json:"Capabilities,omitempty" yaml:"Capabilities,omitempty" toml:"Capabilities,omitempty"`
6581
AllowAllDevices bool `json:"AllowAllDevices,omitempty" yaml:"AllowAllDevices,omitempty" toml:"AllowAllDevices,omitempty"`
6682
Devices []PluginLinuxDevices `json:"Devices,omitempty" yaml:"Devices,omitempty" toml:"Devices,omitempty"`
6783
}
6884

85+
// PluginLinuxDevices This is a TBD Comments.
86+
//
87+
// See https://goo.gl/kaOHGw for more details.
6988
type PluginLinuxDevices struct {
7089
Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"`
7190
Description string `json:"Documentation,omitempty" yaml:"Documentation,omitempty" toml:"Documentation,omitempty"`
7291
Settable []string `json:"Settable,omitempty" yaml:"Settable,omitempty" toml:"Settable,omitempty"`
7392
Path string `json:"Path,omitempty" yaml:"Path,omitempty" toml:"Path,omitempty"`
7493
}
94+
95+
// PluginEnv This is a TBD Comments.
96+
//
97+
// See https://goo.gl/kaOHGw for more details.
7598
type PluginEnv struct {
7699
Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"`
77100
Description string `json:"Documentation,omitempty" yaml:"Documentation,omitempty" toml:"Documentation,omitempty"`
78101
Settable []string `json:"Settable,omitempty" yaml:"Settable,omitempty" toml:"Settable,omitempty"`
79102
Value string `json:"Value,omitempty" yaml:"Value,omitempty" toml:"Value,omitempty"`
80103
}
104+
105+
// PluginArgs This is a TBD Comments.
106+
//
107+
// See https://goo.gl/kaOHGw for more details.
81108
type PluginArgs struct {
82109
Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"`
83110
Description string `json:"Documentation,omitempty" yaml:"Documentation,omitempty" toml:"Documentation,omitempty"`
84111
Settable []string `json:"Settable,omitempty" yaml:"Settable,omitempty" toml:"Settable,omitempty"`
85112
Value []string `json:"Value,omitempty" yaml:"Value,omitempty" toml:"Value,omitempty"`
86113
}
87114

115+
// PluginUser This is a TBD Comments.
116+
//
117+
// See https://goo.gl/kaOHGw for more details.
88118
type PluginUser struct {
89119
UID int32 `json:"UID,omitempty" yaml:"UID,omitempty" toml:"UID,omitempty"`
90120
GID int32 `json:"GID,omitempty" yaml:"GID,omitempty" toml:"GID,omitempty"`
91121
}
92122

123+
// PluginConfig This is a TBD Comments.
124+
//
125+
// See https://goo.gl/kaOHGw for more details.
93126
type PluginConfig struct {
94127
Description string `json:"Description,omitempty" yaml:"Description,omitempty" toml:"Description,omitempty"`
95128
Documentation string
@@ -99,21 +132,27 @@ type PluginConfig struct {
99132
User PluginUser `json:"User,omitempty" yaml:"User,omitempty" toml:"User,omitempty"`
100133
Network PluginNetwork `json:"Network,omitempty" yaml:"Network,omitempty" toml:"Network,omitempty"`
101134
Linux PluginLinux `json:"Linux,omitempty" yaml:"Linux,omitempty" toml:"Linux,omitempty"`
102-
PropagatedMount string `json:"Interface,omitempty" yaml:"Interface,omitempty" toml:"Interface,omitempty"`
135+
PropagatedMount string `json:"PropagatedMount,omitempty" yaml:"PropagatedMount,omitempty" toml:"PropagatedMount,omitempty"`
103136
Mounts []Mount `json:"Mounts,omitempty" yaml:"Mounts,omitempty" toml:"Mounts,omitempty"`
104137
Env []PluginEnv `json:"Env,omitempty" yaml:"Env,omitempty" toml:"Env,omitempty"`
105138
Args PluginArgs `json:"Args,omitempty" yaml:"Args,omitempty" toml:"Args,omitempty"`
106139
}
107140

141+
// PluginDetail This is a TBD Comments.
142+
//
143+
// See https://goo.gl/kaOHGw for more details.
108144
type PluginDetail struct {
109-
Id string `json:"Id,omitempty" yaml:"Id,omitempty" toml:"Id,omitempty"`
145+
ID string `json:"Id,omitempty" yaml:"Id,omitempty" toml:"Id,omitempty"`
110146
Name string `json:"Name,omitempty" yaml:"Name,omitempty" toml:"Name,omitempty"`
111147
Tag string `json:"Tag,omitempty" yaml:"Tag,omitempty" toml:"Tag,omitempty"`
112148
Active bool `json:"Active,omitempty" yaml:"Active,omitempty" toml:"Active,omitempty"`
113149
Settings PluginSetting `json:"Settings,omitempty" yaml:"Settings,omitempty" toml:"Settings,omitempty"`
114150
Config Config `json:"Config,omitempty" yaml:"Config,omitempty" toml:"Config,omitempty"`
115151
}
116152

153+
// ListPlugins This is a TBD Comments.
154+
//
155+
// See https://goo.gl/kaOHGw for more details.
117156
func (c *Client) ListPlugins()([]PluginDetail, error) {
118157
resp, err := c.do("GET", "/plugins",doOptions{})
119158
if err != nil {
@@ -127,7 +166,9 @@ func (c *Client) ListPlugins()([]PluginDetail, error) {
127166
return pluginDetails, nil
128167
}
129168

130-
169+
// GetPluginPrivileges This is a TBD Comments.
170+
//
171+
// See https://goo.gl/kaOHGw for more details.
131172
func (c *Client) GetPluginPrivileges(name string)([]PluginPrivilege, error) {
132173
resp, err := c.do("GET", "/plugins/privileges?"+name,doOptions{})
133174
if err != nil {
@@ -141,6 +182,9 @@ func (c *Client) GetPluginPrivileges(name string)([]PluginPrivilege, error) {
141182
return pluginPrivileges, nil
142183
}
143184

185+
// RemovePluginOptions This is a TBD Comments.
186+
//
187+
// See https://goo.gl/kaOHGw for more details.
144188
type RemovePluginOptions struct {
145189
// The ID of the container.
146190
Name string `qs:"-"`
@@ -151,6 +195,9 @@ type RemovePluginOptions struct {
151195
Context context.Context
152196
}
153197

198+
// RemovePlugin This is a TBD Comments.
199+
//
200+
// See https://goo.gl/kaOHGw for more details.
154201
func (c *Client) RemovePlugin(opts RemovePluginOptions)(*PluginDetail, error) {
155202
path := "/plugins/"+opts.Name+"?"+queryString(opts)
156203
resp, err := c.do("DELETE", path, doOptions{context: opts.Context})
@@ -172,7 +219,9 @@ func (c *Client) RemovePlugin(opts RemovePluginOptions)(*PluginDetail, error) {
172219
return &pluginDetail, nil
173220
}
174221

175-
222+
// EnablePluginOptions This is a TBD Comments.
223+
//
224+
// See https://goo.gl/kaOHGw for more details.
176225
type EnablePluginOptions struct {
177226
// The ID of the container.
178227
Name string `qs:"-"`
@@ -181,6 +230,9 @@ type EnablePluginOptions struct {
181230
Context context.Context
182231
}
183232

233+
// EnablePlugin This is a TBD Comments.
234+
//
235+
// See https://goo.gl/kaOHGw for more details.
184236
func (c *Client) EnablePlugin(opts EnablePluginOptions)(error) {
185237
path := "/plugins/"+opts.Name+"/enable?"+queryString(opts)
186238
resp, err := c.do("POST", path, doOptions{context: opts.Context})
@@ -192,13 +244,19 @@ func (c *Client) EnablePlugin(opts EnablePluginOptions)(error) {
192244
return nil
193245
}
194246

247+
// DisablePluginOptions This is a TBD Comments.
248+
//
249+
// See https://goo.gl/kaOHGw for more details.
195250
type DisablePluginOptions struct {
196251
// The ID of the container.
197252
Name string `qs:"-"`
198253

199254
Context context.Context
200255
}
201256

257+
// DisablePlugin This is a TBD Comments.
258+
//
259+
// See https://goo.gl/kaOHGw for more details.
202260
func (c *Client) DisablePlugin(opts DisablePluginOptions)(error) {
203261
path := "/plugins/"+opts.Name+"/disable"
204262
resp, err := c.do("POST", path, doOptions{context: opts.Context})
@@ -210,6 +268,9 @@ func (c *Client) DisablePlugin(opts DisablePluginOptions)(error) {
210268
return nil
211269
}
212270

271+
// CreatePluginOptions This is a TBD Comments.
272+
//
273+
// See https://goo.gl/kaOHGw for more details.
213274
type CreatePluginOptions struct {
214275
// The Name of the container.
215276
Name string `qs:"name"`
@@ -219,6 +280,9 @@ type CreatePluginOptions struct {
219280
Context context.Context
220281
}
221282

283+
// CreatePlugin This is a TBD Comments.
284+
//
285+
// See https://goo.gl/kaOHGw for more details.
222286
func (c *Client) CreatePlugin(opts CreatePluginOptions)(string,error) {
223287
path := "/plugins/create?"+queryString(opts.Name)
224288
resp, err := c.do("POST", path, doOptions{
@@ -235,13 +299,19 @@ func (c *Client) CreatePlugin(opts CreatePluginOptions)(string,error) {
235299
return string(containerNameBytes),nil
236300
}
237301

302+
// PushPluginOptions This is a TBD Comments.
303+
//
304+
// See https://goo.gl/kaOHGw for more details.
238305
type PushPluginOptions struct {
239306
// The Name of the container.
240307
Name string
241308

242309
Context context.Context
243310
}
244311

312+
// PushPlugin This is a TBD Comments.
313+
//
314+
// See https://goo.gl/kaOHGw for more details.
245315
func (c *Client) PushPlugin(opts PushPluginOptions)(error) {
246316
path := "/plugins/"+opts.Name+"/push"
247317
resp, err := c.do("POST", path, doOptions{context: opts.Context})
@@ -252,6 +322,9 @@ func (c *Client) PushPlugin(opts PushPluginOptions)(error) {
252322
return nil
253323
}
254324

325+
// ConfigurePluginOptions This is a TBD Comments.
326+
//
327+
// See https://goo.gl/kaOHGw for more details.
255328
type ConfigurePluginOptions struct {
256329
// The Name of the container.
257330
Name string `qs:"name"`
@@ -260,6 +333,9 @@ type ConfigurePluginOptions struct {
260333
Context context.Context
261334
}
262335

336+
// ConfigurePlugin This is a TBD Comments.
337+
//
338+
// See https://goo.gl/kaOHGw for more details.
263339
func (c *Client) ConfigurePlugin(opts ConfigurePluginOptions)(error) {
264340
path := "/plugins/"+opts.Name+"/set"
265341
resp, err := c.do("POST", path, doOptions{

plugins_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package docker

0 commit comments

Comments
 (0)