Documentation ¶
Index ¶
- Constants
- func PrepareRedirect(req *http.Request, via []*http.Request) error
- func Sanitize(input string) (sanitized string)
- func TLSConfigWithTrustedCerts(trustedCerts []tls.Certificate) *tls.Config
- type AsyncMetadata
- type AsyncResponse
- type Gateway
- func (gateway *Gateway) AddTrustedCerts(certificates []tls.Certificate)
- func (gateway Gateway) CreateResource(url, accessToken string, body io.ReadSeeker) (apiErr errors.Error)
- func (gateway Gateway) CreateResourceForResponse(url, accessToken string, body io.ReadSeeker, resource interface{}) (apiErr errors.Error)
- func (gateway Gateway) DeleteResource(url, accessToken string) (apiErr errors.Error)
- func (gateway Gateway) GetResource(url, accessToken string, resource interface{}) (apiErr errors.Error)
- func (gateway Gateway) ListPaginatedResources(target string, accessToken string, path string, resource interface{}, ...) (apiErr errors.Error)
- func (gateway Gateway) NewRequest(method, path, accessToken string, body io.ReadSeeker) (req *Request, apiErr errors.Error)
- func (gateway Gateway) PerformPollingRequestForJSONResponse(request *Request, response interface{}, timeout time.Duration) (headers http.Header, apiErr errors.Error)
- func (gateway Gateway) PerformRequest(request *Request) (apiErr errors.Error)
- func (gateway Gateway) PerformRequestForJSONResponse(request *Request, response interface{}) (headers http.Header, apiErr errors.Error)
- func (gateway Gateway) PerformRequestForResponse(request *Request) (rawResponse *http.Response, apiErr errors.Error)
- func (gateway Gateway) PerformRequestForResponseBytes(request *Request) (bytes []byte, headers http.Header, rawResponse *http.Response, ...)
- func (gateway Gateway) PerformRequestForTextResponse(request *Request) (response string, headers http.Header, apiErr errors.Error)
- func (gateway *Gateway) SetTokenRefresher(auth tokenRefresher)
- func (gateway Gateway) UpdateResource(url, accessToken string, body io.ReadSeeker) (apiErr errors.Error)
- func (gateway Gateway) UpdateResourceForResponse(url, accessToken string, body io.ReadSeeker, resource interface{}) (apiErr errors.Error)
- type JobEntity
- type JobResponse
- type PaginatedResources
- type Request
Constants ¶
View Source
const ( INVALID_TOKEN_CODE = "GATEWAY INVALID TOKEN CODE" 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 TLSConfigWithTrustedCerts ¶
func TLSConfigWithTrustedCerts(trustedCerts []tls.Certificate) *tls.Config
Types ¶
type AsyncMetadata ¶
type AsyncMetadata struct {
Url string
}
type AsyncResponse ¶
type AsyncResponse struct {
Metadata AsyncMetadata
}
type Gateway ¶
type Gateway struct { PollingEnabled bool PollingThrottle time.Duration // contains filtered or unexported fields }
func NewCloudControllerGateway ¶
func NewCloudControllerGateway() Gateway
func NewUAAGateway ¶
func NewUAAGateway() Gateway
func (*Gateway) AddTrustedCerts ¶
func (gateway *Gateway) AddTrustedCerts(certificates []tls.Certificate)
func (Gateway) CreateResource ¶
func (Gateway) CreateResourceForResponse ¶
func (Gateway) DeleteResource ¶
func (Gateway) GetResource ¶
func (Gateway) ListPaginatedResources ¶
func (Gateway) NewRequest ¶
func (Gateway) PerformPollingRequestForJSONResponse ¶
func (Gateway) PerformRequest ¶
func (Gateway) PerformRequestForJSONResponse ¶
func (Gateway) PerformRequestForResponse ¶
func (Gateway) PerformRequestForResponseBytes ¶
func (Gateway) PerformRequestForTextResponse ¶
func (*Gateway) SetTokenRefresher ¶
func (gateway *Gateway) SetTokenRefresher(auth tokenRefresher)
func (Gateway) UpdateResource ¶
func (Gateway) UpdateResourceForResponse ¶
type JobResponse ¶
type JobResponse struct {
Entity JobEntity
}
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)
Click to show internal directories.
Click to hide internal directories.