mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
69264beb40
Signed-off-by: Daniel Nephin <dnephin@docker.com>
54 lines
2 KiB
Go
54 lines
2 KiB
Go
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,
|
|
"wait": cli.CmdWait,
|
|
}[name]
|
|
}
|