/
commands.go
59 lines (58 loc) · 2.18 KB
/
commands.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package client
// Command returns a cli command handler if one exists
func (cli *DockerCli) Command(name string) func(...string) error {
return map[string]func(...string) error{
"attach": cli.CmdAttach,
"build": cli.CmdBuild,
"commit": cli.CmdCommit,
"cp": cli.CmdCp,
"create": cli.CmdCreate,
"diff": cli.CmdDiff,
"events": cli.CmdEvents,
"exec": cli.CmdExec,
"export": cli.CmdExport,
"history": cli.CmdHistory,
"images": cli.CmdImages,
"import": cli.CmdImport,
"info": cli.CmdInfo,
"inspect": cli.CmdInspect,
"kill": cli.CmdKill,
"load": cli.CmdLoad,
"login": cli.CmdLogin,
"logout": cli.CmdLogout,
"logs": cli.CmdLogs,
"network": cli.CmdNetwork,
"network create": cli.CmdNetworkCreate,
"network connect": cli.CmdNetworkConnect,
"network disconnect": cli.CmdNetworkDisconnect,
"network inspect": cli.CmdNetworkInspect,
"network ls": cli.CmdNetworkLs,
"network rm": cli.CmdNetworkRm,
"pause": cli.CmdPause,
"port": cli.CmdPort,
"ps": cli.CmdPs,
"pull": cli.CmdPull,
"push": cli.CmdPush,
"rename": cli.CmdRename,
"restart": cli.CmdRestart,
"rm": cli.CmdRm,
"rmi": cli.CmdRmi,
"run": cli.CmdRun,
"save": cli.CmdSave,
"search": cli.CmdSearch,
"start": cli.CmdStart,
"stats": cli.CmdStats,
"stop": cli.CmdStop,
"tag": cli.CmdTag,
"top": cli.CmdTop,
"unpause": cli.CmdUnpause,
"update": cli.CmdUpdate,
"version": cli.CmdVersion,
"volume": cli.CmdVolume,
"volume create": cli.CmdVolumeCreate,
"volume inspect": cli.CmdVolumeInspect,
"volume ls": cli.CmdVolumeLs,
"volume rm": cli.CmdVolumeRm,
"wait": cli.CmdWait,
}[name]
}