client

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	RefreshAccessToken() error
	GetAppEnv(appGuid string) (*Env, error)
	GetSpaceByName(orgGuid string, name string) (*gocfclient.Space, error)
	GetOrgByName(name string) (*gocfclient.Org, error)
	GetAppByName(orgGuid, spaceGuid, appName string) (*gocfclient.App, error)
	GetServiceBindings(filters ...string) (map[string]*gocfclient.ServiceBinding, error)
	GetServiceInstances(filters ...string) (map[string]*gocfclient.ServiceInstance, error)
	BindService(appGuid string, serviceInstanceGuid string, parameters map[string]interface{}) (*Credentials, error)
	UploadStaticAppBits(appGuid string) error
	DestroyApp(appGuid string) error
	CreateApp(name string, spaceGUID string) (guid string, err error)
	StartApp(appGuid string) error
	PollForAppState(appGuid string, state string, maxRetries int) error
	AppSSHEndpoint() string
	AppSSHHostKeyFingerprint() string
	SSHCode() (string, error)
}

Client ...

func NewClient

func NewClient(api string, token string, insecure bool, cipherSuites []uint16, minTLSVersion uint16) (Client, error)

type Credentials

type Credentials map[string]interface{}

func (*Credentials) Database added in v0.0.5

func (c *Credentials) Database() string

func (*Credentials) Fprint added in v0.1.0

func (c *Credentials) Fprint(writer io.Writer, indent string)

func (*Credentials) Host

func (c *Credentials) Host() string

func (*Credentials) IsTLSEnabled added in v0.0.5

func (c *Credentials) IsTLSEnabled() bool

func (*Credentials) JDBCURI added in v0.0.5

func (c *Credentials) JDBCURI() string

func (*Credentials) Password

func (c *Credentials) Password() string

func (*Credentials) Port

func (c *Credentials) Port() int64

func (*Credentials) SetAddress added in v0.0.5

func (c *Credentials) SetAddress(host string, port int64)

func (*Credentials) URI added in v0.0.5

func (c *Credentials) URI() string

func (*Credentials) Username

func (c *Credentials) Username() string

type Env

type Env struct {
	SystemEnv *SystemEnv `json:"system_env_json"`
}

type SystemEnv

type SystemEnv struct {
	VcapServices map[string][]*VcapService `json:"VCAP_SERVICES"`
}

type VcapService

type VcapService struct {
	Name         string      `json:"name"`
	Credentials  Credentials `json:"credentials"`
	InstanceName string      `json:"instance_name"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL