caching

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
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 doesnt 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

func DeleteCachingService(ctx context.Context, name string) error

DeleteCachingService deletes the CachingService in datastore.

func GetCachingService

func GetCachingService(ctx context.Context, name string) (*ufspb.CachingService, error)

GetCachingService returns CachingService for the given name from datastore.

func GetCachingServiceIndexedFieldName

func GetCachingServiceIndexedFieldName(input string) (string, error)

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 {
	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"`
	// 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.

func (*CSEntity) GetProto

func (e *CSEntity) GetProto() (proto.Message, error)

GetProto returns the unmarshaled CachingService.

Jump to

Keyboard shortcuts

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