44 lines
1.1 KiB
Protocol Buffer
44 lines
1.1 KiB
Protocol Buffer
syntax="proto3";
|
|
package bts.api.gateway;
|
|
option csharp_namespace="bts.api.gateway";
|
|
|
|
message GatewayLogin {
|
|
string username = 1;
|
|
string password = 2;
|
|
}
|
|
message GatewayLoginResult {
|
|
bool is_valid = 1;
|
|
string reason = 2;
|
|
string token = 3;
|
|
bool can_create = 4;
|
|
}
|
|
message GatewayCallHeader {
|
|
int32 request_id = 1;
|
|
int32 method = 2;
|
|
string token = 3;
|
|
string service_type = 4;
|
|
string service_qualifier = 5;
|
|
}
|
|
|
|
message GatewaySubscribe { }
|
|
message GatewayUnsubscribe {}
|
|
message GatewayRequest {
|
|
oneof request {
|
|
GatewayLogin login = 1;
|
|
// Call and subscribe are lazy on the server
|
|
// proxy is not generated until first call
|
|
// client can determine if a service "should" exist.
|
|
// If the types are there server will return OK regardless
|
|
GatewayCallHeader call = 2;
|
|
GatewaySubscribe subscribe = 3;
|
|
GatewayUnsubscribe unsubscribe = 4;
|
|
}
|
|
bytes addendum = 100;
|
|
}
|
|
message GatewayResponse {
|
|
oneof response {
|
|
GatewayLoginResult logon = 1;
|
|
bytes call_result = 2;
|
|
string error = 10;
|
|
}
|
|
} |