-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdns.proto
46 lines (37 loc) · 921 Bytes
/
dns.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
syntax = "proto3";
package dnsService;
option go_package = "github.com/hm-edu/portal-apis";
import "google/protobuf/empty.proto";
service DNSService {
rpc List(ListRequest) returns (ListResponse) {}
rpc Add(AddRequest) returns (google.protobuf.Empty) {}
rpc Update(UpdateRequest) returns (google.protobuf.Empty) {}
rpc Delete(DeleteRequest) returns (google.protobuf.Empty) {}
}
message ListRequest {
string domain = 1;
string zone = 2;
}
message ListResponse { repeated DNSRecord records = 1; }
message DNSRecord {
string name = 1;
string type = 2;
string content = 3;
int32 ttl = 4;
}
message AddRequest {
repeated DNSRecord records = 1;
string zone = 2;
}
message DeleteRequest {
repeated DNSRecord records = 1;
string zone = 2;
}
message UpdateRequest {
message UpdateSet {
DNSRecord old = 1;
DNSRecord new = 2;
}
repeated UpdateSet updates = 1;
string zone = 2;
}