client

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 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 struct {
	Verbose            bool
	CFClient           *gocfclient.Client
	ApiEndpoint        string
	InsecureSkipVerify bool
	Token              string
	Info               *gocfclient.Info
}

func NewClient

func NewClient(api string, token string, insecure bool) (*Client, error)

func (*Client) BindService

func (c *Client) BindService(
	appGuid string,
	serviceInstanceGuid string,
	parameters map[string]interface{},
) (Credentials, error)

func (*Client) CreateApp

func (c *Client) CreateApp(name string, spaceGUID string) (guid string, err error)

func (*Client) DestroyApp

func (c *Client) DestroyApp(appGuid string) error

func (*Client) GetAppEnv

func (c *Client) GetAppEnv(appGuid string) (*Env, error)

func (*Client) GetNewAccessToken

func (c *Client) GetNewAccessToken() (string, error)

func (*Client) GetOrgByName

func (c *Client) GetOrgByName(name string) (*gocfclient.Org, error)

func (*Client) GetServiceInstances

func (c *Client) GetServiceInstances(filters ...string) (map[string]*gocfclient.ServiceInstance, error)

func (*Client) GetSpaceByName

func (c *Client) GetSpaceByName(orgGuid string, name string) (*gocfclient.Space, error)

func (*Client) PollForAppState

func (c *Client) PollForAppState(appGuid string, state string, maxRetries int) error

func (*Client) SSHCode

func (c *Client) SSHCode() (string, error)

func (*Client) StartApp added in v0.0.9

func (c *Client) StartApp(appGuid string) error

func (*Client) UploadStaticAppBits

func (c *Client) UploadStaticAppBits(appGuid string) error

type Credentials

type Credentials interface {
	Host() string
	Port() int64
	Username() string
	Password() string
	Database() string
	URI() string
	JDBCURI() string
	SetAddress(host string, port int64)
	IsTLSEnabled() bool
}

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
	Credentials credentials
}

Jump to

Keyboard shortcuts

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