Versions in this module Expand all Collapse all v1 v1.1.0 Aug 14, 2015 Changes in this version + const DEFAULT_POLLING_THROTTLE + const JOB_FAILED + const JOB_FINISHED + var NewHttpClient = func(tr *http.Transport) HttpClientInterface + func NewTLSConfig(trustedCerts []tls.Certificate, disableSSL bool) (TLSConfig *tls.Config) + func PrepareRedirect(req *http.Request, via []*http.Request) error + func WrapNetworkErrors(host string, err error) error + type AsyncResource struct + Metadata struct{ ... } + type Gateway struct + Clock func() time.Time + PollingEnabled bool + PollingThrottle time.Duration + func NewCloudControllerGateway(config core_config.Reader, clock func() time.Time, ui terminal.UI) Gateway + func NewUAAGateway(config core_config.Reader, ui terminal.UI) Gateway + func (gateway *Gateway) AsyncTimeout() time.Duration + func (gateway *Gateway) SetTokenRefresher(auth tokenRefresher) + func (gateway *Gateway) SetTrustedCerts(certificates []tls.Certificate) + func (gateway Gateway) CreateResource(endpoint, apiUrl string, body io.ReadSeeker, resource ...interface{}) (apiErr error) + func (gateway Gateway) CreateResourceFromStruct(endpoint, url string, resource interface{}) error + func (gateway Gateway) DeleteResource(endpoint, apiUrl string) (apiErr error) + func (gateway Gateway) DeleteResourceSynchronously(endpoint, apiUrl string) (apiErr error) + func (gateway Gateway) GetResource(url string, resource interface{}) (err error) + func (gateway Gateway) ListPaginatedResources(target string, path string, resource interface{}, cb func(interface{}) bool) (apiErr error) + func (gateway Gateway) NewRequest(method, path, accessToken string, body io.ReadSeeker) (req *Request, apiErr error) + func (gateway Gateway) NewRequestForFile(method, fullUrl, accessToken string, body *os.File) (req *Request, apiErr error) + func (gateway Gateway) PerformPollingRequestForJSONResponse(endpoint string, request *Request, response interface{}, timeout time.Duration) (headers http.Header, apiErr error) + func (gateway Gateway) PerformRequest(request *Request) (rawResponse *http.Response, apiErr error) + func (gateway Gateway) PerformRequestForJSONResponse(request *Request, response interface{}) (headers http.Header, apiErr error) + func (gateway Gateway) PerformRequestForTextResponse(request *Request) (response string, headers http.Header, apiErr error) + func (gateway Gateway) UpdateResource(endpoint, apiUrl string, body io.ReadSeeker, resource ...interface{}) (apiErr error) + func (gateway Gateway) UpdateResourceFromStruct(endpoint, apiUrl string, resource interface{}) error + func (gateway Gateway) UpdateResourceSync(endpoint, apiUrl string, body io.ReadSeeker, resource ...interface{}) (apiErr error) + func (gateway Gateway) Warnings() []string + type HttpClientInterface interface + Do func(req *http.Request) (resp *http.Response, err error) + type JobResource struct + Entity struct{ ... } + type PaginatedResources struct + NextURL string + ResourcesBytes json.RawMessage + func NewPaginatedResources(exampleResource interface{}) PaginatedResources + func (this PaginatedResources) Resources() ([]interface{}, error) + type ProgressReader struct + func NewProgressReader(readSeeker io.ReadSeeker, ui terminal.UI, outputInterval time.Duration) *ProgressReader + func (progressReader *ProgressReader) Read(p []byte) (int, error) + func (progressReader *ProgressReader) Seek(offset int64, whence int) (int64, error) + func (progressReader *ProgressReader) SetTotalSize(size int64) + type Request struct + HttpReq *http.Request + SeekableBody io.ReadSeeker + type WarningProducer interface + Warnings func() []string + type WarningsCollector struct + func NewWarningsCollector(ui terminal.UI, warning_producers ...WarningProducer) (warnings_collector WarningsCollector) + func (warnings_collector WarningsCollector) PrintWarnings()