Documentation
¶
Overview ¶
Package caching provides interfaces for managing DataStore entities that correspond to the caching service
Index ¶
- Constants
- func BatchUpdateCachingServices(ctx context.Context, cachingServices []*ufspb.CachingService) ([]*ufspb.CachingService, error)
- func CreateCachingService(ctx context.Context, cs *ufspb.CachingService) (*ufspb.CachingService, error)
- func DeleteCachingService(ctx context.Context, name string) error
- func GetCachingService(ctx context.Context, name string) (*ufspb.CachingService, error)
- func GetCachingServiceIndexedFieldName(input string) (string, error)
- func ListAllCachingServices(ctx context.Context, keysOnly bool) (res []*ufspb.CachingService, err error)
- func ListCachingServices(ctx context.Context, pageSize int32, pageToken string, ...) (res []*ufspb.CachingService, nextPageToken string, err error)
- type CSEntity
Constants ¶
const CachingServiceKind string = "CachingService"
CachingServiceKind is the datastore entity kind for chrome platforms.
Variables ¶
This section is empty.
Functions ¶
func BatchUpdateCachingServices ¶
func BatchUpdateCachingServices(ctx context.Context, cachingServices []*ufspb.CachingService) ([]*ufspb.CachingService, error)
BatchUpdateCachingServices updates CachingServices in datastore.
This is a non-atomic operation and doesn't check if the object already exists before update. Must be used within a transaction where objects are checked before update. Will lead to partial updates if not used in a transaction.
func CreateCachingService ¶
func CreateCachingService(ctx context.Context, cs *ufspb.CachingService) (*ufspb.CachingService, error)
CreateCachingService creates a new CachingService in datastore.
func DeleteCachingService ¶
DeleteCachingService deletes the CachingService in datastore.
func GetCachingService ¶
GetCachingService returns CachingService for the given name from datastore.
func GetCachingServiceIndexedFieldName ¶
GetCachingServiceIndexedFieldName returns the index name.
func ListAllCachingServices ¶
func ListAllCachingServices(ctx context.Context, keysOnly bool) (res []*ufspb.CachingService, err error)
ListAllCachingServices returns all caching services in datastore.
func ListCachingServices ¶
func ListCachingServices(ctx context.Context, pageSize int32, pageToken string, filterMap map[string][]interface{}, keysOnly bool) (res []*ufspb.CachingService, nextPageToken string, err error)
ListCachingServices lists the CachingServices.
Does a query over CachingService entities. Returns up to pageSize entities, plus non-nil cursor (if there are more results). pageSize must be positive.
Types ¶
type CSEntity ¶
type CSEntity struct { Extra datastore.PropertyMap `gae:",extra"` ID string `gae:"$id"` State string `gae:"state"` // b/188491698: The field of Subnet has been deprecated. Use 'Subnets' // instead. Subnet string `gae:"subnet"` Subnets []string `gae:"subnets"` Zones []string `gae:"zones"` // ufspb.CachingService cannot be directly used as it contains pointer. CachingService []byte `gae:",noindex"` // contains filtered or unexported fields }
CSEntity is a datastore entity that tracks a platform.