dns.proto 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. syntax = "proto3";
  2. package cloudflareApi.dns;
  3. option go_package = "./cloudflareApi/dns";
  4. option java_multiple_files = true;
  5. option java_package = "io.grpc.cloudflare.dns";
  6. option java_outer_classname = "dnsProto";
  7. service DnsCloudflare {
  8. rpc List(ListRequest)returns(DnsRecordList){}
  9. rpc Create(DnsRecordRequest)returns(DnsRecord){}
  10. rpc Update(DnsRecordRequest)returns(Empty){}
  11. rpc Delete(DeleteRequest)returns(Empty){}
  12. }
  13. message DnsRecord{
  14. string id = 1;
  15. string name = 2;
  16. string type = 3;
  17. string content = 4;
  18. int64 ttl = 5;
  19. string zone_id = 6;
  20. string zone_name = 7;
  21. bool proxied = 8;
  22. }
  23. message DnsRecordList{
  24. repeated DnsRecord dnsRecord = 1;
  25. }
  26. message Empty{}
  27. message ListRequest {
  28. string apiKey = 1;
  29. string apiEmail = 2;
  30. string zoneId = 3;
  31. }
  32. message DnsRecordRequest {
  33. string apiKey = 1;
  34. string apiEmail = 2;
  35. string zoneId = 3;
  36. DnsRecord dnsRecord = 4;
  37. }
  38. message DeleteRequest {
  39. string apiKey = 1;
  40. string apiEmail = 2;
  41. string zoneId = 3;
  42. string id = 4;
  43. }
  44. //message CreateReply {
  45. // DnsEntity
  46. //}