mirror of
				https://github.com/go-kratos/kratos.git
				synced 2025-10-30 23:47:59 +02:00 
			
		
		
		
	fix(encoding): extract all form fields even if some unsupported (#3694)
* rename `simples` test data field to `strings` * failing unit test * fix: extract all form fields even if some fail --------- Co-authored-by: Tony.Chen <zhihui_chen@foxmail.com>
This commit is contained in:
		| @@ -154,7 +154,7 @@ func TestProtoEncodeDecode(t *testing.T) { | ||||
| 		Id:      2233, | ||||
| 		NoOne:   "2233", | ||||
| 		Simple:  &complex.Simple{Component: "5566"}, | ||||
| 		Simples: []string{"3344", "5566"}, | ||||
| 		Strings: []string{"3344", "5566"}, | ||||
| 		B:       true, | ||||
| 		Sex:     complex.Sex_woman, | ||||
| 		Age:     18, | ||||
| @@ -185,7 +185,7 @@ func TestProtoEncodeDecode(t *testing.T) { | ||||
| 	if "a=19&age=18&b=true&bool=false&byte=MTIz&bytes=MTIz&count=3&d=22.22&double=12.33&duration="+ | ||||
| 		"2m0.000000022s&field=1%2C2&float=12.34&id=2233&int32=32&int64=64&"+ | ||||
| 		"map%5Bkratos%5D=https%3A%2F%2Fgo-kratos.dev%2F&map%5Bkratos_start%5D=https%3A%2F%2Fgo-kratos.dev%2Fen%2Fdocs%2Fgetting-started%2Fstart%2F&"+ | ||||
| 		"numberOne=2233&price=11.23&sex=woman&simples=3344&simples=5566&string=go-kratos"+ | ||||
| 		"numberOne=2233&price=11.23&sex=woman&string=go-kratos&strings=3344&strings=5566"+ | ||||
| 		"×tamp=1970-01-01T00%3A00%3A20.000000002Z&uint32=32&uint64=64&very_simple.component=5566" != string(content) { | ||||
| 		t.Errorf("rawpath is not equal to %s", content) | ||||
| 	} | ||||
| @@ -206,17 +206,17 @@ func TestProtoEncodeDecode(t *testing.T) { | ||||
| 	if "5566" != in2.Simple.Component { | ||||
| 		t.Errorf("expect %v, got %v", "5566", in2.Simple.Component) | ||||
| 	} | ||||
| 	if in2.Simples == nil { | ||||
| 		t.Errorf("expect %v, got %v", nil, in2.Simples) | ||||
| 	if in2.Strings == nil { | ||||
| 		t.Errorf("expect %v, got %v", nil, in2.Strings) | ||||
| 	} | ||||
| 	if len(in2.Simples) != 2 { | ||||
| 		t.Errorf("expect %v, got %v", 2, len(in2.Simples)) | ||||
| 	if len(in2.Strings) != 2 { | ||||
| 		t.Errorf("expect %v, got %v", 2, len(in2.Strings)) | ||||
| 	} | ||||
| 	if "3344" != in2.Simples[0] { | ||||
| 		t.Errorf("expect %v, got %v", "3344", in2.Simples[0]) | ||||
| 	if "3344" != in2.Strings[0] { | ||||
| 		t.Errorf("expect %v, got %v", "3344", in2.Strings[0]) | ||||
| 	} | ||||
| 	if "5566" != in2.Simples[1] { | ||||
| 		t.Errorf("expect %v, got %v", "5566", in2.Simples[1]) | ||||
| 	if "5566" != in2.Strings[1] { | ||||
| 		t.Errorf("expect %v, got %v", "5566", in2.Strings[1]) | ||||
| 	} | ||||
| 	if l := len(in2.GetMap()); l != 2 { | ||||
| 		t.Fatalf("in2.Map length want: %d, got: %d", 2, l) | ||||
| @@ -283,3 +283,14 @@ func TestOptional(t *testing.T) { | ||||
| 		t.Fatalf("got %s", query.Encode()) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func TestWithUnsupportedType(t *testing.T) { | ||||
| 	in := &complex.Complex{ | ||||
| 		Id:      2233, | ||||
| 		Simples: []*complex.Simple{{Component: "3344"}, {Component: "5566"}}, | ||||
| 	} | ||||
| 	query, _ := EncodeValues(in) | ||||
| 	if query.Encode() != "id=2233" { | ||||
| 		t.Fatalf("got %s", query.Encode()) | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -14,8 +14,8 @@ import ( | ||||
|  | ||||
| func TestDecodeValues(t *testing.T) { | ||||
| 	form, err := url.ParseQuery("a=19&age=18&b=true&bool=false&byte=MTIz&bytes=MTIz&count=3&d=22.22&double=12.33&duration=" + | ||||
| 		"2m0.000000022s&field=1%2C2&float=12.34&id=2233&int32=32&int64=64&numberOne=2233&price=11.23&sex=woman&simples=3344&" + | ||||
| 		"simples=5566&string=go-kratos×tamp=1970-01-01T00%3A00%3A20.000000002Z&uint32=32&uint64=64&very_simple.component=5566") | ||||
| 		"2m0.000000022s&field=1%2C2&float=12.34&id=2233&int32=32&int64=64&numberOne=2233&price=11.23&sex=woman&strings=3344&" + | ||||
| 		"strings=5566&string=go-kratos×tamp=1970-01-01T00%3A00%3A20.000000002Z&uint32=32&uint64=64&very_simple.component=5566") | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| @@ -37,14 +37,14 @@ func TestDecodeValues(t *testing.T) { | ||||
| 	if comp.Simple.Component != "5566" { | ||||
| 		t.Errorf("want %v, got %v", "5566", comp.Simple.Component) | ||||
| 	} | ||||
| 	if len(comp.Simples) != 2 { | ||||
| 		t.Fatalf("want %v, got %v", 2, len(comp.Simples)) | ||||
| 	if len(comp.Strings) != 2 { | ||||
| 		t.Fatalf("want %v, got %v", 2, len(comp.Strings)) | ||||
| 	} | ||||
| 	if comp.Simples[0] != "3344" { | ||||
| 		t.Errorf("want %v, got %v", "3344", comp.Simples[0]) | ||||
| 	if comp.Strings[0] != "3344" { | ||||
| 		t.Errorf("want %v, got %v", "3344", comp.Strings[0]) | ||||
| 	} | ||||
| 	if comp.Simples[1] != "5566" { | ||||
| 		t.Errorf("want %v, got %v", "5566", comp.Simples[1]) | ||||
| 	if comp.Strings[1] != "5566" { | ||||
| 		t.Errorf("want %v, got %v", "5566", comp.Strings[1]) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @@ -56,26 +56,26 @@ func TestGetFieldDescriptor(t *testing.T) { | ||||
| 		t.Errorf("want: %d, got: %d", protoreflect.Int64Kind, field.Kind()) | ||||
| 	} | ||||
|  | ||||
| 	field = getFieldDescriptor(comp.ProtoReflect(), "simples") | ||||
| 	field = getFieldDescriptor(comp.ProtoReflect(), "strings") | ||||
| 	if field.Kind() != protoreflect.StringKind { | ||||
| 		t.Errorf("want: %d, got: %d", protoreflect.StringKind, field.Kind()) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func TestPopulateRepeatedField(t *testing.T) { | ||||
| 	query, err := url.ParseQuery("simples=3344&simples=5566") | ||||
| 	query, err := url.ParseQuery("strings=3344&strings=5566") | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 	comp := &complex.Complex{} | ||||
| 	field := getFieldDescriptor(comp.ProtoReflect(), "simples") | ||||
| 	field := getFieldDescriptor(comp.ProtoReflect(), "strings") | ||||
|  | ||||
| 	err = populateRepeatedField(field, comp.ProtoReflect().Mutable(field).List(), query["simples"]) | ||||
| 	err = populateRepeatedField(field, comp.ProtoReflect().Mutable(field).List(), query["strings"]) | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 	if !reflect.DeepEqual([]string{"3344", "5566"}, comp.GetSimples()) { | ||||
| 		t.Errorf("want: %v, got: %v", []string{"3344", "5566"}, comp.GetSimples()) | ||||
| 	if !reflect.DeepEqual([]string{"3344", "5566"}, comp.GetStrings()) { | ||||
| 		t.Errorf("want: %v, got: %v", []string{"3344", "5566"}, comp.GetStrings()) | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -21,10 +21,7 @@ func EncodeValues(msg any) (url.Values, error) { | ||||
| 	if v, ok := msg.(proto.Message); ok { | ||||
| 		u := make(url.Values) | ||||
| 		err := encodeByField(u, "", v.ProtoReflect()) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 		return u, nil | ||||
| 		return u, err | ||||
| 	} | ||||
| 	return encoder.Encode(msg) | ||||
| } | ||||
| @@ -56,7 +53,6 @@ func encodeByField(u url.Values, path string, m protoreflect.Message) (finalErr | ||||
| 				list, err := encodeRepeatedField(fd, v.List()) | ||||
| 				if err != nil { | ||||
| 					finalErr = err | ||||
| 					return false | ||||
| 				} | ||||
| 				for _, item := range list { | ||||
| 					u.Add(newPath, item) | ||||
| @@ -67,7 +63,6 @@ func encodeByField(u url.Values, path string, m protoreflect.Message) (finalErr | ||||
| 				m, err := encodeMapField(fd, v.Map()) | ||||
| 				if err != nil { | ||||
| 					finalErr = err | ||||
| 					return false | ||||
| 				} | ||||
| 				for k, value := range m { | ||||
| 					u.Set(fmt.Sprintf("%s[%s]", newPath, k), value) | ||||
| @@ -81,13 +76,11 @@ func encodeByField(u url.Values, path string, m protoreflect.Message) (finalErr | ||||
| 			} | ||||
| 			if err = encodeByField(u, newPath, v.Message()); err != nil { | ||||
| 				finalErr = err | ||||
| 				return false | ||||
| 			} | ||||
| 		default: | ||||
| 			value, err := EncodeField(fd, v) | ||||
| 			if err != nil { | ||||
| 				finalErr = err | ||||
| 				return false | ||||
| 			} | ||||
| 			u.Set(newPath, value) | ||||
| 		} | ||||
|   | ||||
| @@ -17,7 +17,7 @@ func TestEncodeValues(t *testing.T) { | ||||
| 		Id:          2233, | ||||
| 		NoOne:       "2233", | ||||
| 		Simple:      &complex.Simple{Component: "5566"}, | ||||
| 		Simples:     []string{"3344", "5566"}, | ||||
| 		Strings:     []string{"3344", "5566"}, | ||||
| 		B:           true, | ||||
| 		Sex:         complex.Sex_woman, | ||||
| 		Age:         18, | ||||
| @@ -46,7 +46,7 @@ func TestEncodeValues(t *testing.T) { | ||||
| 	if err != nil { | ||||
| 		t.Fatal(err) | ||||
| 	} | ||||
| 	want := "a=19&age=18&b=true&bool=false&byte=MTIz&bytes=MTIz&count=3&d=22.22&double=12.33&duration=2m0.000000022s&field=1%2C2&float=12.34&id=2233&int32=32&int64=64&map%5Bkratos%5D=https%3A%2F%2Fgo-kratos.dev%2F&map%5Bkratos_start%5D=https%3A%2F%2Fgo-kratos.dev%2Fen%2Fdocs%2Fgetting-started%2Fstart%2F&map_int64_key%5B1%5D=kratos&map_int64_key%5B2%5D=go-zero&numberOne=2233&price=11.23&sex=woman&simples=3344&simples=5566&string=go-kratos×tamp=1970-01-01T00%3A00%3A20.000000002Z&uint32=32&uint64=64&very_simple.component=5566" // nolint:lll | ||||
| 	want := "a=19&age=18&b=true&bool=false&byte=MTIz&bytes=MTIz&count=3&d=22.22&double=12.33&duration=2m0.000000022s&field=1%2C2&float=12.34&id=2233&int32=32&int64=64&map%5Bkratos%5D=https%3A%2F%2Fgo-kratos.dev%2F&map%5Bkratos_start%5D=https%3A%2F%2Fgo-kratos.dev%2Fen%2Fdocs%2Fgetting-started%2Fstart%2F&map_int64_key%5B1%5D=kratos&map_int64_key%5B2%5D=go-zero&numberOne=2233&price=11.23&sex=woman&string=go-kratos&strings=3344&strings=5566×tamp=1970-01-01T00%3A00%3A20.000000002Z&uint32=32&uint64=64&very_simple.component=5566" // nolint:lll | ||||
| 	if got := query.Encode(); want != got { | ||||
| 		t.Errorf("\nwant: %s, \ngot: %s", want, got) | ||||
| 	} | ||||
|   | ||||
							
								
								
									
										212
									
								
								internal/testdata/complex/complex.pb.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										212
									
								
								internal/testdata/complex/complex.pb.go
									
									
									
									
										vendored
									
									
								
							| @@ -1,7 +1,7 @@ | ||||
| // Code generated by protoc-gen-go. DO NOT EDIT. | ||||
| // versions: | ||||
| // 	protoc-gen-go v1.27.1 | ||||
| // 	protoc        v3.19.1 | ||||
| // 	protoc        v5.29.3 | ||||
| // source: complex.proto | ||||
|  | ||||
| package complex | ||||
| @@ -80,7 +80,8 @@ type Complex struct { | ||||
| 	Id          int64                   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` | ||||
| 	NoOne       string                  `protobuf:"bytes,2,opt,name=no_one,json=numberOne,proto3" json:"no_one,omitempty"` | ||||
| 	Simple      *Simple                 `protobuf:"bytes,3,opt,name=simple,json=very_simple,proto3" json:"simple,omitempty"` | ||||
| 	Simples     []string                `protobuf:"bytes,4,rep,name=simples,proto3" json:"simples,omitempty"` | ||||
| 	Strings     []string                `protobuf:"bytes,4,rep,name=strings,proto3" json:"strings,omitempty"` | ||||
| 	Simples     []*Simple               `protobuf:"bytes,27,rep,name=simples,proto3" json:"simples,omitempty"` | ||||
| 	B           bool                    `protobuf:"varint,5,opt,name=b,proto3" json:"b,omitempty"` | ||||
| 	Sex         Sex                     `protobuf:"varint,6,opt,name=sex,proto3,enum=testproto.Sex" json:"sex,omitempty"` | ||||
| 	Age         int32                   `protobuf:"varint,7,opt,name=age,proto3" json:"age,omitempty"` | ||||
| @@ -158,7 +159,14 @@ func (x *Complex) GetSimple() *Simple { | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func (x *Complex) GetSimples() []string { | ||||
| func (x *Complex) GetStrings() []string { | ||||
| 	if x != nil { | ||||
| 		return x.Strings | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func (x *Complex) GetSimples() []*Simple { | ||||
| 	if x != nil { | ||||
| 		return x.Simples | ||||
| 	} | ||||
| @@ -378,90 +386,93 @@ var file_complex_proto_rawDesc = []byte{ | ||||
| 	0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, | ||||
| 	0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, | ||||
| 	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, | ||||
| 	0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x09, | ||||
| 	0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb2, 0x09, | ||||
| 	0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, | ||||
| 	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x06, 0x6e, 0x6f, 0x5f, | ||||
| 	0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x62, 0x65, | ||||
| 	0x72, 0x4f, 0x6e, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x03, | ||||
| 	0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, | ||||
| 	0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x69, | ||||
| 	0x6d, 0x70, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, | ||||
| 	0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x0c, | ||||
| 	0x0a, 0x01, 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x01, 0x62, 0x12, 0x20, 0x0a, 0x03, | ||||
| 	0x73, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, | ||||
| 	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x10, | ||||
| 	0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, | ||||
| 	0x12, 0x0c, 0x0a, 0x01, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x01, 0x61, 0x12, 0x14, | ||||
| 	0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, | ||||
| 	0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, | ||||
| 	0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x64, 0x18, | ||||
| 	0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x01, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x79, 0x74, 0x65, | ||||
| 	0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x79, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x09, | ||||
| 	0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, | ||||
| 	0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | ||||
| 	0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, | ||||
| 	0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, | ||||
| 	0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, | ||||
| 	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, | ||||
| 	0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, | ||||
| 	0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, | ||||
| 	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, | ||||
| 	0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, | ||||
| 	0x34, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, | ||||
| 	0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | ||||
| 	0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x64, | ||||
| 	0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x11, | ||||
| 	0x6d, 0x70, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, | ||||
| 	0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2b, | ||||
| 	0x0a, 0x07, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, | ||||
| 	0x11, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x69, 0x6d, 0x70, | ||||
| 	0x6c, 0x65, 0x52, 0x07, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x62, | ||||
| 	0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x01, 0x62, 0x12, 0x20, 0x0a, 0x03, 0x73, 0x65, 0x78, | ||||
| 	0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, | ||||
| 	0x74, 0x6f, 0x2e, 0x73, 0x65, 0x78, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x61, | ||||
| 	0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x0c, 0x0a, | ||||
| 	0x01, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x01, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, | ||||
| 	0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, | ||||
| 	0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, | ||||
| 	0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x64, 0x18, 0x0b, 0x20, 0x01, | ||||
| 	0x28, 0x01, 0x52, 0x01, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x79, 0x74, 0x65, 0x18, 0x0c, 0x20, | ||||
| 	0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x79, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, | ||||
| 	0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, | ||||
| 	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, | ||||
| 	0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, | ||||
| 	0x61, 0x6d, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, | ||||
| 	0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, | ||||
| 	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, | ||||
| 	0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x66, 0x69, | ||||
| 	0x65, 0x6c, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, | ||||
| 	0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, | ||||
| 	0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x34, 0x0a, 0x06, | ||||
| 	0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, | ||||
| 	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, | ||||
| 	0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, | ||||
| 	0x6c, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, | ||||
| 	0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, | ||||
| 	0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, | ||||
| 	0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x12, | ||||
| 	0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, | ||||
| 	0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, | ||||
| 	0x65, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, | ||||
| 	0x34, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, | ||||
| 	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, | ||||
| 	0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x31, 0x0a, 0x05, 0x69, | ||||
| 	0x6e, 0x74, 0x33, 0x32, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, | ||||
| 	0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, | ||||
| 	0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x34, | ||||
| 	0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, | ||||
| 	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, | ||||
| 	0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x75, 0x69, | ||||
| 	0x6e, 0x74, 0x36, 0x34, 0x12, 0x34, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x15, | ||||
| 	0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, | ||||
| 	0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, | ||||
| 	0x75, 0x65, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2e, 0x0a, 0x04, 0x62, 0x6f, | ||||
| 	0x6f, 0x6c, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, | ||||
| 	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, | ||||
| 	0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, | ||||
| 	0x72, 0x69, 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, | ||||
| 	0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, | ||||
| 	0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, | ||||
| 	0x12, 0x31, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, | ||||
| 	0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, | ||||
| 	0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x62, 0x79, | ||||
| 	0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, | ||||
| 	0x32, 0x1b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, | ||||
| 	0x70, 0x6c, 0x65, 0x78, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6d, | ||||
| 	0x61, 0x70, 0x12, 0x49, 0x0a, 0x0d, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, | ||||
| 	0x6b, 0x65, 0x79, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x73, 0x74, | ||||
| 	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x2e, 0x4d, 0x61, | ||||
| 	0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, | ||||
| 	0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x79, 0x1a, 0x36, 0x0a, | ||||
| 	0x08, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, | ||||
| 	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, | ||||
| 	0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, | ||||
| 	0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x36, | ||||
| 	0x34, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, | ||||
| 	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, | ||||
| 	0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, | ||||
| 	0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x26, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, | ||||
| 	0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, | ||||
| 	0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2a, 0x19, 0x0a, | ||||
| 	0x03, 0x73, 0x65, 0x78, 0x12, 0x07, 0x0a, 0x03, 0x6d, 0x61, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, | ||||
| 	0x05, 0x77, 0x6f, 0x6d, 0x61, 0x6e, 0x10, 0x01, 0x42, 0x57, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, | ||||
| 	0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, | ||||
| 	0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, | ||||
| 	0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x69, | ||||
| 	0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, | ||||
| 	0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x2f, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, | ||||
| 	0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | ||||
| 	0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, | ||||
| 	0x65, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, | ||||
| 	0x32, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, | ||||
| 	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, | ||||
| 	0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x34, 0x0a, 0x06, 0x75, | ||||
| 	0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, | ||||
| 	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, | ||||
| 	0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, | ||||
| 	0x34, 0x12, 0x34, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x15, 0x20, 0x01, 0x28, | ||||
| 	0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, | ||||
| 	0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, | ||||
| 	0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2e, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, | ||||
| 	0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, | ||||
| 	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, | ||||
| 	0x65, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, | ||||
| 	0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, | ||||
| 	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, | ||||
| 	0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x31, 0x0a, | ||||
| 	0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, | ||||
| 	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, | ||||
| 	0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, | ||||
| 	0x12, 0x2d, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, | ||||
| 	0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, | ||||
| 	0x78, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x12, | ||||
| 	0x49, 0x0a, 0x0d, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x79, | ||||
| 	0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, | ||||
| 	0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x2e, 0x4d, 0x61, 0x70, 0x49, 0x6e, | ||||
| 	0x74, 0x36, 0x34, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x6d, 0x61, 0x70, | ||||
| 	0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x6b, 0x65, 0x79, 0x1a, 0x36, 0x0a, 0x08, 0x4d, 0x61, | ||||
| 	0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, | ||||
| 	0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, | ||||
| 	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, | ||||
| 	0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x4d, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x4b, 0x65, | ||||
| 	0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, | ||||
| 	0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, | ||||
| 	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, | ||||
| 	0x38, 0x01, 0x22, 0x26, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, | ||||
| 	0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, | ||||
| 	0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2a, 0x19, 0x0a, 0x03, 0x73, 0x65, | ||||
| 	0x78, 0x12, 0x07, 0x0a, 0x03, 0x6d, 0x61, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x77, 0x6f, | ||||
| 	0x6d, 0x61, 0x6e, 0x10, 0x01, 0x42, 0x57, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, | ||||
| 	0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2d, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x6b, 0x72, | ||||
| 	0x61, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, | ||||
| 	0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x69, 0x6e, 0x74, 0x65, | ||||
| 	0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, | ||||
| 	0x6d, 0x70, 0x6c, 0x65, 0x78, 0x2f, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x62, 0x06, | ||||
| 	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | ||||
| } | ||||
|  | ||||
| var ( | ||||
| @@ -499,26 +510,27 @@ var file_complex_proto_goTypes = []interface{}{ | ||||
| } | ||||
| var file_complex_proto_depIdxs = []int32{ | ||||
| 	2,  // 0: testproto.Complex.simple:type_name -> testproto.Simple | ||||
| 	0,  // 1: testproto.Complex.sex:type_name -> testproto.sex | ||||
| 	5,  // 2: testproto.Complex.timestamp:type_name -> google.protobuf.Timestamp | ||||
| 	6,  // 3: testproto.Complex.duration:type_name -> google.protobuf.Duration | ||||
| 	7,  // 4: testproto.Complex.field:type_name -> google.protobuf.FieldMask | ||||
| 	8,  // 5: testproto.Complex.double:type_name -> google.protobuf.DoubleValue | ||||
| 	9,  // 6: testproto.Complex.float:type_name -> google.protobuf.FloatValue | ||||
| 	10, // 7: testproto.Complex.int64:type_name -> google.protobuf.Int64Value | ||||
| 	11, // 8: testproto.Complex.int32:type_name -> google.protobuf.Int32Value | ||||
| 	12, // 9: testproto.Complex.uint64:type_name -> google.protobuf.UInt64Value | ||||
| 	13, // 10: testproto.Complex.uint32:type_name -> google.protobuf.UInt32Value | ||||
| 	14, // 11: testproto.Complex.bool:type_name -> google.protobuf.BoolValue | ||||
| 	15, // 12: testproto.Complex.string:type_name -> google.protobuf.StringValue | ||||
| 	16, // 13: testproto.Complex.bytes:type_name -> google.protobuf.BytesValue | ||||
| 	3,  // 14: testproto.Complex.map:type_name -> testproto.Complex.MapEntry | ||||
| 	4,  // 15: testproto.Complex.map_int64_key:type_name -> testproto.Complex.MapInt64KeyEntry | ||||
| 	16, // [16:16] is the sub-list for method output_type | ||||
| 	16, // [16:16] is the sub-list for method input_type | ||||
| 	16, // [16:16] is the sub-list for extension type_name | ||||
| 	16, // [16:16] is the sub-list for extension extendee | ||||
| 	0,  // [0:16] is the sub-list for field type_name | ||||
| 	2,  // 1: testproto.Complex.simples:type_name -> testproto.Simple | ||||
| 	0,  // 2: testproto.Complex.sex:type_name -> testproto.sex | ||||
| 	5,  // 3: testproto.Complex.timestamp:type_name -> google.protobuf.Timestamp | ||||
| 	6,  // 4: testproto.Complex.duration:type_name -> google.protobuf.Duration | ||||
| 	7,  // 5: testproto.Complex.field:type_name -> google.protobuf.FieldMask | ||||
| 	8,  // 6: testproto.Complex.double:type_name -> google.protobuf.DoubleValue | ||||
| 	9,  // 7: testproto.Complex.float:type_name -> google.protobuf.FloatValue | ||||
| 	10, // 8: testproto.Complex.int64:type_name -> google.protobuf.Int64Value | ||||
| 	11, // 9: testproto.Complex.int32:type_name -> google.protobuf.Int32Value | ||||
| 	12, // 10: testproto.Complex.uint64:type_name -> google.protobuf.UInt64Value | ||||
| 	13, // 11: testproto.Complex.uint32:type_name -> google.protobuf.UInt32Value | ||||
| 	14, // 12: testproto.Complex.bool:type_name -> google.protobuf.BoolValue | ||||
| 	15, // 13: testproto.Complex.string:type_name -> google.protobuf.StringValue | ||||
| 	16, // 14: testproto.Complex.bytes:type_name -> google.protobuf.BytesValue | ||||
| 	3,  // 15: testproto.Complex.map:type_name -> testproto.Complex.MapEntry | ||||
| 	4,  // 16: testproto.Complex.map_int64_key:type_name -> testproto.Complex.MapInt64KeyEntry | ||||
| 	17, // [17:17] is the sub-list for method output_type | ||||
| 	17, // [17:17] is the sub-list for method input_type | ||||
| 	17, // [17:17] is the sub-list for extension type_name | ||||
| 	17, // [17:17] is the sub-list for extension extendee | ||||
| 	0,  // [0:17] is the sub-list for field type_name | ||||
| } | ||||
|  | ||||
| func init() { file_complex_proto_init() } | ||||
|   | ||||
							
								
								
									
										3
									
								
								internal/testdata/complex/complex.proto
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								internal/testdata/complex/complex.proto
									
									
									
									
										vendored
									
									
								
							| @@ -15,7 +15,8 @@ message Complex { | ||||
|   int64 id = 1; | ||||
|   string no_one = 2 [json_name = "numberOne"]; | ||||
|   Simple simple = 3 [json_name = "very_simple"]; | ||||
|   repeated string simples = 4; | ||||
|   repeated string strings = 4; | ||||
|   repeated Simple simples = 27; | ||||
|   bool b = 5; | ||||
|   sex sex = 6; | ||||
|   int32 age = 7; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user