-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.go
70 lines (67 loc) · 1.49 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
60
61
62
63
64
65
66
67
68
69
70
package main
import (
"github.com/mitchellh/cli"
"github.com/pragkent/aliyun-disk/command"
)
func Commands(meta *command.Meta) map[string]cli.CommandFactory {
return map[string]cli.CommandFactory{
"init": func() (cli.Command, error) {
return &command.InitCommand{
Meta: *meta,
}, nil
},
"attach": func() (cli.Command, error) {
return &command.AttachCommand{
Meta: *meta,
}, nil
},
"isattached": func() (cli.Command, error) {
return &command.IsAttachedCommand{
Meta: *meta,
}, nil
},
"detach": func() (cli.Command, error) {
return &command.DetachCommand{
Meta: *meta,
}, nil
},
"mountdevice": func() (cli.Command, error) {
return &command.MountDeviceCommand{
Meta: *meta,
}, nil
},
"unmountdevice": func() (cli.Command, error) {
return &command.UnmountDeviceCommand{
Meta: *meta,
}, nil
},
"mount": func() (cli.Command, error) {
return &command.MountCommand{
Meta: *meta,
}, nil
},
"unmount": func() (cli.Command, error) {
return &command.UnmountCommand{
Meta: *meta,
}, nil
},
"waitforattach": func() (cli.Command, error) {
return &command.WaitForAttachCommand{
Meta: *meta,
}, nil
},
"getvolumename": func() (cli.Command, error) {
return &command.GetVolumeNameCommand{
Meta: *meta,
}, nil
},
"version": func() (cli.Command, error) {
return &command.VersionCommand{
Meta: *meta,
Version: Version,
Revision: GitCommit,
Name: Name,
}, nil
},
}
}