Documentation
¶
Index ¶
- Variables
- func ApplyChanges(orig *Value, changes *Value)
- func ConvertFieldsToMap(fields []*Field) map[string]interface{}
- func GetValueData(value *Value) interface{}
- func Marshal(record *Record) ([]byte, error)
- func MarshalJSON(record *Record) ([]byte, error)
- func Merge(origRecord *Record, updates *Record) []byte
- func StrToBytes(s string) []byte
- func Unmarshal(data []byte, record *Record) error
- func UnmarshalJSON(data []byte, record *Record) error
- func UnmarshalMapData(obj map[string]interface{}, record *Record) error
- type ArrayValue
- type DataType
- type Field
- type MapValue
- type Record
- func (record *Record) AsMap() map[string]interface{}
- func (record *Record) CalculateKey(fields []string) ([]byte, error)
- func (*Record) Descriptor() ([]byte, []int)deprecated
- func (x *Record) GetMeta() *structpb.Struct
- func (x *Record) GetPayload() *Value
- func (record *Record) GetValueByPath(key string) (*Value, error)
- func (record *Record) GetValueDataByPath(key string) (interface{}, error)
- func (*Record) ProtoMessage()
- func (x *Record) ProtoReflect() protoreflect.Message
- func (x *Record) Reset()
- func (x *Record) String() string
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (x *Value) GetArray() *ArrayValue
- func (v *Value) GetBytes() ([]byte, error)
- func (v *Value) GetData() interface{}
- 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 ( ErrNotFoundKeyPath = errors.New("Not found key path") ErrNotSupportedMethod = errors.New("Not supported method") )
View Source
var ( NotUnsignedIntegerErr = errors.New("Not unisgned integer") NotIntegerErr = errors.New("Not integer") NotFloatErr = errors.New("Not float") )
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_types_record_record_proto protoreflect.FileDescriptor
View Source
var (
UnsupportedOperationErr = errors.New("Unsupported operation")
)
Functions ¶
func ApplyChanges ¶
func ConvertFieldsToMap ¶
func GetValueData ¶
func GetValueData(value *Value) interface{}
func MarshalJSON ¶
func StrToBytes ¶
func UnmarshalJSON ¶
func UnmarshalMapData ¶
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 ¶
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 ¶
func (DataType) Descriptor() protoreflect.EnumDescriptor
func (DataType) EnumDescriptor
deprecated
func (DataType) Number ¶
func (x DataType) Number() protoreflect.EnumNumber
func (DataType) Type ¶
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 ¶
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 ¶
func (x *MapValue) ProtoReflect() protoreflect.Message
type Record ¶
type Record struct { Meta *structpb.Struct `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Payload *Value `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*Record) Descriptor
deprecated
func (*Record) GetPayload ¶
func (*Record) GetValueDataByPath ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) ProtoReflect ¶
func (x *Record) ProtoReflect() protoreflect.Message
type Value ¶
type Value struct { Type DataType `protobuf:"varint,1,opt,name=type,proto3,enum=compton.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 CreateValue ¶
func GetValueFromInterface ¶
func (*Value) Descriptor
deprecated
func (*Value) GetArray ¶
func (x *Value) GetArray() *ArrayValue
func (*Value) GetTimestamp ¶
func (x *Value) GetTimestamp() *timestamppb.Timestamp
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.