seaweedfs/weed/pb/schema.proto

40 lines
619 B
Protocol Buffer
Raw Normal View History

2024-04-12 16:30:29 +08:00
syntax = "proto3";
package schema_pb;
option go_package = "github.com/seaweedfs/seaweedfs/weed/pb/schema_pb";
message RecordType {
2024-04-13 04:31:54 +08:00
repeated Field fields = 1;
2024-04-12 16:30:29 +08:00
}
message Field {
string name = 1;
Type type = 2;
int32 index = 3;
2024-04-13 04:29:35 +08:00
bool is_repeated = 4;
2024-04-12 16:30:29 +08:00
}
message Type {
oneof kind {
ScalarType scalar_type = 1;
RecordType record_type = 2;
2024-04-13 04:29:35 +08:00
// MapType map_type = 3;
2024-04-12 16:30:29 +08:00
}
}
enum ScalarType {
BOOLEAN = 0;
INTEGER = 1;
LONG = 3;
FLOAT = 4;
DOUBLE = 5;
BYTES = 6;
STRING = 7;
}
message MapType {
// key is always string
Type value = 1;
}