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.

56 lines
1.0 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 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. }
  16. message Type {
  17. oneof kind {
  18. ScalarType scalar_type = 1;
  19. RecordType record_type = 2;
  20. }
  21. }
  22. enum ScalarType {
  23. BOOLEAN = 0;
  24. INTEGER = 1;
  25. LONG = 3;
  26. FLOAT = 4;
  27. DOUBLE = 5;
  28. BYTES = 6;
  29. STRING = 7;
  30. }
  31. ///////////////////////////
  32. // value definition
  33. ///////////////////////////
  34. message RecordValue {
  35. map<string, Value> fields = 1;
  36. }
  37. message Value {
  38. oneof kind {
  39. bool bool_value = 1;
  40. int32 int32_value = 2;
  41. int64 int64_value = 3;
  42. float float_value = 4;
  43. double double_value = 5;
  44. bytes bytes_value = 6;
  45. string string_value = 7;
  46. RecordValue record_value = 15;
  47. }
  48. }