Slide 34
Slide 34 text
CliConnectionのinterface(新)
https://github.com/cloudfoundry/cli/tree/master/plugin_examples/call_cli_cmd/main
v6.11.2の場合はpluginを作る際によく使われる値を取得するための
interfaceが追加された
type CliConnection interface {
CliCommandWithoutTerminalOutput(args ...string) ([]string, error)
CliCommand(args ...string) ([]string, error)
GetCurrentOrg() (plugin_models.Organization, error)
GetCurrentSpace() (plugin_models.Space, error)
Username() (string, error)
UserGuid() (string, error)
UserEmail() (string, error)
IsLoggedIn() (bool, error)
IsSSLDisabled() (bool, error)
HasOrganization() (bool, error)
HasSpace() (bool, error)
ApiEndpoint() (string, error)
ApiVersion() (string, error)
HasAPIEndpoint() (bool, error)
LoggregatorEndpoint() (string, error)
DopplerEndpoint() (string, error)
AccessToken() (string, error)
}