cdproto: github.com/chromedp/cdproto/cachestorage Index | Files

package cachestorage

import "github.com/chromedp/cdproto/cachestorage"

Package cachestorage provides the Chrome DevTools Protocol commands, types, and events for the CacheStorage domain.

Generated by the cdproto-gen command.

Index

Package Files

cachestorage.go easyjson.go types.go

Constants

const (
    CommandDeleteCache           = "CacheStorage.deleteCache"
    CommandDeleteEntry           = "CacheStorage.deleteEntry"
    CommandRequestCacheNames     = "CacheStorage.requestCacheNames"
    CommandRequestCachedResponse = "CacheStorage.requestCachedResponse"
    CommandRequestEntries        = "CacheStorage.requestEntries"
)

Command names.

type Cache Uses

type Cache struct {
    CacheID        CacheID `json:"cacheId"`        // An opaque unique id of the cache.
    SecurityOrigin string  `json:"securityOrigin"` // Security origin 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

func (Cache) MarshalEasyJSON Uses

func (v Cache) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Cache) MarshalJSON Uses

func (v Cache) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Cache) UnmarshalEasyJSON Uses

func (v *Cache) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Cache) UnmarshalJSON Uses

func (v *Cache) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CacheID Uses

type CacheID string

CacheID unique identifier of the Cache object.

See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-CacheId

func (CacheID) String Uses

func (t CacheID) String() string

String returns the CacheID as string value.

type CachedResponse Uses

type CachedResponse struct {
    Body string `json:"body"` // Entry content, base64-encoded.
}

CachedResponse cached response.

See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-CachedResponse

func (CachedResponse) MarshalEasyJSON Uses

func (v CachedResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CachedResponse) MarshalJSON Uses

func (v CachedResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CachedResponse) UnmarshalEasyJSON Uses

func (v *CachedResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CachedResponse) UnmarshalJSON Uses

func (v *CachedResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CachedResponseType Uses

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) MarshalEasyJSON Uses

func (t CachedResponseType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (CachedResponseType) MarshalJSON Uses

func (t CachedResponseType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (CachedResponseType) String Uses

func (t CachedResponseType) String() string

String returns the CachedResponseType as string value.

func (*CachedResponseType) UnmarshalEasyJSON Uses

func (t *CachedResponseType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*CachedResponseType) UnmarshalJSON Uses

func (t *CachedResponseType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type DataEntry Uses

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

func (DataEntry) MarshalEasyJSON Uses

func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DataEntry) MarshalJSON Uses

func (v DataEntry) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DataEntry) UnmarshalEasyJSON Uses

func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DataEntry) UnmarshalJSON Uses

func (v *DataEntry) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DeleteCacheParams Uses

type DeleteCacheParams struct {
    CacheID CacheID `json:"cacheId"` // Id of cache for deletion.
}

DeleteCacheParams deletes a cache.

func DeleteCache Uses

func DeleteCache(cacheID CacheID) *DeleteCacheParams

DeleteCache deletes a cache.

See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteCache

parameters:

cacheID - Id of cache for deletion.

func (*DeleteCacheParams) Do Uses

func (p *DeleteCacheParams) Do(ctx context.Context) (err error)

Do executes CacheStorage.deleteCache against the provided context.

func (DeleteCacheParams) MarshalEasyJSON Uses

func (v DeleteCacheParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DeleteCacheParams) MarshalJSON Uses

func (v DeleteCacheParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DeleteCacheParams) UnmarshalEasyJSON Uses

func (v *DeleteCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DeleteCacheParams) UnmarshalJSON Uses

func (v *DeleteCacheParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DeleteEntryParams Uses

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 deletes a cache entry.

func DeleteEntry Uses

func DeleteEntry(cacheID CacheID, request string) *DeleteEntryParams

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 (*DeleteEntryParams) Do Uses

func (p *DeleteEntryParams) Do(ctx context.Context) (err error)

Do executes CacheStorage.deleteEntry against the provided context.

func (DeleteEntryParams) MarshalEasyJSON Uses

func (v DeleteEntryParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DeleteEntryParams) MarshalJSON Uses

func (v DeleteEntryParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DeleteEntryParams) UnmarshalEasyJSON Uses

func (v *DeleteEntryParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DeleteEntryParams) UnmarshalJSON Uses

func (v *DeleteEntryParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Header struct {
    Name  string `json:"name"`
    Value string `json:"value"`
}

Header [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#type-Header

func (Header) MarshalEasyJSON Uses

func (v Header) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Header) MarshalJSON Uses

func (v Header) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Header) UnmarshalEasyJSON Uses

func (v *Header) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Header) UnmarshalJSON Uses

func (v *Header) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestCacheNamesParams Uses

type RequestCacheNamesParams struct {
    SecurityOrigin string `json:"securityOrigin"` // Security origin.
}

RequestCacheNamesParams requests cache names.

