vendor/github.com/go-rod/rod/lib/proto/cache_storage.go

217 lines · 6970 bytes

  1// This file is generated by "./lib/proto/generate"
  2
  3package proto
  4
  5/*
  6
  7CacheStorage
  8
  9*/
 10
 11// CacheStorageCacheID Unique identifier of the Cache object.
 12type CacheStorageCacheID string
 13
 14// CacheStorageCachedResponseType type of HTTP response cached.
 15type CacheStorageCachedResponseType string
 16
 17const (
 18	// CacheStorageCachedResponseTypeBasic enum const.
 19	CacheStorageCachedResponseTypeBasic CacheStorageCachedResponseType = "basic"
 20
 21	// CacheStorageCachedResponseTypeCors enum const.
 22	CacheStorageCachedResponseTypeCors CacheStorageCachedResponseType = "cors"
 23
 24	// CacheStorageCachedResponseTypeDefault enum const.
 25	CacheStorageCachedResponseTypeDefault CacheStorageCachedResponseType = "default"
 26
 27	// CacheStorageCachedResponseTypeError enum const.
 28	CacheStorageCachedResponseTypeError CacheStorageCachedResponseType = "error"
 29
 30	// CacheStorageCachedResponseTypeOpaqueResponse enum const.
 31	CacheStorageCachedResponseTypeOpaqueResponse CacheStorageCachedResponseType = "opaqueResponse"
 32
 33	// CacheStorageCachedResponseTypeOpaqueRedirect enum const.
 34	CacheStorageCachedResponseTypeOpaqueRedirect CacheStorageCachedResponseType = "opaqueRedirect"
 35)
 36
 37// CacheStorageDataEntry Data entry.
 38type CacheStorageDataEntry struct {
 39	// RequestURL Request URL.
 40	RequestURL string `json:"requestURL"`
 41
 42	// RequestMethod Request method.
 43	RequestMethod string `json:"requestMethod"`
 44
 45	// RequestHeaders Request headers
 46	RequestHeaders []*CacheStorageHeader `json:"requestHeaders"`
 47
 48	// ResponseTime Number of seconds since epoch.
 49	ResponseTime float64 `json:"responseTime"`
 50
 51	// ResponseStatus HTTP response status code.
 52	ResponseStatus int `json:"responseStatus"`
 53
 54	// ResponseStatusText HTTP response status text.
 55	ResponseStatusText string `json:"responseStatusText"`
 56
 57	// ResponseType HTTP response type
 58	ResponseType CacheStorageCachedResponseType `json:"responseType"`
 59
 60	// ResponseHeaders Response headers
 61	ResponseHeaders []*CacheStorageHeader `json:"responseHeaders"`
 62}
 63
 64// CacheStorageCache Cache identifier.
 65type CacheStorageCache struct {
 66	// CacheID An opaque unique id of the cache.
 67	CacheID CacheStorageCacheID `json:"cacheId"`
 68
 69	// SecurityOrigin Security origin of the cache.
 70	SecurityOrigin string `json:"securityOrigin"`
 71
 72	// StorageKey Storage key of the cache.
 73	StorageKey string `json:"storageKey"`
 74
 75	// StorageBucket (optional) Storage bucket of the cache.
 76	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
 77
 78	// CacheName The name of the cache.
 79	CacheName string `json:"cacheName"`
 80}
 81
 82// CacheStorageHeader ...
 83type CacheStorageHeader struct {
 84	// Name ...
 85	Name string `json:"name"`
 86
 87	// Value ...
 88	Value string `json:"value"`
 89}
 90
 91// CacheStorageCachedResponse Cached response.
 92type CacheStorageCachedResponse struct {
 93	// Body Entry content, base64-encoded.
 94	Body []byte `json:"body"`
 95}
 96
 97// CacheStorageDeleteCache Deletes a cache.
 98type CacheStorageDeleteCache struct {
 99	// CacheID Id of cache for deletion.
100	CacheID CacheStorageCacheID `json:"cacheId"`
101}
102
103// ProtoReq name.
104func (m CacheStorageDeleteCache) ProtoReq() string { return "CacheStorage.deleteCache" }
105
106// Call sends the request.
107func (m CacheStorageDeleteCache) Call(c Client) error {
108	return call(m.ProtoReq(), m, nil, c)
109}
110
111// CacheStorageDeleteEntry Deletes a cache entry.
112type CacheStorageDeleteEntry struct {
113	// CacheID Id of cache where the entry will be deleted.
114	CacheID CacheStorageCacheID `json:"cacheId"`
115
116	// Request URL spec of the request.
117	Request string `json:"request"`
118}
119
120// ProtoReq name.
121func (m CacheStorageDeleteEntry) ProtoReq() string { return "CacheStorage.deleteEntry" }
122
123// Call sends the request.
124func (m CacheStorageDeleteEntry) Call(c Client) error {
125	return call(m.ProtoReq(), m, nil, c)
126}
127
128// CacheStorageRequestCacheNames Requests cache names.
129type CacheStorageRequestCacheNames struct {
130	// SecurityOrigin (optional) At least and at most one of securityOrigin, storageKey, storageBucket must be specified.
131	// Security origin.
132	SecurityOrigin string `json:"securityOrigin,omitempty"`
133
134	// StorageKey (optional) Storage key.
135	StorageKey string `json:"storageKey,omitempty"`
136
137	// StorageBucket (optional) Storage bucket. If not specified, it uses the default bucket.
138	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
139}
140
141// ProtoReq name.
142func (m CacheStorageRequestCacheNames) ProtoReq() string { return "CacheStorage.requestCacheNames" }
143
144// Call the request.
145func (m CacheStorageRequestCacheNames) Call(c Client) (*CacheStorageRequestCacheNamesResult, error) {
146	var res CacheStorageRequestCacheNamesResult
147	return &res, call(m.ProtoReq(), m, &res, c)
148}
149
150// CacheStorageRequestCacheNamesResult ...
151type CacheStorageRequestCacheNamesResult struct {
152	// Caches for the security origin.
153	Caches []*CacheStorageCache `json:"caches"`
154}
155
156// CacheStorageRequestCachedResponse Fetches cache entry.
157type CacheStorageRequestCachedResponse struct {
158	// CacheID Id of cache that contains the entry.
159	CacheID CacheStorageCacheID `json:"cacheId"`
160
161	// RequestURL URL spec of the request.
162	RequestURL string `json:"requestURL"`
163
164	// RequestHeaders headers of the request.
165	RequestHeaders []*CacheStorageHeader `json:"requestHeaders"`
166}
167
168// ProtoReq name.
169func (m CacheStorageRequestCachedResponse) ProtoReq() string {
170	return "CacheStorage.requestCachedResponse"
171}
172
173// Call the request.
174func (m CacheStorageRequestCachedResponse) Call(c Client) (*CacheStorageRequestCachedResponseResult, error) {
175	var res CacheStorageRequestCachedResponseResult
176	return &res, call(m.ProtoReq(), m, &res, c)
177}
178
179// CacheStorageRequestCachedResponseResult ...
180type CacheStorageRequestCachedResponseResult struct {
181	// Response read from the cache.
182	Response *CacheStorageCachedResponse `json:"response"`
183}
184
185// CacheStorageRequestEntries Requests data from cache.
186type CacheStorageRequestEntries struct {
187	// CacheID ID of cache to get entries from.
188	CacheID CacheStorageCacheID `json:"cacheId"`
189
190	// SkipCount (optional) Number of records to skip.
191	SkipCount *int `json:"skipCount,omitempty"`
192
193	// PageSize (optional) Number of records to fetch.
194	PageSize *int `json:"pageSize,omitempty"`
195
196	// PathFilter (optional) If present, only return the entries containing this substring in the path
197	PathFilter string `json:"pathFilter,omitempty"`
198}
199
200// ProtoReq name.
201func (m CacheStorageRequestEntries) ProtoReq() string { return "CacheStorage.requestEntries" }
202
203// Call the request.
204func (m CacheStorageRequestEntries) Call(c Client) (*CacheStorageRequestEntriesResult, error) {
205	var res CacheStorageRequestEntriesResult
206	return &res, call(m.ProtoReq(), m, &res, c)
207}
208
209// CacheStorageRequestEntriesResult ...
210type CacheStorageRequestEntriesResult struct {
211	// CacheDataEntries Array of object store data entries.
212	CacheDataEntries []*CacheStorageDataEntry `json:"cacheDataEntries"`
213
214	// ReturnCount Count of returned entries from this storage. If pathFilter is empty, it
215	// is the count of all entries from this storage.
216	ReturnCount float64 `json:"returnCount"`
217}