浏览代码

添加Zone服务

Shiqi 2 年之前
父节点
当前提交
a963b0f65d
共有 1 个文件被更改,包括 102 次插入0 次删除
  1. 102 0
      zone.proto

+ 102 - 0
zone.proto

@@ -0,0 +1,102 @@
+syntax = "proto3";
+
+package cloudflareApi.cache.purge;
+
+option go_package = "./cloudflareApi/zone";
+option java_multiple_files = true;
+option java_package = "io.grpc.cloudflare.zone";
+option java_outer_classname = "zoneProto";
+
+service ZoneCloudflare {
+  rpc ZoneIDByNameCloudflare (ZoneIDByNameRequestCloudflare) returns (ZoneIDByNameReplyCloudflare) {}
+  rpc ZoneDetails (ZoneDetailsRequestCloudflare) returns (ZoneDetailsReplyCloudflare){}
+  rpc GetZones (GetZonesRequestCloudflare) returns (GetZonesReplyCloudflare){}
+  rpc EditZone (EditZoneRequestCloudflare) returns (EditZoneReplyCloudflare){}
+  rpc DeleteZone (DeleteZoneRequestCloudflare) returns (DeleteZoneReplyCloudflare){}
+}
+
+message ZoneCloudflareEntity{
+  string id = 1;
+  string name = 2;
+//  sint64 development_mode = 1;
+//  string original_registrar = 1;
+//  string original_dnshost = 1;
+//  string created_on = 3;
+//  string modified_on = 4;
+//  string activated_on = 5;
+  message Plan {
+    string id = 1;
+    string name = 2;
+    sint64 price = 3;
+//    string currency = 4;
+//    string frequency = 5;
+//    string legacy_id = 6;
+//    bool is_subscribed = 7;
+//    bool can_subscribe = 8;
+  }
+  Plan plan = 3;
+  Plan plan_pending = 4;
+  string status = 5;
+  bool paused = 6;
+  string type = 7;
+}
+
+message ZoneIDByNameRequestCloudflare {
+  string apiKey = 1;
+  string apiEmail = 2;
+  string zoneName = 3;
+}
+
+message ZoneIDByNameReplyCloudflare {
+  string zoneId = 1;
+}
+
+
+message ZoneDetailsRequestCloudflare {
+  string apiKey = 1;
+  string apiEmail = 2;
+  string zoneId = 3;
+}
+
+message ZoneDetailsReplyCloudflare{
+  ZoneCloudflareEntity result = 1;
+}
+
+
+message GetZonesRequestCloudflare {
+  string apiKey = 1;
+  string apiEmail = 2;
+  string domain = 3;
+}
+
+message GetZonesReplyCloudflare{
+  repeated ZoneCloudflareEntity result = 1;
+  bool success = 2;
+}
+
+
+message EditZoneRequestCloudflare {
+  string apiKey = 1;
+  string apiEmail = 2;
+  string zoneId = 3;
+  optional bool paused = 4;
+  optional string planId = 5;
+  optional string type = 6;
+}
+
+message EditZoneReplyCloudflare{
+  ZoneCloudflareEntity result = 1;
+  bool success = 2;
+}
+
+
+message DeleteZoneRequestCloudflare {
+  string apiKey = 1;
+  string apiEmail = 2;
+  string zoneId = 3;
+}
+
+message DeleteZoneReplyCloudflare{
+  bool success = 1;
+  string id = 2;
+}