Documentation
¶
Overview ¶
Package cachestorage provides the Chrome DevTools Protocol commands, types, and events for the CacheStorage domain.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type Cache
- type CacheID
- type CachedResponse
- type CachedResponseType
- type DataEntry
- type DeleteCacheParams
- type DeleteEntryParams
- type Header
- type RequestCacheNamesParams
- type RequestCacheNamesResult
- type RequestCachedResponseParams
- type RequestCachedResponseResult
- type RequestEntriesParams
- type RequestEntriesResult
Constants ¶
const ( CommandDeleteCache = "CacheStorage.deleteCache" CommandDeleteEntry = "CacheStorage.deleteEntry" CommandRequestCacheNames = "CacheStorage.requestCacheNames" CommandRequestCachedResponse = "CacheStorage.requestCachedResponse" CommandRequestEntries = "CacheStorage.requestEntries" )
Command names.
Variables ¶
var DeleteCache = cdp.Command[DeleteCacheParams, cdp.Empty]{Method: CommandDeleteCache}
DeleteCache deletes a cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteCache
var DeleteEntry = cdp.Command[DeleteEntryParams, cdp.Empty]{Method: CommandDeleteEntry}
DeleteEntry deletes a cache entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteEntry
var RequestCacheNames = cdp.Command[RequestCacheNamesParams, RequestCacheNamesResult]{Method: CommandRequestCacheNames}
RequestCacheNames requests cache names.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCacheNames
var RequestCachedResponse = cdp.Command[RequestCachedResponseParams, RequestCachedResponseResult]{Method: CommandRequestCachedResponse}
RequestCachedResponse fetches cache entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCachedResponse
var RequestEntries = cdp.Command[RequestEntriesParams, RequestEntriesResult]{Method: CommandRequestEntries}
RequestEntries requests data from cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestEntries
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
CacheID CacheID `json:"cacheId"` // An opaque unique id of the cache.
SecurityOrigin string `json:"securityOrigin"` // Security origin of the cache.
StorageKey string `json:"storageKey"` // Storage key of the cache.
StorageBucket *storage.Bucket `json:"storageBucket,omitempty,omitzero"` // Storage bucket of the cache.
CacheName string `json:"cacheName"` // The name of the cache.
}
Cache cache identifier.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-Cache
type CacheID ¶
type CacheID string
CacheID unique identifier of the Cache object.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-CacheId
type CachedResponse ¶
type CachedResponse struct {
Body []byte `json:"body"` // Entry content, base64-encoded.
}
CachedResponse cached response.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-CachedResponse
type CachedResponseType ¶
type CachedResponseType string
CachedResponseType type of HTTP response cached.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-CachedResponseType
const ( CachedResponseTypeBasic CachedResponseType = "basic" CachedResponseTypeCors CachedResponseType = "cors" CachedResponseTypeDefault CachedResponseType = "default" CachedResponseTypeError CachedResponseType = "error" CachedResponseTypeOpaqueResponse CachedResponseType = "opaqueResponse" CachedResponseTypeOpaqueRedirect CachedResponseType = "opaqueRedirect" )
CachedResponseType values.
func (CachedResponseType) String ¶
func (t CachedResponseType) String() string
String returns the CachedResponseType as string value.
type DataEntry ¶
type DataEntry struct {
RequestURL string `json:"requestURL"` // Request URL.
RequestMethod string `json:"requestMethod"` // Request method.
RequestHeaders []*Header `json:"requestHeaders"` // Request headers
ResponseTime float64 `json:"responseTime"` // Number of seconds since epoch.
ResponseStatus int64 `json:"responseStatus"` // HTTP response status code.
ResponseStatusText string `json:"responseStatusText"` // HTTP response status text.
ResponseType CachedResponseType `json:"responseType"` // HTTP response type
ResponseHeaders []*Header `json:"responseHeaders"` // Response headers
}
DataEntry data entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-DataEntry
type DeleteCacheParams ¶
type DeleteCacheParams struct {
CacheID CacheID `json:"cacheId"` // Id of cache for deletion.
}
DeleteCacheParams are the parameters of the command CacheStorage.deleteCache.
type DeleteEntryParams ¶
type DeleteEntryParams struct {
CacheID CacheID `json:"cacheId"` // Id of cache where the entry will be deleted.
Request string `json:"request"` // URL spec of the request.
}
DeleteEntryParams are the parameters of the command CacheStorage.deleteEntry.
type Header ¶
Header [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-Header
type RequestCacheNamesParams ¶
type RequestCacheNamesParams struct {
SecurityOrigin string `json:"securityOrigin,omitempty,omitzero"` // At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin.
StorageKey string `json:"storageKey,omitempty,omitzero"` // Storage key.
StorageBucket *storage.Bucket `json:"storageBucket,omitempty,omitzero"` // Storage bucket. If not specified, it uses the default bucket.
}
RequestCacheNamesParams are the parameters of the command CacheStorage.requestCacheNames.
type RequestCacheNamesResult ¶ added in v0.157.3
type RequestCacheNamesResult struct {
Caches []*Cache `json:"caches,omitempty,omitzero"` // Caches for the security origin.
}
RequestCacheNamesResult is the result of the command CacheStorage.requestCacheNames.
type RequestCachedResponseParams ¶
type RequestCachedResponseParams struct {
CacheID CacheID `json:"cacheId"` // Id of cache that contains the entry.
RequestURL string `json:"requestURL"` // URL spec of the request.
RequestHeaders []*Header `json:"requestHeaders"` // headers of the request.
}
RequestCachedResponseParams are the parameters of the command CacheStorage.requestCachedResponse.
type RequestCachedResponseResult ¶ added in v0.157.3
type RequestCachedResponseResult struct {
Response *CachedResponse `json:"response,omitempty,omitzero"` // Response read from the cache.
}
RequestCachedResponseResult is the result of the command CacheStorage.requestCachedResponse.
type RequestEntriesParams ¶
type RequestEntriesParams struct {
CacheID CacheID `json:"cacheId"` // ID of cache to get entries from.
SkipCount int64 `json:"skipCount,omitempty,omitzero"` // Number of records to skip.
PageSize int64 `json:"pageSize,omitempty,omitzero"` // Number of records to fetch.
PathFilter string `json:"pathFilter,omitempty,omitzero"` // If present, only return the entries containing this substring in the path
}
RequestEntriesParams are the parameters of the command CacheStorage.requestEntries.
type RequestEntriesResult ¶ added in v0.157.3
type RequestEntriesResult struct {
CacheDataEntries []*DataEntry `json:"cacheDataEntries,omitempty,omitzero"` // Array of object store data entries.
ReturnCount float64 `json:"returnCount,omitempty,omitzero"` // Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.
}
RequestEntriesResult is the result of the command CacheStorage.requestEntries.