dbb8e524ca
* feat: define region server related messages Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * finalise Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * generate language code Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * add missing field Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * push region id down Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * remove type alias for region id and column id Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * define query request Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * remove old java file Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * remove go code Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
106 lines
2.5 KiB
Protocol Buffer
106 lines
2.5 KiB
Protocol Buffer
// Copyright 2023 Greptime Team
|
|
//
|
|
// 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";
|
|
|
|
package greptime.v1;
|
|
|
|
option java_package = "io.greptime.v1";
|
|
option java_outer_classname = "Common";
|
|
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
|
|
|
|
message RequestHeader {
|
|
// The `catalog` that is selected to be used in this request.
|
|
string catalog = 1;
|
|
// The `schema` that is selected to be used in this request.
|
|
string schema = 2;
|
|
// The `authorization` header, much like http's authorization header.
|
|
AuthHeader authorization = 3;
|
|
// The `dbname` for the request
|
|
string dbname = 4;
|
|
// TraceID of request
|
|
optional uint64 trace_id = 5;
|
|
// SpanID of request
|
|
optional uint64 span_id = 6;
|
|
}
|
|
|
|
message ResponseHeader { Status status = 1; }
|
|
|
|
message Status {
|
|
// Corresponding to the `StatusCode` definition of GreptimeDB
|
|
uint32 status_code = 1;
|
|
string err_msg = 2;
|
|
}
|
|
|
|
message AuthHeader {
|
|
oneof auth_scheme {
|
|
Basic basic = 1;
|
|
Token token = 2;
|
|
}
|
|
}
|
|
|
|
message Basic {
|
|
string username = 1;
|
|
string password = 2;
|
|
}
|
|
|
|
message Token { string token = 1; }
|
|
|
|
message AffectedRows { uint32 value = 1; }
|
|
|
|
message FlightMetadata { AffectedRows affected_rows = 1; }
|
|
|
|
enum SemanticType {
|
|
TAG = 0;
|
|
FIELD = 1;
|
|
TIMESTAMP = 2;
|
|
}
|
|
|
|
// TODO: deprecate this, and use the `ColumnDef` in region_server.proto instead
|
|
message ColumnDef {
|
|
string name = 1;
|
|
ColumnDataType datatype = 2;
|
|
bool is_nullable = 3;
|
|
bytes default_constraint = 4;
|
|
}
|
|
|
|
enum ColumnDataType {
|
|
BOOLEAN = 0;
|
|
INT8 = 1;
|
|
INT16 = 2;
|
|
INT32 = 3;
|
|
INT64 = 4;
|
|
UINT8 = 5;
|
|
UINT16 = 6;
|
|
UINT32 = 7;
|
|
UINT64 = 8;
|
|
FLOAT32 = 9;
|
|
FLOAT64 = 10;
|
|
BINARY = 11;
|
|
STRING = 12;
|
|
DATE = 13;
|
|
DATETIME = 14;
|
|
TIMESTAMP_SECOND = 15;
|
|
TIMESTAMP_MILLISECOND = 16;
|
|
TIMESTAMP_MICROSECOND = 17;
|
|
TIMESTAMP_NANOSECOND = 18;
|
|
TIME_SECOND = 19;
|
|
TIME_MILLISECOND = 20;
|
|
TIME_MICROSECOND = 21;
|
|
TIME_NANOSECOND = 22;
|
|
INTERVAL_YEAR_MONTH = 23;
|
|
INTERVAL_DAY_TIME = 24;
|
|
INTERVAL_MONTH_DAY_NANO = 25;
|
|
}
|