Documentation
¶
Index ¶
- Constants
- func Deserialize(b []byte) (*http.Response, error)
- func Serialize(resp *http.Response) ([]byte, error)
- type HTTPCache
- func (d *HTTPCache) GenerateKey(request *http.Request) (string, error)
- func (d *HTTPCache) GetKey(requestKey string) (*http.Response, error)
- func (d *HTTPCache) GetReq(req *http.Request) (*http.Response, error)
- func (d *HTTPCache) SetKey(requestKey string, resp *http.Response) error
- func (d *HTTPCache) SetReq(request *http.Request, resp *http.Response) error
Constants ¶
View Source
const PREFIX = "---HTTP-RESPONSE---\n"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPCache ¶
type HTTPCache struct {
// contains filtered or unexported fields
}
func New ¶
func New(cache cache.GenericCache) *HTTPCache
func NewHTTP ¶
func NewHTTP(cache cache.GenericCache) *HTTPCache
func (*HTTPCache) GenerateKey ¶
Generates a unique key to store a value, based on URL, method, selected headers, and body
Click to show internal directories.
Click to hide internal directories.