Documentation ¶
Index ¶
- Constants
- func NewTLSConfig(trustedCerts []tls.Certificate, disableSSL bool) (TLSConfig *tls.Config)
- func NewWarningsCollector(ui terminal.UI, warning_producers ...WarningProducer) (warnings_collector warningsCollector)
- func PrepareRedirect(req *http.Request, via []*http.Request) error
- func Sanitize(input string) (sanitized string)
- func WrapNetworkErrors(host string, err error) error
- type AsyncResource
- type Gateway
- func (gateway Gateway) CreateResource(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)
- func (gateway Gateway) CreateResourceFromStruct(url string, resource interface{}) error
- func (gateway Gateway) DeleteResource(url 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) PerformPollingRequestForJSONResponse(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) SetTokenRefresher(auth tokenRefresher)
- func (gateway *Gateway) SetTrustedCerts(certificates []tls.Certificate)
- func (gateway Gateway) UpdateResource(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)
- func (gateway Gateway) UpdateResourceFromStruct(url string, resource interface{}) error
- func (gateway Gateway) UpdateResourceSync(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)
- func (gateway Gateway) Warnings() []string
- type JobResource
- type PaginatedResources
- type Request
- type WarningProducer
Constants ¶
View Source
const ( JOB_FINISHED = "finished" JOB_FAILED = "failed" DEFAULT_POLLING_THROTTLE = 5 * time.Second ASYNC_REQUEST_TIMEOUT = 20 * time.Second )
View Source
const (
PRIVATE_DATA_PLACEHOLDER = "[PRIVATE DATA HIDDEN]"
)
Variables ¶
This section is empty.
Functions ¶
func NewTLSConfig ¶
func NewTLSConfig(trustedCerts []tls.Certificate, disableSSL bool) (TLSConfig *tls.Config)
func NewWarningsCollector ¶
func NewWarningsCollector(ui terminal.UI, warning_producers ...WarningProducer) (warnings_collector warningsCollector)
func WrapNetworkErrors ¶
Types ¶
type AsyncResource ¶
type AsyncResource struct { Metadata struct { URL string } }
type Gateway ¶
type Gateway struct { PollingEnabled bool PollingThrottle time.Duration // contains filtered or unexported fields }
func NewCloudControllerGateway ¶
func NewCloudControllerGateway(config configuration.Reader) Gateway
func NewUAAGateway ¶
func NewUAAGateway(config configuration.Reader) Gateway
func (Gateway) CreateResource ¶
func (gateway Gateway) CreateResource(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)
func (Gateway) CreateResourceFromStruct ¶
func (Gateway) DeleteResource ¶
func (Gateway) GetResource ¶
func (Gateway) ListPaginatedResources ¶
func (Gateway) NewRequest ¶
func (Gateway) PerformPollingRequestForJSONResponse ¶
func (Gateway) PerformRequest ¶
func (Gateway) PerformRequestForJSONResponse ¶
func (Gateway) PerformRequestForTextResponse ¶
func (*Gateway) SetTokenRefresher ¶
func (gateway *Gateway) SetTokenRefresher(auth tokenRefresher)
func (*Gateway) SetTrustedCerts ¶
func (gateway *Gateway) SetTrustedCerts(certificates []tls.Certificate)
func (Gateway) UpdateResource ¶
func (gateway Gateway) UpdateResource(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)
func (Gateway) UpdateResourceFromStruct ¶
func (Gateway) UpdateResourceSync ¶
func (gateway Gateway) UpdateResourceSync(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)
type JobResource ¶
type PaginatedResources ¶
type PaginatedResources struct { NextURL string `json:"next_url"` ResourcesBytes json.RawMessage `json:"resources"` // contains filtered or unexported fields }
func NewPaginatedResources ¶
func NewPaginatedResources(exampleResource interface{}) PaginatedResources
func (PaginatedResources) Resources ¶
func (this PaginatedResources) Resources() ([]interface{}, error)
type WarningProducer ¶
type WarningProducer interface {
Warnings() []string
}
Click to show internal directories.
Click to hide internal directories.