Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
func (*Redactor) RedactRequestHeader ¶
RedactRequestHeader redacts headers with the specified name, optionally with the specified number of hashed characters.
func (*Redactor) RedactRequestURLParam ¶
RedactRequestURLParam redacts URL parameters with the specified case-sensitive name, optionally with the specified number of hashed characters.
type RequestRedactor ¶
RequestRedactor returns a redacted copy of a request. If fields are modified, they must be copied.
type ResponseRedactor ¶
ResponseRedactor redacts a response in-place.
type Transport ¶
type Transport struct {
// Path is the path to store cached requests at.
Path string
// Fallback allows pages from any category to be used.
Fallback bool
// RequestRedactor redacts requests for storage.
RequestRedactor RequestRedactor
// ResponseRedactor redacts responses.
ResponseRedactor ResponseRedactor
// Next is the transport to use for making requests. If nil, only cached
// responses are used.
Next http.RoundTripper
}
Transport caches HTTP responses indefinitely based on a URL and an optional category. It supports redacting sensitive headers/parameters.
Click to show internal directories.
Click to hide internal directories.