add vouchers to QueryRequest (#2559)

This commit is contained in:
Cameron 2019-07-15 18:02:22 -04:00 committed by GitHub
parent 3a34a0df7b
commit 8b2d46a974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 39 deletions

View File

@ -83,13 +83,14 @@ func (Restriction_Operand) EnumDescriptor() ([]byte, []int) {
} }
type QueryRequest struct { type QueryRequest struct {
Sender *Node `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Sender *Node `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
Target *Node `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` Target *Node `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
Pingback bool `protobuf:"varint,4,opt,name=pingback,proto3" json:"pingback,omitempty"` Pingback bool `protobuf:"varint,4,opt,name=pingback,proto3" json:"pingback,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` Vouchers []*Voucher `protobuf:"bytes,5,rep,name=vouchers,proto3" json:"vouchers,omitempty"`
XXX_unrecognized []byte `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *QueryRequest) Reset() { *m = QueryRequest{} } func (m *QueryRequest) Reset() { *m = QueryRequest{} }
@ -144,6 +145,13 @@ func (m *QueryRequest) GetPingback() bool {
return false return false
} }
func (m *QueryRequest) GetVouchers() []*Voucher {
if m != nil {
return m.Vouchers
}
return nil
}
type QueryResponse struct { type QueryResponse struct {
Sender *Node `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Sender *Node `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
Response []*Node `protobuf:"bytes,2,rep,name=response,proto3" json:"response,omitempty"` Response []*Node `protobuf:"bytes,2,rep,name=response,proto3" json:"response,omitempty"`
@ -412,38 +420,40 @@ func init() {
func init() { proto.RegisterFile("overlay.proto", fileDescriptor_61fc82527fbe24ad) } func init() { proto.RegisterFile("overlay.proto", fileDescriptor_61fc82527fbe24ad) }
var fileDescriptor_61fc82527fbe24ad = []byte{ var fileDescriptor_61fc82527fbe24ad = []byte{
// 491 bytes of a gzipped FileDescriptorProto // 518 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xdf, 0x8a, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcf, 0x8b, 0xd3, 0x40,
0x14, 0xc6, 0x77, 0xda, 0x74, 0x13, 0x4f, 0xff, 0x10, 0x87, 0x5d, 0x09, 0x41, 0xa1, 0xe4, 0x42, 0x14, 0xc7, 0x77, 0xfa, 0x33, 0xbe, 0xfe, 0x20, 0x3b, 0xec, 0x4a, 0x28, 0x0a, 0x25, 0x07, 0x29,
0x0a, 0x4a, 0x2e, 0xba, 0xb2, 0xa0, 0x77, 0xae, 0x8d, 0x6b, 0x71, 0x59, 0xdd, 0x31, 0x28, 0xe8, 0xa8, 0x39, 0x64, 0x65, 0x41, 0x6f, 0xae, 0x8d, 0x6b, 0x71, 0x59, 0xdd, 0x31, 0xac, 0xa0, 0x07,
0x85, 0xa4, 0xcd, 0x18, 0x82, 0x75, 0x26, 0x4e, 0xa6, 0x85, 0xbc, 0x81, 0x8f, 0xe3, 0x1b, 0xf8, 0x49, 0x93, 0x31, 0x06, 0xeb, 0x4c, 0x9c, 0x4c, 0x0b, 0xf9, 0xaf, 0xbc, 0x79, 0xf4, 0xff, 0xf2,
0x5e, 0x5e, 0xc9, 0x4c, 0x26, 0x69, 0xac, 0x0a, 0x5e, 0xcd, 0x9c, 0xf3, 0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 0xe9, 0xa5, 0x7b, 0xcb, 0xd5, 0x9b, 0x97, 0x36, 0xf2, 0xbf, 0x21, 0xe8, 0xab, 0xad, 0x14, 0xf8, 0x14,
0x41, 0xd6, 0x14, 0x3d, 0x51, 0x2b, 0xd7, 0x84, 0xf2, 0x4e, 0xa7, 0xb6, 0x63, 0xad, 0x4e, 0x6d, 0xfa, 0x3a, 0x53, 0xf8, 0xb8, 0xf1, 0xdc, 0xfe, 0x38, 0x66, 0xb7, 0x6f, 0xb6, 0xcd, 0xff, 0x7d,
0xd7, 0x60, 0x17, 0xd6, 0xfb, 0x5e, 0xb1, 0x5a, 0x1d, 0xeb, 0x8f, 0xf2, 0xec, 0x57, 0x00, 0x00, 0x02, 0x3d, 0x95, 0x0f, 0x7c, 0xd4, 0xe8, 0xad, 0xf4, 0xcc, 0x8e, 0x6f, 0x74, 0xcd, 0xd0, 0x13,
0x00, 0xff, 0xff, 0x6b, 0xb9, 0x2c, 0xac, 0xc6, 0x03, 0x00, 0x00, 0xb5, 0x72, 0x4d, 0xa8, 0xec, 0xb4, 0x66, 0x5b, 0xd1, 0x6a, 0xcd, 0xb6, 0x03, 0x76, 0xd6, 0x7b,
0xd7, 0xc9, 0xd7, 0xeb, 0x81, 0xfe, 0x86, 0x4f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xae, 0xb0,
0xad, 0x04, 0x05, 0x04, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.

View File

@ -6,6 +6,7 @@ option go_package = "pb";
import "gogo.proto"; import "gogo.proto";
import "node.proto"; import "node.proto";
import "vouchers.proto";
package overlay; package overlay;
@ -20,6 +21,7 @@ message QueryRequest {
node.Node target = 2; node.Node target = 2;
int64 limit = 3; int64 limit = 3;
bool pingback = 4; bool pingback = 4;
repeated vouchers.Voucher vouchers = 5;
} }
message QueryResponse { message QueryResponse {

View File

@ -3297,6 +3297,12 @@
"id": 4, "id": 4,
"name": "pingback", "name": "pingback",
"type": "bool" "type": "bool"
},
{
"id": 5,
"name": "vouchers",
"type": "vouchers.Voucher",
"is_repeated": true
} }
] ]
}, },
@ -3399,6 +3405,9 @@
}, },
{ {
"path": "node.proto" "path": "node.proto"
},
{
"path": "vouchers.proto"
} }
], ],
"package": { "package": {