// Package cachestorage provides the Chrome DevTools Protocol// commands, types, and events for the CacheStorage domain.//// Generated by the cdproto-gen command.
package cachestorage// Code generated by cdproto-gen. DO NOT EDIT.import ()// DeleteCacheParams deletes a cache.typeDeleteCacheParamsstruct { CacheID CacheID`json:"cacheId"`// Id of cache for deletion.}// DeleteCache deletes a cache.//// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteCache//// parameters://// cacheID - Id of cache for deletion.func ( CacheID) *DeleteCacheParams {return &DeleteCacheParams{CacheID: , }}// Do executes CacheStorage.deleteCache against the provided context.func ( *DeleteCacheParams) ( context.Context) ( error) {returncdp.Execute(, CommandDeleteCache, , nil)}// DeleteEntryParams deletes a cache entry.typeDeleteEntryParamsstruct { CacheID CacheID`json:"cacheId"`// Id of cache where the entry will be deleted. Request string`json:"request"`// URL spec of the request.}// DeleteEntry deletes a cache entry.//// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteEntry//// parameters://// cacheID - Id of cache where the entry will be deleted.// request - URL spec of the request.func ( CacheID, string) *DeleteEntryParams {return &DeleteEntryParams{CacheID: ,Request: , }}// Do executes CacheStorage.deleteEntry against the provided context.func ( *DeleteEntryParams) ( context.Context) ( error) {returncdp.Execute(, CommandDeleteEntry, , nil)}// RequestCacheNamesParams requests cache names.typeRequestCacheNamesParamsstruct { SecurityOrigin string`json:"securityOrigin,omitempty"`// At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin. StorageKey string`json:"storageKey,omitempty"`// Storage key. StorageBucket *storage.Bucket`json:"storageBucket,omitempty"`// Storage bucket. If not specified, it uses the default bucket.}// RequestCacheNames requests cache names.//// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCacheNames//// parameters:func () *RequestCacheNamesParams {return &RequestCacheNamesParams{}}// WithSecurityOrigin at least and at most one of securityOrigin, storageKey,// storageBucket must be specified. Security origin.func ( RequestCacheNamesParams) ( string) *RequestCacheNamesParams { .SecurityOrigin = return &}// WithStorageKey storage key.func ( RequestCacheNamesParams) ( string) *RequestCacheNamesParams { .StorageKey = return &}// WithStorageBucket storage bucket. If not specified, it uses the default// bucket.func ( RequestCacheNamesParams) ( *storage.Bucket) *RequestCacheNamesParams { .StorageBucket = return &}// RequestCacheNamesReturns return values.typeRequestCacheNamesReturnsstruct { Caches []*Cache`json:"caches,omitempty"`// Caches for the security origin.}// Do executes CacheStorage.requestCacheNames against the provided context.//// returns://// caches - Caches for the security origin.func ( *RequestCacheNamesParams) ( context.Context) ( []*Cache, error) {// executevarRequestCacheNamesReturns = cdp.Execute(, CommandRequestCacheNames, , &)if != nil {returnnil, }return .Caches, nil}// RequestCachedResponseParams fetches cache entry.typeRequestCachedResponseParamsstruct { 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.}// RequestCachedResponse fetches cache entry.//// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCachedResponse//// parameters://// cacheID - Id of cache that contains the entry.// requestURL - URL spec of the request.// requestHeaders - headers of the request.func ( CacheID, string, []*Header) *RequestCachedResponseParams {return &RequestCachedResponseParams{CacheID: ,RequestURL: ,RequestHeaders: , }}// RequestCachedResponseReturns return values.typeRequestCachedResponseReturnsstruct { Response *CachedResponse`json:"response,omitempty"`// Response read from the cache.}// Do executes CacheStorage.requestCachedResponse against the provided context.//// returns://// response - Response read from the cache.func ( *RequestCachedResponseParams) ( context.Context) ( *CachedResponse, error) {// executevarRequestCachedResponseReturns = cdp.Execute(, CommandRequestCachedResponse, , &)if != nil {returnnil, }return .Response, nil}// RequestEntriesParams requests data from cache.typeRequestEntriesParamsstruct { CacheID CacheID`json:"cacheId"`// ID of cache to get entries from. SkipCount int64`json:"skipCount,omitempty"`// Number of records to skip. PageSize int64`json:"pageSize,omitempty"`// Number of records to fetch. PathFilter string`json:"pathFilter,omitempty"`// If present, only return the entries containing this substring in the path}// RequestEntries requests data from cache.//// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestEntries//// parameters://// cacheID - ID of cache to get entries from.func ( CacheID) *RequestEntriesParams {return &RequestEntriesParams{CacheID: , }}// WithSkipCount number of records to skip.func ( RequestEntriesParams) ( int64) *RequestEntriesParams { .SkipCount = return &}// WithPageSize number of records to fetch.func ( RequestEntriesParams) ( int64) *RequestEntriesParams { .PageSize = return &}// WithPathFilter if present, only return the entries containing this// substring in the path.func ( RequestEntriesParams) ( string) *RequestEntriesParams { .PathFilter = return &}// RequestEntriesReturns return values.typeRequestEntriesReturnsstruct { CacheDataEntries []*DataEntry`json:"cacheDataEntries,omitempty"`// Array of object store data entries. ReturnCount float64`json:"returnCount,omitempty"`// Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.}// Do executes CacheStorage.requestEntries against the provided context.//// returns://// cacheDataEntries - Array of object store data entries.// returnCount - Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.func ( *RequestEntriesParams) ( context.Context) ( []*DataEntry, float64, error) {// executevarRequestEntriesReturns = cdp.Execute(, CommandRequestEntries, , &)if != nil {returnnil, 0, }return .CacheDataEntries, .ReturnCount, nil}// Command names.const (CommandDeleteCache = "CacheStorage.deleteCache"CommandDeleteEntry = "CacheStorage.deleteEntry"CommandRequestCacheNames = "CacheStorage.requestCacheNames"CommandRequestCachedResponse = "CacheStorage.requestCachedResponse"CommandRequestEntries = "CacheStorage.requestEntries")
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.