history

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ChangeEventKind string = "ChangeEvent"

ChangeEventKind is the datastore entity kind for entity changes.

View Source
const SnapshotMsgKind string = "SnapshotMsg"

SnapshotMsgKind is the datastore entity kind for storing the snapshot msgs of resources.

Variables

This section is empty.

Functions

func BatchUpdateSnapshotMsg

func BatchUpdateSnapshotMsg(ctx context.Context, msgs []*SnapshotMsgEntity) error

BatchUpdateSnapshotMsg updates a batch of new snapshot msgs

func CreateBatchChangeEvents

func CreateBatchChangeEvents(ctx context.Context, changes []*ufspb.ChangeEvent) ([]*ufspb.ChangeEvent, error)

CreateBatchChangeEvents creates a batch of new change records in datastore.

func DeleteChangeEventEntities

func DeleteChangeEventEntities(ctx context.Context, entities []*ChangeEventEntity) error

DeleteChangeEventEntities deletes a batch of change events' entities

func DeleteSnapshotMsgEntities

func DeleteSnapshotMsgEntities(ctx context.Context, entities []*SnapshotMsgEntity) error

DeleteSnapshotMsgEntities deletes a batch of snapshot msg entities

func QueryChangesByPropertyName

func QueryChangesByPropertyName(ctx context.Context, propertyName, id string) ([]*ufspb.ChangeEvent, error)

QueryChangesByPropertyName queries change event Entity in the datastore

Types

type ChangeEventEntity

type ChangeEventEntity struct {

	// Add an auto-increment ID as key for deleting
	ID        int64  `gae:"$id"`
	Name      string `gae:"name"`
	UserEmail string `gae:"user_email"`
	// ufspb.ChangeEvent cannot be directly used as it contains pointer.
	Change []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

ChangeEventEntity is a datastore entity that tracks a platform.

func GetAllChangeEventEntities

func GetAllChangeEventEntities(ctx context.Context) ([]*ChangeEventEntity, error)

GetAllChangeEventEntities returns all change events' entities in datastore.

func (*ChangeEventEntity) GetProto

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

GetProto returns the unmarshaled Chrome platform.

type SnapshotMsgEntity

type SnapshotMsgEntity struct {

	// Add an auto-increment ID as key for deleting
	ID           int64  `gae:"$id"`
	ResourceName string `gae:"resource_name"`
	Delete       bool   `gae:"delete"`
	Msg          []byte `gae:",noindex"`
	// contains filtered or unexported fields
}

SnapshotMsgEntity is a datastore entity that stores the snapshot msgs.

func GetAllSnapshotMsg

func GetAllSnapshotMsg(ctx context.Context) ([]*SnapshotMsgEntity, error)

GetAllSnapshotMsg returns all snapshot msg entities in datastore.

func NewSnapshotMsgEntity

func NewSnapshotMsgEntity(resourceName string, delete bool, pm proto.Message) (*SnapshotMsgEntity, error)

NewSnapshotMsgEntity creates a new SnapshotMsgEntity

func QuerySnapshotMsgByPropertyName

func QuerySnapshotMsgByPropertyName(ctx context.Context, propertyName, id string) ([]*SnapshotMsgEntity, error)

QuerySnapshotMsgByPropertyName queries snapshot msg entity in the datastore

func (*SnapshotMsgEntity) GetProto

func (e *SnapshotMsgEntity) GetProto(t proto.Message) error

GetProto returns the unmarshaled Chrome platform.

Jump to

Keyboard shortcuts

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