Documentation ¶
Index ¶
- Variables
- type Change
- type Data
- func (*Data) Descriptor() ([]byte, []int)deprecated
- func (m *Data) GetData() isData_Data
- func (x *Data) GetRawData() []byte
- func (x *Data) GetStructuredData() *structpb.Struct
- func (*Data) ProtoMessage()
- func (x *Data) ProtoReflect() protoreflect.Message
- func (x *Data) Reset()
- func (x *Data) String() string
- type Data_RawData
- type Data_StructuredData
- type Operation
- type Record
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetKey() *Data
- func (x *Record) GetMetadata() map[string]string
- func (x *Record) GetOperation() Operation
- func (x *Record) GetPayload() *Change
- func (x *Record) GetPosition() []byte
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Operation_name = map[int32]string{ 0: "OPERATION_UNSPECIFIED", 1: "OPERATION_CREATE", 2: "OPERATION_UPDATE", 3: "OPERATION_DELETE", 4: "OPERATION_SNAPSHOT", } Operation_value = map[string]int32{ "OPERATION_UNSPECIFIED": 0, "OPERATION_CREATE": 1, "OPERATION_UPDATE": 2, "OPERATION_DELETE": 3, "OPERATION_SNAPSHOT": 4, } )
Enum value maps for Operation.
View Source
var ( // OpenCDC version is a constant that should be used as the value in the // metadata field opencdc.version. It ensures the OpenCDC format version can be // easily identified in case the record gets marshaled into a different untyped // format (e.g. JSON). // // optional string opencdc_version = 9999; E_OpencdcVersion = &file_opencdc_v1_opencdc_proto_extTypes[0] // Metadata field "opencdc.version" contains the version of the OpenCDC format // (e.g. "v1"). This field exists to ensure the OpenCDC format version can be // easily identified in case the record gets marshaled into a different // untyped format (e.g. JSON). // // optional string metadata_version = 10000; E_MetadataVersion = &file_opencdc_v1_opencdc_proto_extTypes[1] // Metadata field "opencdc.createdAt" can contain the time when the record was // created in the 3rd party system. The expected format is a unix timestamp in // nanoseconds. // // optional string metadata_created_at = 10001; E_MetadataCreatedAt = &file_opencdc_v1_opencdc_proto_extTypes[2] // Metadata field "opencdc.readAt" can contain the time when the record was // read from the 3rd party system. The expected format is a unix timestamp in // nanoseconds. // // optional string metadata_read_at = 10002; E_MetadataReadAt = &file_opencdc_v1_opencdc_proto_extTypes[3] // Metadata field "opencdc.collection" can contain the name of the collection // where the record originated from and/or where it should be stored. // // optional string metadata_collection = 10003; E_MetadataCollection = &file_opencdc_v1_opencdc_proto_extTypes[4] // Metadata field "opencdc.key.schema.subject" contains the subject of the schema of // the record's .Key field. // // optional string metadata_key_schema_subject = 10004; E_MetadataKeySchemaSubject = &file_opencdc_v1_opencdc_proto_extTypes[5] // Metadata field "opencdc.key.schema.version" contains the version of the schema of // the record's .Key field. // // optional string metadata_key_schema_version = 10005; E_MetadataKeySchemaVersion = &file_opencdc_v1_opencdc_proto_extTypes[6] // Metadata field "opencdc.payload.schema.subject" contains the subject of the schema of // the record's .Payload fields. // // optional string metadata_payload_schema_subject = 10006; E_MetadataPayloadSchemaSubject = &file_opencdc_v1_opencdc_proto_extTypes[7] // Metadata field "opencdc.payload.schema.version" contains the version of the schema of // the record's .Payload fields. // // optional string metadata_payload_schema_version = 10007; E_MetadataPayloadSchemaVersion = &file_opencdc_v1_opencdc_proto_extTypes[8] )
Extension fields to descriptorpb.FileOptions.
View Source
var File_opencdc_v1_opencdc_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct { // Before contains the data before the operation occurred. This field is // optional and should only be populated for operations "update" and "delete" // (if the system supports fetching the data before the operation). Before *Data `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"` // After contains the data after the operation occurred. This field should be // populated for all operations except "delete". After *Data `protobuf:"bytes,2,opt,name=after,proto3" json:"after,omitempty"` // contains filtered or unexported fields }
Change represents the data before and after the operation occurred.
func (*Change) Descriptor
deprecated
func (*Change) ProtoMessage ¶
func (*Change) ProtoMessage()
func (*Change) ProtoReflect ¶
func (x *Change) ProtoReflect() protoreflect.Message
type Data ¶
type Data struct { // Types that are assignable to Data: // // *Data_RawData // *Data_StructuredData Data isData_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
Data is used to represent the record key and payload. It can be either raw data (byte array) or structured data (struct).
func (*Data) Descriptor
deprecated
func (*Data) GetRawData ¶
func (*Data) GetStructuredData ¶
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) ProtoReflect ¶
func (x *Data) ProtoReflect() protoreflect.Message
type Data_RawData ¶
type Data_RawData struct { // Raw data contains unstructured data in form of a byte array. RawData []byte `protobuf:"bytes,1,opt,name=raw_data,json=rawData,proto3,oneof"` }
type Data_StructuredData ¶
type Operation ¶
type Operation int32
Operation defines what triggered the creation of a record.
const ( Operation_OPERATION_UNSPECIFIED Operation = 0 // Records with operation create contain data of a newly created entity. Operation_OPERATION_CREATE Operation = 1 // Records with operation update contain data of an updated entity. Operation_OPERATION_UPDATE Operation = 2 // Records with operation delete contain data of a deleted entity. Operation_OPERATION_DELETE Operation = 3 // Records with operation snapshot contain data of a previously existing // entity, fetched as part of a snapshot. Operation_OPERATION_SNAPSHOT Operation = 4 )
func (Operation) Descriptor ¶
func (Operation) Descriptor() protoreflect.EnumDescriptor
func (Operation) EnumDescriptor
deprecated
func (Operation) Number ¶
func (x Operation) Number() protoreflect.EnumNumber
func (Operation) Type ¶
func (Operation) Type() protoreflect.EnumType
type Record ¶
type Record struct { // Position uniquely identifies the record. Position []byte `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"` // Operation defines what triggered the creation of a record. There are four // possibilities: create, update, delete or snapshot. The first three // operations are encountered during normal CDC operation, while "snapshot" is // meant to represent records during an initial load. Depending on the // operation, the record will contain either the payload before the change, // after the change, or both (see field payload). Operation Operation `protobuf:"varint,2,opt,name=operation,proto3,enum=opencdc.v1.Operation" json:"operation,omitempty"` // Metadata contains optional information related to the record. Although the // map can contain arbitrary keys, the standard provides a set of standard // metadata fields (see options prefixed with metadata_*). Metadata map[string]string `` /* 157-byte string literal not displayed */ // Key represents a value that should identify the entity (e.g. database row). Key *Data `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` // Payload holds the payload change (data before and after the operation // occurred). Payload *Change `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
Record contains data about a single change event related to a single entity.
func (*Record) Descriptor
deprecated
func (*Record) GetMetadata ¶
func (*Record) GetOperation ¶
func (*Record) GetPayload ¶
func (*Record) GetPosition ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.