-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaudit.proto
65 lines (53 loc) · 1.25 KB
/
audit.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
60
61
62
63
64
65
syntax = "proto3";
package api;
import "google/protobuf/timestamp.proto";
message Audit {
// @inject_tag: bson:"_id"
string ID = 1;
// @inject_tag: bson:"username"
string Username = 2;
// @inject_tag: bson:"action"
string Action = 3;
// @inject_tag: bson:"session"
string Session = 4;
// @inject_tag: bson:"createdby"
string CreatedBy = 5;
// @inject_tag: bson:"createdat"
google.protobuf.Timestamp CreatedAt = 6;
}
message AuditListReq {
// do not filter
}
message AuditListRes {
// return a collection of Audits
repeated Audit Audits = 1;
}
message AuditList100Req {
// do not filter
}
message AuditList100Res {
// return a collection of Audits
repeated Audit Audits = 1;
}
message AuditCreateReq {
// create a Audit
Audit Audit = 1;
}
message AuditCreateRes {
// reutrn an id
string ID = 1;
}
message AuditReadReq {
// read a Audit by id
string ID = 1;
}
message AuditReadRes {
// return a Audit
Audit Audit = 1;
}
service AuditService {
rpc List(AuditListReq) returns (AuditListRes);
rpc List100(AuditList100Req) returns (AuditList100Res);
rpc Create(AuditCreateReq) returns (AuditCreateRes);
rpc Read(AuditReadReq) returns (AuditReadRes);
}