cachestorage

package
v0.35.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 4 Imported by: 9 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cachestorage implements the CacheStorage domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the CacheStorage domain with the connection set to conn.

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"` // Storage bucket of the cache.
	CacheName      string          `json:"cacheName"`               // The name of the cache.
}

Cache Cache identifier.

type CacheID

type CacheID string

CacheID Unique identifier of the Cache object.

type CachedResponse added in v0.9.1

type CachedResponse struct {
	Body []byte `json:"body"` // Entry content, base64-encoded. (Encoded as a base64 string when passed over JSON)
}

CachedResponse Cached response

type CachedResponseType added in v0.19.3

type CachedResponseType string

CachedResponseType type of HTTP response cached

const (
	CachedResponseTypeNotSet         CachedResponseType = ""
	CachedResponseTypeBasic          CachedResponseType = "basic"
	CachedResponseTypeCORS           CachedResponseType = "cors"
	CachedResponseTypeDefault        CachedResponseType = "default"
	CachedResponseTypeError          CachedResponseType = "error"
	CachedResponseTypeOpaqueResponse CachedResponseType = "opaqueResponse"
	CachedResponseTypeOpaqueRedirect CachedResponseType = "opaqueRedirect"
)

CachedResponseType as enums.

func (CachedResponseType) String added in v0.19.3

func (e CachedResponseType) String() string

func (CachedResponseType) Valid added in v0.19.3

func (e CachedResponseType) Valid() bool

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     int                `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.

type DeleteCacheArgs

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

DeleteCacheArgs represents the arguments for DeleteCache in the CacheStorage domain.

func NewDeleteCacheArgs

func NewDeleteCacheArgs(cacheID CacheID) *DeleteCacheArgs

NewDeleteCacheArgs initializes DeleteCacheArgs with the required arguments.

type DeleteEntryArgs

type DeleteEntryArgs struct {
	CacheID CacheID `json:"cacheId"` // Id of cache where the entry will be deleted.
	Request string  `json:"request"` // URL spec of the request.
}

DeleteEntryArgs represents the arguments for DeleteEntry in the CacheStorage domain.

func NewDeleteEntryArgs

func NewDeleteEntryArgs(cacheID CacheID, request string) *DeleteEntryArgs

NewDeleteEntryArgs initializes DeleteEntryArgs with the required arguments.

type Header struct {
	Name  string `json:"name"`  // No description.
	Value string `json:"value"` // No description.
}

Header

type RequestCacheNamesArgs

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

RequestCacheNamesArgs represents the arguments for RequestCacheNames in the CacheStorage domain.

func NewRequestCacheNamesArgs

func NewRequestCacheNamesArgs() *RequestCacheNamesArgs

NewRequestCacheNamesArgs initializes RequestCacheNamesArgs with the required arguments.

func (*RequestCacheNamesArgs) SetSecurityOrigin added in v0.35.0

func (a *RequestCacheNamesArgs) SetSecurityOrigin(securityOrigin string) *RequestCacheNamesArgs

SetSecurityOrigin sets the SecurityOrigin optional argument. At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin.

func (*RequestCacheNamesArgs) SetStorageBucket added in v0.35.0

func (a *RequestCacheNamesArgs) SetStorageBucket(storageBucket storage.Bucket) *RequestCacheNamesArgs

SetStorageBucket sets the StorageBucket optional argument. Storage bucket. If not specified, it uses the default bucket.

func (*RequestCacheNamesArgs) SetStorageKey added in v0.35.0

func (a *RequestCacheNamesArgs) SetStorageKey(storageKey string) *RequestCacheNamesArgs

SetStorageKey sets the StorageKey optional argument. Storage key.

type RequestCacheNamesReply

type RequestCacheNamesReply struct {
	Caches []Cache `json:"caches"` // Caches for the security origin.
}

RequestCacheNamesReply represents the return values for RequestCacheNames in the CacheStorage domain.

type RequestCachedResponseArgs added in v0.9.1

type RequestCachedResponseArgs 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.
}

RequestCachedResponseArgs represents the arguments for RequestCachedResponse in the CacheStorage domain.

func NewRequestCachedResponseArgs added in v0.9.1

func NewRequestCachedResponseArgs(cacheID CacheID, requestURL string, requestHeaders []Header) *RequestCachedResponseArgs

NewRequestCachedResponseArgs initializes RequestCachedResponseArgs with the required arguments.

type RequestCachedResponseReply added in v0.9.1

type RequestCachedResponseReply struct {
	Response CachedResponse `json:"response"` // Response read from the cache.
}

RequestCachedResponseReply represents the return values for RequestCachedResponse in the CacheStorage domain.

type RequestEntriesArgs

type RequestEntriesArgs struct {
	CacheID    CacheID `json:"cacheId"`              // ID of cache to get entries from.
	SkipCount  *int    `json:"skipCount,omitempty"`  // Number of records to skip.
	PageSize   *int    `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
}

RequestEntriesArgs represents the arguments for RequestEntries in the CacheStorage domain.

func NewRequestEntriesArgs

func NewRequestEntriesArgs(cacheID CacheID) *RequestEntriesArgs

NewRequestEntriesArgs initializes RequestEntriesArgs with the required arguments.

func (*RequestEntriesArgs) SetPageSize added in v0.25.0

func (a *RequestEntriesArgs) SetPageSize(pageSize int) *RequestEntriesArgs

SetPageSize sets the PageSize optional argument. Number of records to fetch.

func (*RequestEntriesArgs) SetPathFilter added in v0.21.0

func (a *RequestEntriesArgs) SetPathFilter(pathFilter string) *RequestEntriesArgs

SetPathFilter sets the PathFilter optional argument. If present, only return the entries containing this substring in the path

func (*RequestEntriesArgs) SetSkipCount added in v0.25.0

func (a *RequestEntriesArgs) SetSkipCount(skipCount int) *RequestEntriesArgs

SetSkipCount sets the SkipCount optional argument. Number of records to skip.

type RequestEntriesReply

type RequestEntriesReply struct {
	CacheDataEntries []DataEntry `json:"cacheDataEntries"` // Array of object store data entries.
	ReturnCount      float64     `json:"returnCount"`      // Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.
}

RequestEntriesReply represents the return values for RequestEntries in the CacheStorage domain.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL