{"modulePath":"code.cloudfoundry.org/cli-sapi","version":"v6.1.1+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package net\n\n## Constants\n\n```go\nconst (\n\tJOB_FINISHED             = \"finished\"\n\tJOB_FAILED               = \"failed\"\n\tDEFAULT_POLLING_THROTTLE = 5 * time.Second\n\tASYNC_REQUEST_TIMEOUT    = 20 * time.Second\n)\n```\n\n```go\nconst (\n\tPRIVATE_DATA_PLACEHOLDER = \"[PRIVATE DATA HIDDEN]\"\n)\n```\n\n## Functions\n\n```go\nfunc NewTLSConfig(trustedCerts []tls.Certificate, disableSSL bool) (TLSConfig *tls.Config)\n```\n\n```go\nfunc NewWarningsCollector(ui terminal.UI, warning_producers ...WarningProducer) (warnings_collector warningsCollector)\n```\n\n```go\nfunc PrepareRedirect(req *http.Request, via []*http.Request) error\n```\n\n```go\nfunc Sanitize(input string) (sanitized string)\n```\n\n```go\nfunc WrapNetworkErrors(host string, err error) error\n```\n\n## Types\n\n```go\ntype AsyncResource struct {\n\tMetadata struct {\n\t\tURL string\n\t}\n}\n```\n\n```go\ntype Gateway struct {\n\tPollingEnabled  bool\n\tPollingThrottle time.Duration\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudControllerGateway(config configuration.Reader) Gateway\n```\n\n```go\nfunc NewUAAGateway(config configuration.Reader) Gateway\n```\n\n```go\nfunc (gateway Gateway) CreateResource(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)\n```\n\n```go\nfunc (gateway Gateway) CreateResourceFromStruct(url string, resource interface{}) error\n```\n\n```go\nfunc (gateway Gateway) DeleteResource(url string) (apiErr error)\n```\n\n```go\nfunc (gateway Gateway) GetResource(url string, resource interface{}) (err error)\n```\n\n```go\nfunc (gateway Gateway) ListPaginatedResources(target string,\n\tpath string,\n\tresource interface{},\n\tcb func(interface{}) bool) (apiErr error)\n```\n\n```go\nfunc (gateway Gateway) NewRequest(method, path, accessToken string, body io.ReadSeeker) (req *Request, apiErr error)\n```\n\n```go\nfunc (gateway Gateway) PerformPollingRequestForJSONResponse(request *Request, response interface{}, timeout time.Duration) (headers http.Header, apiErr error)\n```\n\n```go\nfunc (gateway Gateway) PerformRequest(request *Request) (rawResponse *http.Response, apiErr error)\n```\n\n```go\nfunc (gateway Gateway) PerformRequestForJSONResponse(request *Request, response interface{}) (headers http.Header, apiErr error)\n```\n\n```go\nfunc (gateway Gateway) PerformRequestForTextResponse(request *Request) (response string, headers http.Header, apiErr error)\n```\n\n```go\nfunc (gateway *Gateway) SetTokenRefresher(auth tokenRefresher)\n```\n\n```go\nfunc (gateway *Gateway) SetTrustedCerts(certificates []tls.Certificate)\n```\n\n```go\nfunc (gateway Gateway) UpdateResource(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)\n```\n\n```go\nfunc (gateway Gateway) UpdateResourceFromStruct(url string, resource interface{}) error\n```\n\n```go\nfunc (gateway Gateway) UpdateResourceSync(url string, body io.ReadSeeker, resource ...interface{}) (apiErr error)\n```\n\n```go\nfunc (gateway Gateway) Warnings() []string\n```\n\n```go\ntype JobResource struct {\n\tEntity struct {\n\t\tStatus       string\n\t\tErrorDetails struct {\n\t\t\tDescription string\n\t\t} `json:\"error_details\"`\n\t}\n}\n```\n\n```go\ntype PaginatedResources struct {\n\tNextURL        string          `json:\"next_url\"`\n\tResourcesBytes json.RawMessage `json:\"resources\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPaginatedResources(exampleResource interface{}) PaginatedResources\n```\n\n```go\nfunc (this PaginatedResources) Resources() ([]interface{}, error)\n```\n\n```go\ntype Request struct {\n\tHttpReq      *http.Request\n\tSeekableBody io.ReadSeeker\n}\n```\n\n```go\ntype WarningProducer interface {\n\tWarnings() []string\n}\n```\n\n","path":"code.cloudfoundry.org/cli-sapi/src/cf/net","name":"net","synopsis":"","isRedistributable":true}