func RequestCacheNames Uses

func RequestCacheNames(securityOrigin string) *RequestCacheNamesParams

RequestCacheNames requests cache names.

See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCacheNames

parameters:

securityOrigin - Security origin.

func (*RequestCacheNamesParams) Do Uses

func (p *RequestCacheNamesParams) Do(ctx context.Context) (caches []*Cache, err error)

Do executes CacheStorage.requestCacheNames against the provided context.

returns:

caches - Caches for the security origin.

func (RequestCacheNamesParams) MarshalEasyJSON Uses

func (v RequestCacheNamesParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestCacheNamesParams) MarshalJSON Uses

func (v RequestCacheNamesParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestCacheNamesParams) UnmarshalEasyJSON Uses

func (v *RequestCacheNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestCacheNamesParams) UnmarshalJSON Uses

func (v *RequestCacheNamesParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestCacheNamesReturns Uses

type RequestCacheNamesReturns struct {
    Caches []*Cache `json:"caches,omitempty"` // Caches for the security origin.
}

RequestCacheNamesReturns return values.

func (RequestCacheNamesReturns) MarshalEasyJSON Uses

func (v RequestCacheNamesReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestCacheNamesReturns) MarshalJSON Uses

func (v RequestCacheNamesReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestCacheNamesReturns) UnmarshalEasyJSON Uses

func (v *RequestCacheNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestCacheNamesReturns) UnmarshalJSON Uses

func (v *RequestCacheNamesReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestCachedResponseParams Uses

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 fetches cache entry.

func RequestCachedResponse Uses

func RequestCachedResponse(cacheID CacheID, requestURL string, requestHeaders []*Header) *RequestCachedResponseParams

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 (*RequestCachedResponseParams) Do Uses

func (p *RequestCachedResponseParams) Do(ctx context.Context) (response *CachedResponse, err error)

Do executes CacheStorage.requestCachedResponse against the provided context.

returns:

response - Response read from the cache.

func (RequestCachedResponseParams) MarshalEasyJSON Uses

func (v RequestCachedResponseParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestCachedResponseParams) MarshalJSON Uses

func (v RequestCachedResponseParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestCachedResponseParams) UnmarshalEasyJSON Uses

func (v *RequestCachedResponseParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestCachedResponseParams) UnmarshalJSON Uses

func (v *RequestCachedResponseParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestCachedResponseReturns Uses

type RequestCachedResponseReturns struct {
    Response *CachedResponse `json:"response,omitempty"` // Response read from the cache.
}

RequestCachedResponseReturns return values.

func (RequestCachedResponseReturns) MarshalEasyJSON Uses

func (v RequestCachedResponseReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestCachedResponseReturns) MarshalJSON Uses

func (v RequestCachedResponseReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestCachedResponseReturns) UnmarshalEasyJSON Uses

func (v *RequestCachedResponseReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestCachedResponseReturns) UnmarshalJSON Uses

func (v *RequestCachedResponseReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestEntriesParams Uses

type RequestEntriesParams struct {
    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
}

RequestEntriesParams requests data from cache.

func RequestEntries Uses

func RequestEntries(cacheID CacheID) *RequestEntriesParams

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 (*RequestEntriesParams) Do Uses

func (p *RequestEntriesParams) Do(ctx context.Context) (cacheDataEntries []*DataEntry, returnCount float64, err error)

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) MarshalEasyJSON Uses

func (v RequestEntriesParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestEntriesParams) MarshalJSON Uses

func (v RequestEntriesParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestEntriesParams) UnmarshalEasyJSON Uses

func (v *RequestEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestEntriesParams) UnmarshalJSON Uses

func (v *RequestEntriesParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (RequestEntriesParams) WithPageSize Uses

func (p RequestEntriesParams) WithPageSize(pageSize int64) *RequestEntriesParams

WithPageSize number of records to fetch.

func (RequestEntriesParams) WithPathFilter Uses

func (p RequestEntriesParams) WithPathFilter(pathFilter string) *RequestEntriesParams

WithPathFilter if present, only return the entries containing this substring in the path.

func (RequestEntriesParams) WithSkipCount Uses

func (p RequestEntriesParams) WithSkipCount(skipCount int64) *RequestEntriesParams

WithSkipCount number of records to skip.

type RequestEntriesReturns Uses

type RequestEntriesReturns struct {
    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.
}

RequestEntriesReturns return values.

func (RequestEntriesReturns) MarshalEasyJSON Uses

func (v RequestEntriesReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestEntriesReturns) MarshalJSON Uses

func (v RequestEntriesReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestEntriesReturns) UnmarshalEasyJSON Uses

func (v *RequestEntriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestEntriesReturns) UnmarshalJSON Uses

func (v *RequestEntriesReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Package cachestorage imports 7 packages (graph) and is imported by 3 packages. Updated 2021-01-08. Refresh now. Tools for package owners.