-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathdata.proto
70 lines (64 loc) · 2.86 KB
/
data.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Copyright 2022-2023 Tigris Data, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
option go_package = "github.com/tigrisdata/tigris/internal";
message Timestamp {
// Represents seconds of UTC time since Unix epoch
int64 seconds = 2;
// Non-negative fractions of a second at nanosecond resolution.
int64 nanoseconds = 3;
}
// TableData is a wrapper around underlying storage raw bytes. This is used to store user collection data, internal
// metadata, schemas etc. Caller can use raw_data to store any raw bytes.
message TableData {
// ver is the version for the raw bytes, this may be schema version in case of user data.
int32 ver = 1;
// encoding represents encoding of the data field.
int32 encoding = 2;
Timestamp created_at = 3;
Timestamp updated_at = 4;
// raw_data is the raw bytes stored, caller controls how they want to store these raw bytes in database.
bytes raw_data = 5;
optional int32 total_chunks = 6;
int32 raw_size = 7;
optional int32 search_fields_size = 8;
optional int32 compression = 9;
}
// StreamData is used to store a serialized data that has user data, some Tigris metadata in Cache Stream. Some options
// are used by channels to store channel metadata but these can be ignored for storing some regular stream data.
message StreamData {
// the id generated for this data, in most cases will be filled when returning this in response
string id = 1;
// ver is the version for the raw bytes, this may be the version of the event
int32 ver = 2;
// encoding represents encoding of the raw_data field.
int32 encoding = 3;
Timestamp created_at = 4;
// md is the is the metadata of this stream data.
bytes md = 5;
// raw_data is the raw bytes stored, caller controls how they want to store these raw bytes in event store.
bytes raw_data = 6;
}
// CacheData is used to store a serialized data that has user data and some Tigris metadata in Cache
message CacheData {
// the id generated for this data, in most cases will be filled when returning this in response
int32 id = 1;
// ver is the version for the raw bytes, this may be the version of the event
int32 ver = 2;
// encoding represents encoding of the event field.
int32 encoding = 3;
Timestamp created_at = 4;
// raw_data is the raw bytes stored, caller controls how they want to store these raw bytes in event store.
bytes raw_data = 5;
}