Skip to content
Snippets Groups Projects
Commit 523ffb9e authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

added error fields to responces

parent 0be9de3b
No related branches found
No related tags found
No related merge requests found
...@@ -221,6 +221,7 @@ type SearchResponse struct { ...@@ -221,6 +221,7 @@ type SearchResponse struct {
// ID of the session created // ID of the session created
Contacts []*Contact `protobuf:"bytes,1,rep,name=contacts,proto3" json:"contacts,omitempty"` Contacts []*Contact `protobuf:"bytes,1,rep,name=contacts,proto3" json:"contacts,omitempty"`
CommID int64 `protobuf:"varint,2,opt,name=commID,proto3" json:"commID,omitempty"` CommID int64 `protobuf:"varint,2,opt,name=commID,proto3" json:"commID,omitempty"`
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
} }
func (x *SearchResponse) Reset() { func (x *SearchResponse) Reset() {
...@@ -269,6 +270,13 @@ func (x *SearchResponse) GetCommID() int64 { ...@@ -269,6 +270,13 @@ func (x *SearchResponse) GetCommID() int64 {
return 0 return 0
} }
func (x *SearchResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
// Message sent to UDB for looking up a user // Message sent to UDB for looking up a user
type LookupSend struct { type LookupSend struct {
state protoimpl.MessageState state protoimpl.MessageState
...@@ -333,6 +341,7 @@ type LookupResponse struct { ...@@ -333,6 +341,7 @@ type LookupResponse struct {
PubKey []byte `protobuf:"bytes,1,opt,name=pubKey,proto3" json:"pubKey,omitempty"` PubKey []byte `protobuf:"bytes,1,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
CommID int64 `protobuf:"varint,2,opt,name=commID,proto3" json:"commID,omitempty"` CommID int64 `protobuf:"varint,2,opt,name=commID,proto3" json:"commID,omitempty"`
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
} }
func (x *LookupResponse) Reset() { func (x *LookupResponse) Reset() {
...@@ -381,6 +390,13 @@ func (x *LookupResponse) GetCommID() int64 { ...@@ -381,6 +390,13 @@ func (x *LookupResponse) GetCommID() int64 {
return 0 return 0
} }
func (x *LookupResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
var File_udMessages_proto protoreflect.FileDescriptor var File_udMessages_proto protoreflect.FileDescriptor
var file_udMessages_proto_rawDesc = []byte{ var file_udMessages_proto_rawDesc = []byte{
...@@ -400,21 +416,24 @@ var file_udMessages_proto_rawDesc = []byte{ ...@@ -400,21 +416,24 @@ var file_udMessages_proto_rawDesc = []byte{
0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68,
0x46, 0x61, 0x63, 0x74, 0x52, 0x04, 0x66, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x46, 0x61, 0x63, 0x74, 0x52, 0x04, 0x66, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f,
0x6d, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6d, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
0x49, 0x44, 0x22, 0x54, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x49, 0x44, 0x22, 0x6a, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x43, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x43,
0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73,
0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x22, 0x3c, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
0x75, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3c,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06,
0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x75, 0x73,
0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x22, 0x40, 0x0a, 0x0e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x18, 0x02,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x22, 0x56, 0x0a, 0x0e,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16,
0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06,
0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x42, 0x04, 0x5a, 0x02, 0x75, 0x64, 0x62, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x49, 0x44, 0x12, 0x14,
0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x42, 0x04, 0x5a, 0x02, 0x75, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
} }
var ( var (
......
...@@ -38,6 +38,7 @@ message SearchResponse { ...@@ -38,6 +38,7 @@ message SearchResponse {
// ID of the session created // ID of the session created
repeated Contact contacts = 1; repeated Contact contacts = 1;
int64 commID = 2; int64 commID = 2;
string error = 3;
} }
// Message sent to UDB for looking up a user // Message sent to UDB for looking up a user
...@@ -50,4 +51,5 @@ message LookupSend { ...@@ -50,4 +51,5 @@ message LookupSend {
message LookupResponse { message LookupResponse {
bytes pubKey = 1; bytes pubKey = 1;
int64 commID = 2; int64 commID = 2;
string error = 3;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment