-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdomains.proto
84 lines (67 loc) · 1.97 KB
/
domains.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
syntax = "proto3";
package domains;
option go_package = "github.com/cubex/proto-go/domains";
import "google/protobuf/timestamp.proto";
message LookupRequest {
string domain = 1; //lower case domain e.g. example.com
}
message GetDomainsRequest {
}
message CreateRequest {
string domain = 1;
}
enum VerificationMode {
DNS = 0;
FILE = 1;
MANUAL = 2;
}
message DomainResponse {
string domain = 1;
string verification = 2;
string verification_mode = 3;
string is_verified = 4;
google.protobuf.Timestamp date_verified = 5;
}
message DomainsResponse {
map<string, DomainResponse> domains = 1;
}
message VerifyRequest {
string domain = 1; //Domain to verify
}
enum DomainServiceSchema {
HTTP = 0;
HTTPS = 1;
}
message DomainServiceResponse {
string domain = 1;
string subdomain = 2;
DomainServiceSchema default_schema = 3;
repeated DomainServiceSchema availble_schema = 4;
string handler_gaid = 5;
bool is_enabled = 6;
}
message SetServiceRequest {
string domain = 1;
string subdomain = 2;
string handler_gaid = 3;
DomainServiceSchema default_schema = 4;
}
message ServiceRequest {
string domain = 1;
string subdomain = 2;
}
message DomainServicesResponse {
map<string, DomainServiceResponse> services = 1;
}
service Domains {
rpc Create (CreateRequest) returns (DomainResponse);
rpc GetDomains (GetDomainsRequest) returns (DomainsResponse);
rpc Retrieve (LookupRequest) returns (DomainResponse);
rpc Verify (VerifyRequest) returns (DomainResponse);
rpc SetService (SetServiceRequest) returns (DomainServiceResponse);
rpc RetrieveService (ServiceRequest) returns (DomainServiceResponse);
rpc GetServices (ServiceRequest) returns (DomainServicesResponse);
rpc RemoveService (ServiceRequest) returns (DomainServiceResponse);
rpc DisableService (ServiceRequest) returns (DomainServiceResponse);
rpc EnableService (ServiceRequest) returns (DomainServiceResponse);
}