(cliConnection plugin.CliConnection, args []string)
| 19 | } |
| 20 | |
| 21 | func (c *Test1) Run(cliConnection plugin.CliConnection, args []string) { |
| 22 | if args[0] == "new-api" { |
| 23 | token, _ := cliConnection.AccessToken() |
| 24 | fmt.Println("Access Token:", token) |
| 25 | fmt.Println("") |
| 26 | |
| 27 | app, err := cliConnection.GetApp("test_app") |
| 28 | fmt.Println("err for test_app", err) |
| 29 | fmt.Println("test_app is: ", app) |
| 30 | |
| 31 | hasOrg, _ := cliConnection.HasOrganization() |
| 32 | fmt.Println("Has Organization Targeted:", hasOrg) |
| 33 | currentOrg, _ := cliConnection.GetCurrentOrg() |
| 34 | fmt.Println("Current Org:", currentOrg) |
| 35 | org, _ := cliConnection.GetOrg(currentOrg.Name) |
| 36 | fmt.Println(currentOrg.Name, " Org:", org) |
| 37 | orgs, _ := cliConnection.GetOrgs() |
| 38 | fmt.Println("Orgs:", orgs) |
| 39 | hasSpace, _ := cliConnection.HasSpace() |
| 40 | fmt.Println("Has Space Targeted:", hasSpace) |
| 41 | currentSpace, _ := cliConnection.GetCurrentSpace() |
| 42 | fmt.Println("Current space:", currentSpace) |
| 43 | space, _ := cliConnection.GetSpace(currentSpace.Name) |
| 44 | fmt.Println("Space:", space) |
| 45 | spaces, _ := cliConnection.GetSpaces() |
| 46 | fmt.Println("Spaces:", spaces) |
| 47 | loggregator, _ := cliConnection.LoggregatorEndpoint() |
| 48 | fmt.Println("Loggregator Endpoint:", loggregator) |
| 49 | dopplerEndpoint, _ := cliConnection.DopplerEndpoint() |
| 50 | fmt.Println("Doppler Endpoint:", dopplerEndpoint) |
| 51 | |
| 52 | user, _ := cliConnection.Username() |
| 53 | fmt.Println("Current user:", user) |
| 54 | userGUID, _ := cliConnection.UserGuid() |
| 55 | fmt.Println("Current user guid:", userGUID) |
| 56 | email, _ := cliConnection.UserEmail() |
| 57 | fmt.Println("Current user email:", email) |
| 58 | |
| 59 | hasAPI, _ := cliConnection.HasAPIEndpoint() |
| 60 | fmt.Println("Has API Endpoint:", hasAPI) |
| 61 | api, _ := cliConnection.ApiEndpoint() |
| 62 | fmt.Println("Current api:", api) |
| 63 | version, _ := cliConnection.ApiVersion() |
| 64 | fmt.Println("Current api version:", version) |
| 65 | |
| 66 | loggedIn, _ := cliConnection.IsLoggedIn() |
| 67 | fmt.Println("Is Logged In:", loggedIn) |
| 68 | isSSLDisabled, _ := cliConnection.IsSSLDisabled() |
| 69 | fmt.Println("Is SSL Disabled:", isSSLDisabled) |
| 70 | } else if args[0] == "test_1_cmd1" { |
| 71 | theFirstCmd() |
| 72 | } else if args[0] == "test_1_cmd2" { |
| 73 | theSecondCmd() |
| 74 | } else if args[0] == "CLI-MESSAGE-UNINSTALL" { |
| 75 | uninstalling() |
| 76 | } |
| 77 | } |
| 78 |
nothing calls this directly
no test coverage detected