Versions in this module Expand all Collapse all v1 v1.0.0 Jun 27, 2018 Changes in this version + const ServiceKeyName + const SleepTime + func NewApiClient(httpClient HttpWrapper) *apiClient + func NewCfService(apiClient ApiClient, runner SshRunner, waiter PortWaiter, ...) *cfService + func NewRequestDumper(osWrapper OsWrapper, writer io.Writer) *conditionalRequestDumper + type ApiClient interface + CreateServiceKey func(cliConnection plugin.CliConnection, serviceInstanceGuid string, keyName string) (pluginModels.ServiceKey, error) + GetService func(cliConnection plugin.CliConnection, spaceGuid string, name string) (pluginModels.ServiceInstance, error) + GetServiceKey func(cliConnection plugin.CliConnection, serviceInstanceGuid string, keyName string) (key pluginModels.ServiceKey, found bool, err error) + GetStartedApps func(cliConnection plugin.CliConnection) ([]sdkModels.GetAppsModel, error) + type BindingResult struct + Bindings []pluginModels.ServiceBinding + Err error + type CfService interface + GetService func(connection plugin.CliConnection, name string) (PsqlService, error) + GetStartedApps func(cliConnection plugin.CliConnection) ([]sdkModels.GetAppsModel, error) + OpenSshTunnel func(cliConnection plugin.CliConnection, toService PsqlService, ...) + type CliConfig struct + AccessToken string + ApiEndpoint string + SslDisabled bool + type DefaultLocaleReader struct + func (self *DefaultLocaleReader) Locale() string + type ExecWrapper interface + LookPath func(file string) (string, error) + Run func(*exec.Cmd) error + func NewExecWrapper() ExecWrapper + type HttpClientFactory interface + NewClient func(sslDisabled bool) *http.Client + func NewHttpClientFactory() HttpClientFactory + type HttpWrapper interface + Get func(endpoint string, accessToken string, skipSsl bool) ([]byte, error) + Post func(url string, body io.Reader, accessToken string, sslDisabled bool) ([]byte, error) + func NewHttpWrapper(factory HttpClientFactory, requestDumper net.RequestDumperInterface) HttpWrapper + type NetWrapper interface + Close func(conn net.Conn) error + Dial func(network, address string) (net.Conn, error) + func NewNetWrapper() NetWrapper + type OsWrapper interface + LookupEnv func(key string) (string, bool) + func NewOsWrapper() OsWrapper + type PluginConf struct + CfService CfService + Err io.Writer + In io.Reader + Out io.Writer + PortFinder PortFinder + PsqlRunner PsqlRunner + type PortFinder interface + GetPort func() int + func NewPortFinder() PortFinder + type PortWaiter interface + WaitUntilOpen func(localPort int) + func NewPortWaiter(netWrapper NetWrapper) PortWaiter + type PsqlPlugin struct + CfService CfService + Err io.Writer + In io.Reader + Out io.Writer + PortFinder PortFinder + PsqlRunner PsqlRunner + func NewPsqlPlugin(conf PluginConf) *PsqlPlugin + func (self *PsqlPlugin) FormatUsage() string + func (self *PsqlPlugin) GetExitCode() int + func (self *PsqlPlugin) GetMetadata() plugin.PluginMetadata + func (self *PsqlPlugin) Run(cliConnection plugin.CliConnection, args []string) + type PsqlRunner interface + RunPsql func(hostname string, port int, dbName string, username string, password string, ...) error + func NewPsqlRunner(execWrapper ExecWrapper) PsqlRunner + type PsqlService struct + DbName string + Hostname string + Name string + Password string + Port string + Username string + type RandWrapper interface + Intn func(n int) int + func NewRandWrapper() RandWrapper + type ServiceKeyRequest struct + Name string + ServiceInstanceGuid string + type SshRunner interface + OpenSshTunnel func(cliConnection plugin.CliConnection, toService PsqlService, throughApp string, ...) + func NewSshRunner() SshRunner + type StartedAppsResult struct + Apps []plugin_models.GetAppsModel + Err error