-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstructor.proto
58 lines (46 loc) · 1.68 KB
/
instructor.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
syntax = "proto3";
option csharp_namespace = "GsServer.Protobufs";
import "gs_protobufs/protos/custom_types/person.proto";
import "gs_protobufs/protos/custom_types/void_value.proto";
import "google/protobuf/wrappers.proto";
package protos.instructor;
service InstructorService {
rpc GetPaginatedAsync(GetPaginatedInstructorsRequest) returns (GetPaginatedInstructorsResponse);
rpc GetByIdAsync(GetInstructorByIdRequest) returns (GetInstructorByIdResponse);
// Options are a lean data structure for dropdowns and alike
rpc GetAllOptionsAsync(custom_types.void.VoidValue) returns (GetAllInstructorsOptionsResponse);
rpc PostAsync(CreateInstructorRequest) returns (custom_types.void.VoidValue);
rpc PutAsync(UpdateInstructorRequest) returns (custom_types.void.VoidValue);
rpc DeleteAsync(DeleteInstructorRequest) returns (custom_types.void.VoidValue);
}
message GetPaginatedInstructorsRequest {
google.protobuf.StringValue cursor = 1;
}
message GetPaginatedInstructorsResponse {
repeated GetInstructorByIdResponse instructors = 1;
google.protobuf.StringValue next_cursor = 2;
}
message GetInstructorByIdRequest {
string instructor_id = 1;
}
message GetInstructorByIdResponse {
string instructor_id = 1;
custom_types.person.Person person = 2;
}
message InstructorOption {
string instructor_id = 1;
custom_types.person.Person person = 2;
}
message GetAllInstructorsOptionsResponse {
repeated InstructorOption instructor_options = 1;
}
message CreateInstructorRequest {
custom_types.person.Person person = 1;
}
message UpdateInstructorRequest {
string instructor_id = 1;
custom_types.person.Person person = 2;
}
message DeleteInstructorRequest {
string instructor_id = 1;
}