mercury.proto 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. syntax = "proto2";
  2. message MercuryMultiGetRequest {
  3. repeated MercuryRequest request = 0x1;
  4. }
  5. message MercuryMultiGetReply {
  6. repeated MercuryReply reply = 0x1;
  7. }
  8. message MercuryRequest {
  9. optional string uri = 0x1;
  10. optional string content_type = 0x2;
  11. optional bytes body = 0x3;
  12. optional bytes etag = 0x4;
  13. }
  14. message MercuryReply {
  15. optional sint32 status_code = 0x1;
  16. optional string status_message = 0x2;
  17. optional CachePolicy cache_policy = 0x3;
  18. enum CachePolicy {
  19. CACHE_NO = 0x1;
  20. CACHE_PRIVATE = 0x2;
  21. CACHE_PUBLIC = 0x3;
  22. }
  23. optional sint32 ttl = 0x4;
  24. optional bytes etag = 0x5;
  25. optional string content_type = 0x6;
  26. optional bytes body = 0x7;
  27. }
  28. message Header {
  29. optional string uri = 0x01;
  30. optional string content_type = 0x02;
  31. optional string method = 0x03;
  32. optional sint32 status_code = 0x04;
  33. repeated UserField user_fields = 0x06;
  34. }
  35. message UserField {
  36. optional string key = 0x01;
  37. optional bytes value = 0x02;
  38. }