{"modulePath":"github.com/DaAlbrecht/cf-cli","version":"v0.0.0-20231128151943-1fe19bb400b9","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package wrapper\n\n## Types\n\n```go\ntype RequestLogger struct {\n\t// contains filtered or unexported fields\n}\n```\nRequestLogger is the wrapper that logs requests to and responses from a plugin repository\n\n```go\nfunc NewRequestLogger(output RequestLoggerOutput) *RequestLogger\n```\nNewRequestLogger returns a pointer to a RequestLogger wrapper\n\n```go\nfunc (logger *RequestLogger) Make(request *http.Request, passedResponse *plugin.Response, proxyReader plugin.ProxyReader) error\n```\nMake records the request and the response to UI\n\n```go\nfunc (logger *RequestLogger) Wrap(innerconnection plugin.Connection) plugin.Connection\n```\nWrap sets the connection on the RequestLogger and returns itself\n\n```go\ntype RequestLoggerOutput interface {\n\tDisplayDump(dump string) error\n\tDisplayHeader(name string, value string) error\n\tDisplayHost(name string) error\n\tDisplayJSONBody(body []byte) error\n\tDisplayRequestHeader(method string, uri string, httpProtocol string) error\n\tDisplayResponseHeader(httpProtocol string, status string) error\n\tDisplayType(name string, requestDate time.Time) error\n\tHandleInternalError(err error)\n\tStart() error\n\tStop() error\n}\n```\nRequestLoggerOutput is the interface for displaying logs\n\n```go\ntype RetryRequest struct {\n\t// contains filtered or unexported fields\n}\n```\nRetryRequest is a wrapper that retries failed requests if they contain a 5XX status code.\n\n```go\nfunc NewRetryRequest(maxRetries int) *RetryRequest\n```\nNewRetryRequest returns a pointer to a RetryRequest wrapper.\n\n```go\nfunc (retry *RetryRequest) Make(request *http.Request, passedResponse *plugin.Response, proxyReader plugin.ProxyReader) error\n```\nMake retries the request if it comes back with a 5XX status code.\n\n```go\nfunc (retry *RetryRequest) Wrap(innerconnection plugin.Connection) plugin.Connection\n```\nWrap sets the connection in the RetryRequest and returns itself.\n\n","path":"github.com/DaAlbrecht/cf-cli/api/plugin/wrapper","name":"wrapper","synopsis":"","isRedistributable":true}
