-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
45 lines (39 loc) · 970 Bytes
/
main.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
package main
import (
"github.com/simonleung8/cf-cli-plugin/all_apps"
"github.com/simonleung8/cf-cli-plugin/login"
"github.com/simonleung8/cf-cli-plugin/push"
"github.com/cloudfoundry/cli/plugin"
)
type IBM_Bluemix struct{}
func (c IBM_Bluemix) Run(args []string) {
if args[0] == "bluemix-login" {
login.Login()
} else if args[0] == "bluemix-push" {
push.Push()
} else if args[0] == "bluemix-all-apps" {
all_apps.Show()
}
}
func (c IBM_Bluemix) GetMetadata() plugin.PluginMetadata {
return plugin.PluginMetadata{
Name: "IBM_Bluemix",
Commands: []plugin.Command{
{
Name: "bluemix-login",
HelpText: "Options to login to Bosh-lite or Bluemix environment",
},
{
Name: "bluemix-push",
HelpText: "Clone source code from a Github repo and push to Cloud Foundry",
},
{
Name: "bluemix-all-apps",
HelpText: "List all apps from all spaces",
},
},
}
}
func main() {
plugin.Start(new(IBM_Bluemix))
}