forked from Ecdar/Ecdar-ProtoBuf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
services.proto
59 lines (45 loc) · 2.57 KB
/
services.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
syntax = "proto3";
package EcdarProtoBuf;
option java_multiple_files = false;
option java_package = "EcdarProtoBuf";
option java_outer_classname = "ServiceProtos";
import "query.proto";
import "api.proto";
import "google/protobuf/empty.proto";
service EcdarBackend {
rpc GetUserToken(google.protobuf.Empty) returns (UserTokenResponse);
rpc SendQuery(QueryRequest) returns (QueryResponse);
rpc StartSimulation(SimulationStartRequest) returns (SimulationStepResponse);
rpc TakeSimulationStep(SimulationStepRequest) returns (SimulationStepResponse);
}
// API service, endpoints are protected and require a valid access token
service EcdarApi {
rpc GetProject(GetProjectRequest) returns (GetProjectResponse);
rpc CreateProject(CreateProjectRequest) returns (CreateProjectResponse);
rpc UpdateProject(UpdateProjectRequest) returns (google.protobuf.Empty);
rpc DeleteProject(DeleteProjectRequest) returns (google.protobuf.Empty);
rpc ListProjectsInfo(google.protobuf.Empty) returns (ListProjectsInfoResponse);
rpc ListAccessInfo(ListAccessInfoRequest) returns (ListAccessInfoResponse);
rpc CreateAccess(CreateAccessRequest) returns (google.protobuf.Empty);
rpc UpdateAccess(UpdateAccessRequest) returns (google.protobuf.Empty);
rpc DeleteAccess(DeleteAccessRequest) returns (google.protobuf.Empty);
rpc UpdateUser(UpdateUserRequest) returns (google.protobuf.Empty);
rpc DeleteUser(google.protobuf.Empty) returns (google.protobuf.Empty);
rpc GetUsers(GetUsersRequest) returns (GetUsersResponse);
// The three endpoints below are planned to be deprecated
// Query handling will become part of `UpdateProject`
rpc CreateQuery(CreateQueryRequest) returns (google.protobuf.Empty);
rpc UpdateQuery(UpdateQueryRequest) returns (google.protobuf.Empty);
rpc DeleteQuery(DeleteQueryRequest) returns (google.protobuf.Empty);
// Same as `SendQuery` in the `EcdarBackend` service but also saves the result of the query in th DB
rpc SendQuery(SendQueryRequest) returns (SendQueryResponse);
// Logout the user by deleting their session identified by the access token
rpc DeleteSession(google.protobuf.Empty) returns (google.protobuf.Empty);
}
service EcdarApiAuth {
// Get a new access and refresh token using either a previous refresh token or user credentials
rpc GetAuthToken(GetAuthTokenRequest) returns (GetAuthTokenResponse);
// Create a new user with username, email and password
rpc CreateUser(CreateUserRequest) returns (google.protobuf.Empty);
rpc Endpoints(google.protobuf.Empty) returns (EndpointsResponse);
}