Documentation ¶
Index ¶
- Variables
- func GetValue(value *Value) interface{}
- func StrToBytes(s string) []byte
- func UnmarshalJSON(data []byte, record *Record) error
- func UnmarshalMapData(obj map[string]interface{}, record *Record) error
- type ArrayValue
- type ColumnDef
- type DataType
- type Field
- type MapValue
- type Method
- type Record
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetEventName() string
- func (x *Record) GetFields() []*Field
- func (x *Record) GetMethod() Method
- func (x *Record) GetPrimaryKey() string
- func (x *Record) GetTable() string
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
- type RecordDef
- type SendReply
- type TruncateReply
- func (*TruncateReply) Descriptor() ([]byte, []int)deprecated
- func (x *TruncateReply) GetReason() string
- func (x *TruncateReply) GetSuccess() bool
- func (*TruncateReply) ProtoMessage()
- func (x *TruncateReply) ProtoReflect() protoreflect.Message
- func (x *TruncateReply) Reset()
- func (x *TruncateReply) String() string
- type TruncateRequest
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (x *Value) GetArray() *ArrayValue
- func (x *Value) GetMap() *MapValue
- func (x *Value) GetTimestamp() *timestamppb.Timestamp
- func (x *Value) GetType() DataType
- func (x *Value) GetValue() []byte
- func (*Value) ProtoMessage()
- func (x *Value) ProtoReflect() protoreflect.Message
- func (x *Value) Reset()
- func (x *Value) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotUnsignedIntegerErr = errors.New("Not unisgned integer") NotIntegerErr = errors.New("Not integer") NotFloatErr = errors.New("Not float") )
View Source
var ( Method_name = map[int32]string{ 0: "INSERT", 1: "UPDATE", 2: "DELETE", 3: "TRUNCATE", } Method_value = map[string]int32{ "INSERT": 0, "UPDATE": 1, "DELETE": 2, "TRUNCATE": 3, } )
Enum value maps for Method.
View Source
var ( DataType_name = map[int32]string{ 0: "BOOLEAN", 1: "BINARY", 2: "STRING", 3: "UINT64", 4: "INT64", 5: "FLOAT64", 6: "ARRAY", 7: "MAP", 8: "NULL", 9: "TIME", } DataType_value = map[string]int32{ "BOOLEAN": 0, "BINARY": 1, "STRING": 2, "UINT64": 3, "INT64": 4, "FLOAT64": 5, "ARRAY": 6, "MAP": 7, "NULL": 8, "TIME": 9, } )
Enum value maps for DataType.
View Source
var File_record_proto protoreflect.FileDescriptor
Functions ¶
func StrToBytes ¶ added in v0.0.13
func UnmarshalJSON ¶ added in v0.0.13
func UnmarshalMapData ¶ added in v0.0.13
Types ¶
type ArrayValue ¶
type ArrayValue struct { Elements []*Value `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"` // contains filtered or unexported fields }
func (*ArrayValue) Descriptor
deprecated
func (*ArrayValue) Descriptor() ([]byte, []int)
Deprecated: Use ArrayValue.ProtoReflect.Descriptor instead.
func (*ArrayValue) GetElements ¶
func (x *ArrayValue) GetElements() []*Value
func (*ArrayValue) ProtoMessage ¶
func (*ArrayValue) ProtoMessage()
func (*ArrayValue) ProtoReflect ¶ added in v0.0.30
func (x *ArrayValue) ProtoReflect() protoreflect.Message
func (*ArrayValue) Reset ¶
func (x *ArrayValue) Reset()
func (*ArrayValue) String ¶
func (x *ArrayValue) String() string
type DataType ¶
type DataType int32
func (DataType) Descriptor ¶ added in v0.0.30
func (DataType) Descriptor() protoreflect.EnumDescriptor
func (DataType) EnumDescriptor
deprecated
func (DataType) Number ¶ added in v0.0.30
func (x DataType) Number() protoreflect.EnumNumber
func (DataType) Type ¶ added in v0.0.30
func (DataType) Type() protoreflect.EnumType
type Field ¶
type Field struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value *Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Field) Descriptor
deprecated
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) ProtoReflect ¶ added in v0.0.30
func (x *Field) ProtoReflect() protoreflect.Message
type MapValue ¶
type MapValue struct { Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` // contains filtered or unexported fields }
func (*MapValue) Descriptor
deprecated
func (*MapValue) ProtoMessage ¶
func (*MapValue) ProtoMessage()
func (*MapValue) ProtoReflect ¶ added in v0.0.30
func (x *MapValue) ProtoReflect() protoreflect.Message
type Method ¶
type Method int32
func (Method) Descriptor ¶ added in v0.0.30
func (Method) Descriptor() protoreflect.EnumDescriptor
func (Method) EnumDescriptor
deprecated
func (Method) Number ¶ added in v0.0.30
func (x Method) Number() protoreflect.EnumNumber
func (Method) Type ¶ added in v0.0.30
func (Method) Type() protoreflect.EnumType
type Record ¶
type Record struct { EventName string `protobuf:"bytes,1,opt,name=eventName,proto3" json:"eventName,omitempty"` Table string `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` Method Method `protobuf:"varint,3,opt,name=method,proto3,enum=gravity.sdk.types.record.Method" json:"method,omitempty"` PrimaryKey string `protobuf:"bytes,4,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"` Fields []*Field `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"` // contains filtered or unexported fields }
func (*Record) Descriptor
deprecated
func (*Record) GetEventName ¶
func (*Record) GetPrimaryKey ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶ added in v0.0.30
func (x *Record) ProtoReflect() protoreflect.Message
type RecordDef ¶
type RecordDef struct { HasPrimary bool PrimaryColumn string Values map[string]interface{} ColumnDefs []*ColumnDef }
func GetDefinition ¶
type SendReply ¶
type SendReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` // contains filtered or unexported fields }
func (*SendReply) Descriptor
deprecated
func (*SendReply) GetSuccess ¶
func (*SendReply) ProtoMessage ¶
func (*SendReply) ProtoMessage()
func (*SendReply) ProtoReflect ¶ added in v0.0.30
func (x *SendReply) ProtoReflect() protoreflect.Message
type TruncateReply ¶
type TruncateReply struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` // contains filtered or unexported fields }
func (*TruncateReply) Descriptor
deprecated
func (*TruncateReply) Descriptor() ([]byte, []int)
Deprecated: Use TruncateReply.ProtoReflect.Descriptor instead.
func (*TruncateReply) GetReason ¶
func (x *TruncateReply) GetReason() string
func (*TruncateReply) GetSuccess ¶
func (x *TruncateReply) GetSuccess() bool
func (*TruncateReply) ProtoMessage ¶
func (*TruncateReply) ProtoMessage()
func (*TruncateReply) ProtoReflect ¶ added in v0.0.30
func (x *TruncateReply) ProtoReflect() protoreflect.Message
func (*TruncateReply) Reset ¶
func (x *TruncateReply) Reset()
func (*TruncateReply) String ¶
func (x *TruncateReply) String() string
type TruncateRequest ¶
type TruncateRequest struct { Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` // contains filtered or unexported fields }
func (*TruncateRequest) Descriptor
deprecated
func (*TruncateRequest) Descriptor() ([]byte, []int)
Deprecated: Use TruncateRequest.ProtoReflect.Descriptor instead.
func (*TruncateRequest) GetTable ¶
func (x *TruncateRequest) GetTable() string
func (*TruncateRequest) ProtoMessage ¶
func (*TruncateRequest) ProtoMessage()
func (*TruncateRequest) ProtoReflect ¶ added in v0.0.30
func (x *TruncateRequest) ProtoReflect() protoreflect.Message
func (*TruncateRequest) Reset ¶
func (x *TruncateRequest) Reset()
func (*TruncateRequest) String ¶
func (x *TruncateRequest) String() string
type Value ¶
type Value struct { Type DataType `protobuf:"varint,1,opt,name=type,proto3,enum=gravity.sdk.types.record.DataType" json:"type,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Map *MapValue `protobuf:"bytes,3,opt,name=map,proto3" json:"map,omitempty"` Array *ArrayValue `protobuf:"bytes,4,opt,name=array,proto3" json:"array,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func GetValueFromInterface ¶ added in v0.0.13
func (*Value) Descriptor
deprecated
func (*Value) GetArray ¶
func (x *Value) GetArray() *ArrayValue
func (*Value) GetTimestamp ¶ added in v0.0.38
func (x *Value) GetTimestamp() *timestamppb.Timestamp
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶ added in v0.0.30
func (x *Value) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.