api.proto 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // idl/api.proto; 注解拓展
  2. syntax = "proto2";
  3. package api;
  4. import "google/protobuf/descriptor.proto";
  5. option go_package = "/api";
  6. extend google.protobuf.FieldOptions {
  7. optional string raw_body = 50101;
  8. optional string query = 50102;
  9. optional string header = 50103;
  10. optional string cookie = 50104;
  11. optional string body = 50105;
  12. optional string path = 50106;
  13. optional string vd = 50107;
  14. optional string form = 50108;
  15. optional string js_conv = 50109;
  16. optional string file_name = 50110;
  17. optional string none = 50111;
  18. // 50131~50160 used to extend field option by hz
  19. optional string form_compatible = 50131;
  20. optional string js_conv_compatible = 50132;
  21. optional string file_name_compatible = 50133;
  22. optional string none_compatible = 50134;
  23. // 50135 is reserved to vt_compatible
  24. // optional FieldRules vt_compatible = 50135;
  25. optional string go_tag = 51001;
  26. }
  27. extend google.protobuf.MethodOptions {
  28. optional string get = 50201;
  29. optional string post = 50202;
  30. optional string put = 50203;
  31. optional string delete = 50204;
  32. optional string patch = 50205;
  33. optional string options = 50206;
  34. optional string head = 50207;
  35. optional string any = 50208;
  36. optional string gen_path = 50301; // The path specified by the user when the client code is generated, with a higher priority than api_version
  37. optional string api_version = 50302; // Specify the value of the :version variable in path when the client code is generated
  38. optional string tag = 50303; // rpc tag, can be multiple, separated by commas
  39. optional string name = 50304; // Name of rpc
  40. optional string api_level = 50305; // Interface Level
  41. optional string serializer = 50306; // Serialization method
  42. optional string param = 50307; // Whether client requests take public parameters
  43. optional string baseurl = 50308; // Baseurl used in ttnet routing
  44. optional string handler_path = 50309; // handler_path specifies the path to generate the method
  45. // 50331~50360 used to extend method option by hz
  46. optional string handler_path_compatible = 50331; // handler_path specifies the path to generate the method
  47. }
  48. extend google.protobuf.EnumValueOptions {
  49. optional int32 http_code = 50401;
  50. // 50431~50460 used to extend enum option by hz
  51. }
  52. extend google.protobuf.ServiceOptions {
  53. optional string base_domain = 50402;
  54. // 50731~50760 used to extend service option by hz
  55. optional string base_domain_compatible = 50731;
  56. }
  57. extend google.protobuf.MessageOptions {
  58. // optional FieldRules msg_vt = 50111;
  59. optional string reserve = 50830;
  60. // 550831 is reserved to msg_vt_compatible
  61. // optional FieldRules msg_vt_compatible = 50831;
  62. }