Documentation ¶ Index ¶ Variables func New(cache Cache) func(http.RoundTripper) http.RoundTripper type Cache type CacheItem type CacheTransport func (c *CacheTransport) RoundTrip(r *http.Request) (*http.Response, error) Constants ¶ This section is empty. Variables ¶ View Source var ( ErrNotFound = errors.New("cache item not found") ) Functions ¶ func New ¶ func New(cache Cache) func(http.RoundTripper) http.RoundTripper NewETAG placeholder Types ¶ type Cache ¶ type Cache interface { Get(ctx context.Context, k string) (*CacheItem, error) Set(ctx context.Context, k string, v *CacheItem) error } type CacheItem ¶ type CacheItem struct { ETAG string Response []byte Expiration time.Time // NOTE : look to see if expiration needs to be set from cache-control headers } type CacheTransport ¶ type CacheTransport struct { Wrapped http.RoundTripper // contains filtered or unexported fields } func (*CacheTransport) RoundTrip ¶ func (c *CacheTransport) RoundTrip(r *http.Request) (*http.Response, error) Source Files ¶ View all Source files cache.gotransport.go Directories ¶ Show internal Expand all Path Synopsis caches dynamodb local postgres Click to show internal directories. Click to hide internal directories.