Goby v2
database_request.proto
1 
2 import "google/protobuf/descriptor.proto";
3 import "goby/pb/protobuf/interprocess_notification.proto";
4 import "goby/common/protobuf/option_extensions.proto";
5 
6 package goby.common.protobuf;
7 
8 message DatabaseRequest
9 {
10  enum RequestType
11  {
12  NEW_PUBLISH = 1;
13  SQL_QUERY = 2;
14  }
15  required RequestType request_type = 1;
16 
17  // used to inform gobyd of the google protobuf type used for a
18  // given publish request
19  optional string publish_protobuf_full_name = 2;
20  repeated .google.protobuf.FileDescriptorProto file_descriptor_proto = 3;
21 }
22 
23 message DatabaseResponse
24 {
25  enum ResponseType
26  {
27  NEW_PUBLISH_ACCEPTED = 1;
28  NEW_PUBLISH_DENIED = 2;
29  SQL_QUERY_RESULT = 3;
30  SQL_QUERY_INVALID = 4;
31  }
32  required ResponseType response_type = 1;
33 
34  repeated EmbeddedMessage sql_result = 2;
35 }
36 
37 message DatabaseClientConfig
38 {
39  optional bool using_database = 10 [
40  default = true,
41  (goby.field).description =
42  "True if using goby_database, false if no database is to be run"
43  ];
44  optional string database_address = 11 [
45  (goby.field).example = "127.0.0.1",
46  (goby.field).description =
47  "TCP address to send database requests on. If omitted and "
48  "using_database==true, `ethernet_address` is used"
49  ];
50  optional uint32 database_port = 12 [
51  (goby.field).example = "11142",
52  (goby.field).description =
53  "TCP port to send database requests on. If omitted and "
54  "using_database==true, `ethernet_port` is used"
55  ];
56 }