event

package
v0.0.0-...-e5235a8 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeEvent

type ChangeEvent struct {
	ID struct {
		Data string `bson:"_data" json:"_data"`
	} `bson:"_id" json:"_id"`
	OperationType string   `bson:"operationType" json:"operationType"`
	FullDocument  bson.Raw `bson:"fullDocument" json:"fullDocument,omitempty"`
	Namespace     struct {
		DB         string `bson:"db" json:"db,omitempty"`
		Collection string `bson:"coll" json:"coll,omitempty"`
	} `bson:"ns" json:"ns"`
	To struct {
		DB         string `bson:"db" json:"db,omitempty"`
		Collection string `bson:"coll" json:"coll,omitempty"`
	} `bson:"to" json:"to,omitempty"`
	DocumentKey       bson.Raw `bson:"documentKey" json:"documentKey,omitempty"`
	UpdateDescription struct {
		UpdatedFields bson.Raw `bson:"updatedFields" json:"updatedFields,omitempty"`
		RemovedFields []string `bson:"removedFields" json:"removedFields,omitempty"`
	} `bson:"updateDescription" json:"updateDescription,omitempty"`
	ClusterTime       primitive.Timestamp `bson:"clusterTime" json:"clusterTime"`
	TransactionNumber int64               `bson:"txnNumber" json:"txnNumber,omitempty"`
	SessionIdentifier bson.Raw            `bson:"lsid" json:"lsid,omitempty"`
}

ChangeEvent is the response document of change stream. See https://docs.mongodb.com/manual/reference/change-events/ for more details.

Jump to

Keyboard shortcuts

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