You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.2 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. syntax = "proto3";
  2. package schema_pb;
  3. option go_package = "github.com/seaweedfs/seaweedfs/weed/pb/schema_pb";
  4. ///////////////////////////
  5. // schema definition
  6. ///////////////////////////
  7. message RecordType {
  8. repeated Field fields = 1;
  9. }
  10. message Field {
  11. string name = 1;
  12. Type type = 2;
  13. int32 index = 3;
  14. bool is_repeated = 4;
  15. bool is_required = 5;
  16. }
  17. message Type {
  18. oneof kind {
  19. ScalarType scalar_type = 1;
  20. RecordType record_type = 2;
  21. ListType list_type = 3;
  22. }
  23. }
  24. enum ScalarType {
  25. BOOLEAN = 0;
  26. INTEGER = 1;
  27. LONG = 3;
  28. FLOAT = 4;
  29. DOUBLE = 5;
  30. BYTES = 6;
  31. STRING = 7;
  32. }
  33. message ListType {
  34. Type element_type = 1;
  35. }
  36. ///////////////////////////
  37. // value definition
  38. ///////////////////////////
  39. message RecordValue {
  40. map<string, Value> fields = 1;
  41. }
  42. message Value {
  43. oneof kind {
  44. bool bool_value = 1;
  45. int32 int32_value = 2;
  46. int64 int64_value = 3;
  47. float float_value = 4;
  48. double double_value = 5;
  49. bytes bytes_value = 6;
  50. string string_value = 7;
  51. ListValue list_value = 14;
  52. RecordValue record_value = 15;
  53. }
  54. }
  55. message ListValue {
  56. repeated Value values = 1;
  57. }