refactor: make json value a dedicated message (#289)
This commit is contained in:
+1225
-19
File diff suppressed because it is too large
Load Diff
+1444
-23
File diff suppressed because it is too large
Load Diff
+434
-41
@@ -499,7 +499,7 @@ func (x *Value) GetStructValue() *StructValue {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Value) GetJsonValue() *Value {
|
||||
func (x *Value) GetJsonValue() *JsonValue {
|
||||
if x, ok := x.GetValueData().(*Value_JsonValue); ok {
|
||||
return x.JsonValue
|
||||
}
|
||||
@@ -627,7 +627,7 @@ type Value_StructValue struct {
|
||||
}
|
||||
|
||||
type Value_JsonValue struct {
|
||||
JsonValue *Value `protobuf:"bytes,42,opt,name=json_value,json=jsonValue,proto3,oneof"`
|
||||
JsonValue *JsonValue `protobuf:"bytes,42,opt,name=json_value,json=jsonValue,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*Value_I8Value) isValue_ValueData() {}
|
||||
@@ -784,6 +784,306 @@ func (x *StructValue) GetItems() []*Value {
|
||||
return nil
|
||||
}
|
||||
|
||||
type JsonValue struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Value:
|
||||
//
|
||||
// *JsonValue_Boolean
|
||||
// *JsonValue_Int
|
||||
// *JsonValue_Uint
|
||||
// *JsonValue_Float
|
||||
// *JsonValue_Str
|
||||
// *JsonValue_Array
|
||||
// *JsonValue_Object
|
||||
Value isJsonValue_Value `protobuf_oneof:"value"`
|
||||
}
|
||||
|
||||
func (x *JsonValue) Reset() {
|
||||
*x = JsonValue{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_row_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JsonValue) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JsonValue) ProtoMessage() {}
|
||||
|
||||
func (x *JsonValue) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_row_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JsonValue.ProtoReflect.Descriptor instead.
|
||||
func (*JsonValue) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_row_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (m *JsonValue) GetValue() isJsonValue_Value {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *JsonValue) GetBoolean() bool {
|
||||
if x, ok := x.GetValue().(*JsonValue_Boolean); ok {
|
||||
return x.Boolean
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *JsonValue) GetInt() int64 {
|
||||
if x, ok := x.GetValue().(*JsonValue_Int); ok {
|
||||
return x.Int
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *JsonValue) GetUint() uint64 {
|
||||
if x, ok := x.GetValue().(*JsonValue_Uint); ok {
|
||||
return x.Uint
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *JsonValue) GetFloat() float64 {
|
||||
if x, ok := x.GetValue().(*JsonValue_Float); ok {
|
||||
return x.Float
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *JsonValue) GetStr() string {
|
||||
if x, ok := x.GetValue().(*JsonValue_Str); ok {
|
||||
return x.Str
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *JsonValue) GetArray() *JsonList {
|
||||
if x, ok := x.GetValue().(*JsonValue_Array); ok {
|
||||
return x.Array
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *JsonValue) GetObject() *JsonObject {
|
||||
if x, ok := x.GetValue().(*JsonValue_Object); ok {
|
||||
return x.Object
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isJsonValue_Value interface {
|
||||
isJsonValue_Value()
|
||||
}
|
||||
|
||||
type JsonValue_Boolean struct {
|
||||
Boolean bool `protobuf:"varint,1,opt,name=boolean,proto3,oneof"`
|
||||
}
|
||||
|
||||
type JsonValue_Int struct {
|
||||
Int int64 `protobuf:"varint,2,opt,name=int,proto3,oneof"`
|
||||
}
|
||||
|
||||
type JsonValue_Uint struct {
|
||||
Uint uint64 `protobuf:"varint,3,opt,name=uint,proto3,oneof"`
|
||||
}
|
||||
|
||||
type JsonValue_Float struct {
|
||||
Float float64 `protobuf:"fixed64,4,opt,name=float,proto3,oneof"`
|
||||
}
|
||||
|
||||
type JsonValue_Str struct {
|
||||
Str string `protobuf:"bytes,5,opt,name=str,proto3,oneof"`
|
||||
}
|
||||
|
||||
type JsonValue_Array struct {
|
||||
Array *JsonList `protobuf:"bytes,6,opt,name=array,proto3,oneof"`
|
||||
}
|
||||
|
||||
type JsonValue_Object struct {
|
||||
Object *JsonObject `protobuf:"bytes,7,opt,name=object,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*JsonValue_Boolean) isJsonValue_Value() {}
|
||||
|
||||
func (*JsonValue_Int) isJsonValue_Value() {}
|
||||
|
||||
func (*JsonValue_Uint) isJsonValue_Value() {}
|
||||
|
||||
func (*JsonValue_Float) isJsonValue_Value() {}
|
||||
|
||||
func (*JsonValue_Str) isJsonValue_Value() {}
|
||||
|
||||
func (*JsonValue_Array) isJsonValue_Value() {}
|
||||
|
||||
func (*JsonValue_Object) isJsonValue_Value() {}
|
||||
|
||||
type JsonList struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Items []*JsonValue `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
|
||||
}
|
||||
|
||||
func (x *JsonList) Reset() {
|
||||
*x = JsonList{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_row_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JsonList) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JsonList) ProtoMessage() {}
|
||||
|
||||
func (x *JsonList) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_row_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JsonList.ProtoReflect.Descriptor instead.
|
||||
func (*JsonList) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_row_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *JsonList) GetItems() []*JsonValue {
|
||||
if x != nil {
|
||||
return x.Items
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type JsonObject struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Entries []*JsonObject_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
|
||||
}
|
||||
|
||||
func (x *JsonObject) Reset() {
|
||||
*x = JsonObject{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_row_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JsonObject) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JsonObject) ProtoMessage() {}
|
||||
|
||||
func (x *JsonObject) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_row_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JsonObject.ProtoReflect.Descriptor instead.
|
||||
func (*JsonObject) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_row_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *JsonObject) GetEntries() []*JsonObject_Entry {
|
||||
if x != nil {
|
||||
return x.Entries
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type JsonObject_Entry struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value *JsonValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (x *JsonObject_Entry) Reset() {
|
||||
*x = JsonObject_Entry{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_greptime_v1_row_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JsonObject_Entry) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JsonObject_Entry) ProtoMessage() {}
|
||||
|
||||
func (x *JsonObject_Entry) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_greptime_v1_row_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use JsonObject_Entry.ProtoReflect.Descriptor instead.
|
||||
func (*JsonObject_Entry) Descriptor() ([]byte, []int) {
|
||||
return file_greptime_v1_row_proto_rawDescGZIP(), []int{8, 0}
|
||||
}
|
||||
|
||||
func (x *JsonObject_Entry) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *JsonObject_Entry) GetValue() *JsonValue {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_greptime_v1_row_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_greptime_v1_row_proto_rawDesc = []byte{
|
||||
@@ -819,7 +1119,7 @@ var file_greptime_v1_row_proto_rawDesc = []byte{
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x31, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x2a, 0x0a, 0x06,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x9c, 0x0b, 0x0a, 0x05, 0x56, 0x61, 0x6c,
|
||||
0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xa0, 0x0b, 0x0a, 0x05, 0x56, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x69, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x07, 0x69, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
|
||||
0x1d, 0x0a, 0x09, 0x69, 0x31, 0x36, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
@@ -905,24 +1205,51 @@ var file_greptime_v1_row_proto_rawDesc = []byte{
|
||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72,
|
||||
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74,
|
||||
0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09,
|
||||
0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x35, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x37,
|
||||
0x0a, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a,
|
||||
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72,
|
||||
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x52, 0x6f, 0x77, 0x44, 0x61,
|
||||
0x74, 0x61, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47,
|
||||
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72,
|
||||
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x48, 0x00, 0x52, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a,
|
||||
0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x35, 0x0a, 0x09, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65,
|
||||
0x6d, 0x73, 0x22, 0x37, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xe8, 0x01, 0x0a, 0x09,
|
||||
0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6f, 0x6f,
|
||||
0x6c, 0x65, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x62, 0x6f,
|
||||
0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x12, 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x03, 0x48, 0x00, 0x52, 0x03, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x75, 0x69, 0x6e,
|
||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x04, 0x75, 0x69, 0x6e, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00,
|
||||
0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x2d, 0x0a, 0x05, 0x61,
|
||||
0x72, 0x72, 0x61, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x62,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x07, 0x0a,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x38, 0x0a, 0x08, 0x4a, 0x73, 0x6f, 0x6e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
|
||||
0x22, 0x8e, 0x01, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
|
||||
0x37, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a,
|
||||
0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
||||
0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x47, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x42, 0x07, 0x52, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x5a, 0x35, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -937,7 +1264,7 @@ func file_greptime_v1_row_proto_rawDescGZIP() []byte {
|
||||
return file_greptime_v1_row_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_greptime_v1_row_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_greptime_v1_row_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_greptime_v1_row_proto_goTypes = []interface{}{
|
||||
(*Rows)(nil), // 0: greptime.v1.Rows
|
||||
(*ColumnSchema)(nil), // 1: greptime.v1.ColumnSchema
|
||||
@@ -945,33 +1272,42 @@ var file_greptime_v1_row_proto_goTypes = []interface{}{
|
||||
(*Value)(nil), // 3: greptime.v1.Value
|
||||
(*ListValue)(nil), // 4: greptime.v1.ListValue
|
||||
(*StructValue)(nil), // 5: greptime.v1.StructValue
|
||||
(ColumnDataType)(0), // 6: greptime.v1.ColumnDataType
|
||||
(SemanticType)(0), // 7: greptime.v1.SemanticType
|
||||
(*ColumnDataTypeExtension)(nil), // 8: greptime.v1.ColumnDataTypeExtension
|
||||
(*ColumnOptions)(nil), // 9: greptime.v1.ColumnOptions
|
||||
(*IntervalMonthDayNano)(nil), // 10: greptime.v1.IntervalMonthDayNano
|
||||
(*Decimal128)(nil), // 11: greptime.v1.Decimal128
|
||||
(*JsonValue)(nil), // 6: greptime.v1.JsonValue
|
||||
(*JsonList)(nil), // 7: greptime.v1.JsonList
|
||||
(*JsonObject)(nil), // 8: greptime.v1.JsonObject
|
||||
(*JsonObject_Entry)(nil), // 9: greptime.v1.JsonObject.Entry
|
||||
(ColumnDataType)(0), // 10: greptime.v1.ColumnDataType
|
||||
(SemanticType)(0), // 11: greptime.v1.SemanticType
|
||||
(*ColumnDataTypeExtension)(nil), // 12: greptime.v1.ColumnDataTypeExtension
|
||||
(*ColumnOptions)(nil), // 13: greptime.v1.ColumnOptions
|
||||
(*IntervalMonthDayNano)(nil), // 14: greptime.v1.IntervalMonthDayNano
|
||||
(*Decimal128)(nil), // 15: greptime.v1.Decimal128
|
||||
}
|
||||
var file_greptime_v1_row_proto_depIdxs = []int32{
|
||||
1, // 0: greptime.v1.Rows.schema:type_name -> greptime.v1.ColumnSchema
|
||||
2, // 1: greptime.v1.Rows.rows:type_name -> greptime.v1.Row
|
||||
6, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType
|
||||
7, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType
|
||||
8, // 4: greptime.v1.ColumnSchema.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension
|
||||
9, // 5: greptime.v1.ColumnSchema.options:type_name -> greptime.v1.ColumnOptions
|
||||
10, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType
|
||||
11, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType
|
||||
12, // 4: greptime.v1.ColumnSchema.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension
|
||||
13, // 5: greptime.v1.ColumnSchema.options:type_name -> greptime.v1.ColumnOptions
|
||||
3, // 6: greptime.v1.Row.values:type_name -> greptime.v1.Value
|
||||
10, // 7: greptime.v1.Value.interval_month_day_nano_value:type_name -> greptime.v1.IntervalMonthDayNano
|
||||
11, // 8: greptime.v1.Value.decimal128_value:type_name -> greptime.v1.Decimal128
|
||||
14, // 7: greptime.v1.Value.interval_month_day_nano_value:type_name -> greptime.v1.IntervalMonthDayNano
|
||||
15, // 8: greptime.v1.Value.decimal128_value:type_name -> greptime.v1.Decimal128
|
||||
4, // 9: greptime.v1.Value.list_value:type_name -> greptime.v1.ListValue
|
||||
5, // 10: greptime.v1.Value.struct_value:type_name -> greptime.v1.StructValue
|
||||
3, // 11: greptime.v1.Value.json_value:type_name -> greptime.v1.Value
|
||||
6, // 11: greptime.v1.Value.json_value:type_name -> greptime.v1.JsonValue
|
||||
3, // 12: greptime.v1.ListValue.items:type_name -> greptime.v1.Value
|
||||
3, // 13: greptime.v1.StructValue.items:type_name -> greptime.v1.Value
|
||||
14, // [14:14] is the sub-list for method output_type
|
||||
14, // [14:14] is the sub-list for method input_type
|
||||
14, // [14:14] is the sub-list for extension type_name
|
||||
14, // [14:14] is the sub-list for extension extendee
|
||||
0, // [0:14] is the sub-list for field type_name
|
||||
7, // 14: greptime.v1.JsonValue.array:type_name -> greptime.v1.JsonList
|
||||
8, // 15: greptime.v1.JsonValue.object:type_name -> greptime.v1.JsonObject
|
||||
6, // 16: greptime.v1.JsonList.items:type_name -> greptime.v1.JsonValue
|
||||
9, // 17: greptime.v1.JsonObject.entries:type_name -> greptime.v1.JsonObject.Entry
|
||||
6, // 18: greptime.v1.JsonObject.Entry.value:type_name -> greptime.v1.JsonValue
|
||||
19, // [19:19] is the sub-list for method output_type
|
||||
19, // [19:19] is the sub-list for method input_type
|
||||
19, // [19:19] is the sub-list for extension type_name
|
||||
19, // [19:19] is the sub-list for extension extendee
|
||||
0, // [0:19] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_greptime_v1_row_proto_init() }
|
||||
@@ -1053,6 +1389,54 @@ func file_greptime_v1_row_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_row_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JsonValue); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_row_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JsonList); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_row_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JsonObject); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_greptime_v1_row_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JsonObject_Entry); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_greptime_v1_row_proto_msgTypes[3].OneofWrappers = []interface{}{
|
||||
(*Value_I8Value)(nil),
|
||||
@@ -1086,13 +1470,22 @@ func file_greptime_v1_row_proto_init() {
|
||||
(*Value_StructValue)(nil),
|
||||
(*Value_JsonValue)(nil),
|
||||
}
|
||||
file_greptime_v1_row_proto_msgTypes[6].OneofWrappers = []interface{}{
|
||||
(*JsonValue_Boolean)(nil),
|
||||
(*JsonValue_Int)(nil),
|
||||
(*JsonValue_Uint)(nil),
|
||||
(*JsonValue_Float)(nil),
|
||||
(*JsonValue_Str)(nil),
|
||||
(*JsonValue_Array)(nil),
|
||||
(*JsonValue_Object)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_greptime_v1_row_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -79,7 +79,7 @@ message Value {
|
||||
|
||||
ListValue list_value = 40;
|
||||
StructValue struct_value = 41;
|
||||
Value json_value = 42;
|
||||
JsonValue json_value = 42;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,3 +90,27 @@ message ListValue {
|
||||
message StructValue {
|
||||
repeated Value items = 2;
|
||||
}
|
||||
|
||||
message JsonValue {
|
||||
oneof value {
|
||||
bool boolean = 1;
|
||||
int64 int = 2;
|
||||
uint64 uint = 3;
|
||||
double float = 4;
|
||||
string str = 5;
|
||||
JsonList array = 6;
|
||||
JsonObject object = 7;
|
||||
}
|
||||
}
|
||||
|
||||
message JsonList {
|
||||
repeated JsonValue items = 1;
|
||||
}
|
||||
|
||||
message JsonObject {
|
||||
message Entry {
|
||||
string key = 1;
|
||||
JsonValue value = 2;
|
||||
}
|
||||
repeated Entry entries = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user