Skip to content
Snippets Groups Projects
Commit 825078f1 authored by Pawan Rawal's avatar Pawan Rawal
Browse files

Made changes to proto file for GraphResponse

parent 72d70527
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ var _ = math.Inf ...@@ -29,7 +29,7 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion1 const _ = proto.ProtoPackageIsVersion1
type UidList struct { type UidList struct {
Uids []uint64 `protobuf:"fixed64,1,rep,name=uids" json:"uids,omitempty"` Uids []uint64 `protobuf:"varint,1,rep,name=uids" json:"uids,omitempty"`
} }
func (m *UidList) Reset() { *m = UidList{} } func (m *UidList) Reset() { *m = UidList{} }
...@@ -56,8 +56,8 @@ func (m *Result) GetUidmatrix() []*UidList { ...@@ -56,8 +56,8 @@ func (m *Result) GetUidmatrix() []*UidList {
type GraphResponse struct { type GraphResponse struct {
Attribute string `protobuf:"bytes,1,opt,name=attribute" json:"attribute,omitempty"` Attribute string `protobuf:"bytes,1,opt,name=attribute" json:"attribute,omitempty"`
Children []*GraphResponse `protobuf:"bytes,2,rep,name=children" json:"children,omitempty"` Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
Result *Result `protobuf:"bytes,3,opt,name=result" json:"result,omitempty"` Children []*GraphResponse `protobuf:"bytes,3,rep,name=children" json:"children,omitempty"`
} }
func (m *GraphResponse) Reset() { *m = GraphResponse{} } func (m *GraphResponse) Reset() { *m = GraphResponse{} }
...@@ -65,16 +65,16 @@ func (m *GraphResponse) String() string { return proto.CompactTextStr ...@@ -65,16 +65,16 @@ func (m *GraphResponse) String() string { return proto.CompactTextStr
func (*GraphResponse) ProtoMessage() {} func (*GraphResponse) ProtoMessage() {}
func (*GraphResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } func (*GraphResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *GraphResponse) GetChildren() []*GraphResponse { func (m *GraphResponse) GetResult() *Result {
if m != nil { if m != nil {
return m.Children return m.Result
} }
return nil return nil
} }
func (m *GraphResponse) GetResult() *Result { func (m *GraphResponse) GetChildren() []*GraphResponse {
if m != nil { if m != nil {
return m.Result return m.Children
} }
return nil return nil
} }
...@@ -86,18 +86,19 @@ func init() { ...@@ -86,18 +86,19 @@ func init() {
} }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 207 bytes of a gzipped FileDescriptorProto // 209 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x54, 0x8f, 0xcd, 0x4a, 0xc4, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x54, 0x8f, 0xbf, 0x4a, 0xc5, 0x30,
0x14, 0x46, 0x69, 0x2b, 0xd1, 0xde, 0xea, 0xc2, 0x2b, 0x48, 0x17, 0x0a, 0x92, 0x55, 0x5d, 0xd8, 0x14, 0xc6, 0xc9, 0xbd, 0x25, 0xda, 0x53, 0x1d, 0x3c, 0x82, 0x74, 0x50, 0x90, 0x4c, 0x75, 0xb0,
0x45, 0x7d, 0x08, 0x17, 0xba, 0xba, 0xe0, 0x03, 0x24, 0x36, 0xd8, 0x40, 0x6d, 0x43, 0x7e, 0x64, 0x83, 0x3e, 0x84, 0x83, 0x4e, 0x07, 0x7c, 0x80, 0xc4, 0x06, 0x1b, 0xa8, 0x6d, 0xc8, 0x1f, 0x71,
0x96, 0xf3, 0xe8, 0x93, 0xb6, 0x61, 0xca, 0xec, 0x92, 0x9c, 0x8f, 0xc3, 0x09, 0x3c, 0xfc, 0x5a, 0xf4, 0xd1, 0x4d, 0xd3, 0x60, 0xb9, 0x5b, 0x92, 0xdf, 0xc7, 0xef, 0xfb, 0x02, 0xd7, 0x9f, 0x4e,
0x61, 0x06, 0xab, 0x9c, 0x99, 0x27, 0xa7, 0x5a, 0x63, 0x67, 0x3f, 0x63, 0x6e, 0x24, 0x7f, 0x86, 0xda, 0xd1, 0x69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0x5f, 0x28, 0xe8, 0x3c, 0x41, 0x0e, 0xcb, 0xe5, 0xc9, 0xcb, 0x92, 0x17, 0x56, 0xef, 0x36, 0x87, 0x0a, 0xc1, 0x47, 0x38, 0xff, 0x18,
0xcc, 0xae, 0xad, 0x75, 0x11, 0x4d, 0x55, 0x07, 0xcb, 0x78, 0xab, 0xa7, 0x44, 0x24, 0x5b, 0x7f, 0xcd, 0x34, 0x38, 0x3d, 0xb7, 0xc7, 0xdc, 0x7e, 0xb5, 0xa6, 0x4e, 0x6a, 0xe8, 0x3f, 0xa2, 0x78,
0xfe, 0x7e, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x26, 0xe5, 0x36, 0x59, 0x10, 0x01, 0x00, 0x00, 0xfe, 0xf9, 0xf3, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x1f, 0x18, 0x20, 0x10, 0x01, 0x00,
0x00,
} }
...@@ -2,7 +2,7 @@ syntax="proto3"; ...@@ -2,7 +2,7 @@ syntax="proto3";
package pb; package pb;
message UidList { message UidList {
repeated fixed64 uids = 1; repeated uint64 uids = 1;
} }
message Result { message Result {
...@@ -12,6 +12,6 @@ message Result { ...@@ -12,6 +12,6 @@ message Result {
message GraphResponse { message GraphResponse {
string attribute = 1; string attribute = 1;
repeated GraphResponse children = 2; //Each node can have multiple children Result result = 2;
Result result = 3; repeated GraphResponse children = 3; // Each node can have multiple children
} }
...@@ -375,7 +375,8 @@ func TestToProtocolBuffer(t *testing.T) { ...@@ -375,7 +375,8 @@ func TestToProtocolBuffer(t *testing.T) {
t.Errorf("Expected attr name. Got: %v", child.Attribute) t.Errorf("Expected attr name. Got: %v", child.Attribute)
} }
if string(child.Result.Values[0]) != "Michonne" { if string(child.Result.Values[0]) != "Michonne" {
t.Errorf("Expected value Michonne. Got %v", string(child.Result.Values[0])) t.Errorf("Expected value Michonne. Got %v",
string(child.Result.Values[0]))
} }
child = ugr.Children[3] child = ugr.Children[3]
if child.Attribute != "friend" { if child.Attribute != "friend" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment