{"modulePath":"github.com/dcarley/cf-cli","version":"v6.24.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cloudcontroller\n\nPackage cloudcontroller contains shared utilies between the V2 and V3 clients.\n\nThese sets of packages are still under development/pre-pre-pre...alpha. Use at your own risk! Functionality and design may change without warning.\n\nWhere are the clients?\n\nThese clients live in ccv2 and ccv3 packages. Each of them only works with the V2 and V3 api respectively.\n\n## Types\n\n```go\ntype APINotFoundError struct {\n\tURL string\n}\n```\nAPINotFoundError is returned when the API endpoint is not found.\n\n```go\nfunc (e APINotFoundError) Error() string\n```\n\n```go\ntype BadRequestError struct {\n\tMessage string\n}\n```\nBadRequestError is returned when the server says the request was bad.\n\n```go\nfunc (e BadRequestError) Error() string\n```\n\n```go\ntype CloudControllerConnection struct {\n\tHTTPClient *http.Client\n\tUserAgent  string\n}\n```\nCloudControllerConnection represents a connection to the Cloud Controller server.\n\n```go\nfunc NewConnection(config Config) *CloudControllerConnection\n```\nNewConnection returns a new CloudControllerConnection with provided configuration.\n\n```go\nfunc (connection *CloudControllerConnection) Make(request *http.Request, passedResponse *Response) error\n```\nMake performs the request and parses the response.\n\n```go\ntype Config struct {\n\tDialTimeout       time.Duration\n\tSkipSSLValidation bool\n}\n```\nConfig is for configuring a CloudControllerConnection.\n\n```go\ntype Connection interface {\n\tMake(request *http.Request, passedResponse *Response) error\n}\n```\nConnection creates and executes http requests\n\n```go\ntype ForbiddenError struct {\n\tMessage string\n}\n```\nForbiddenError is returned when the client is forbidden from executing the request.\n\n```go\nfunc (e ForbiddenError) Error() string\n```\n\n```go\ntype InvalidAuthTokenError struct {\n\tMessage string\n}\n```\nInvalidAuthTokenError is returned when the client has an invalid authorization header.\n\n```go\nfunc (e InvalidAuthTokenError) Error() string\n```\n\n```go\ntype NotFoundError struct {\n\tMessage string\n}\n```\nNotFoundError wraps a generic 404 error.\n\n```go\nfunc (e NotFoundError) Error() string\n```\n\n```go\ntype RawHTTPStatusError struct {\n\tStatusCode  int\n\tRawResponse []byte\n\tRequestIDs  []string\n}\n```\nRawHTTPStatusError represents any response with a 4xx or 5xx status code.\n\n```go\nfunc (r RawHTTPStatusError) Error() string\n```\n\n```go\ntype RequestError struct {\n\tErr error\n}\n```\nRequestError represents a generic error encountered while performing the HTTP request. This generic error occurs before a HTTP response is obtained.\n\n```go\nfunc (e RequestError) Error() string\n```\n\n```go\ntype ResourceNotFoundError struct {\n\tMessage string\n}\n```\nResourceNotFoundError is returned when the client requests a resource that does not exist or does not have permissions to see.\n\n```go\nfunc (e ResourceNotFoundError) Error() string\n```\n\n```go\ntype Response struct {\n\t// Result represents the resource entity type that is expected in the\n\t// response JSON.\n\tResult interface{}\n\n\t// RawResponse represents the response body.\n\tRawResponse []byte\n\n\t// Warnings represents warnings parsed from the custom warnings headers of a\n\t// Cloud Controller response.\n\tWarnings []string\n\n\t// HTTPResponse represents the HTTP response object.\n\tHTTPResponse *http.Response\n}\n```\nResponse represents a Cloud Controller response object.\n\n```go\ntype SSLValidationHostnameError struct {\n\tMessage string\n}\n```\nSSLValidationHostnameError replaces x509.HostnameError when the server has SSL certificate that does not match the hostname.\n\n```go\nfunc (e SSLValidationHostnameError) Error() string\n```\n\n```go\ntype ServiceUnavailableError struct {\n\tMessage string\n}\n```\nServiceUnavailableError wraps a http 503 error.\n\n```go\nfunc (e ServiceUnavailableError) Error() string\n```\n\n```go\ntype UnauthorizedError struct {\n\tMessage string\n}\n```\nUnauthorizedError is returned when the client does not have the correct permissions to execute the request.\n\n```go\nfunc (e UnauthorizedError) Error() string\n```\n\n```go\ntype UnknownObjectInListError struct {\n\tExpected   interface{}\n\tUnexpected interface{}\n}\n```\nUnknownObjectInListError is returned when iterating through a paginated list. Assuming tests are written for the paginated function, this should be impossible to get.\n\n```go\nfunc (e UnknownObjectInListError) Error() string\n```\n\n```go\ntype UnprocessableEntityError struct {\n\tMessage string\n}\n```\nUnprocessableEntityError is returned when the request cannot be processed by the cloud controller.\n\n```go\nfunc (e UnprocessableEntityError) Error() string\n```\n\n```go\ntype UnverifiedServerError struct {\n\tURL string\n}\n```\nUnverifiedServerError replaces x509.UnknownAuthorityError when the server has SSL but the client is unable to verify it's certificate\n\n```go\nfunc (e UnverifiedServerError) Error() string\n```\n\n","path":"github.com/dcarley/cf-cli/api/cloudcontroller","name":"cloudcontroller","synopsis":"Package cloudcontroller contains shared utilies between the V2 and V3 clients.","isRedistributable":true}
