blob: 3d7ddc084f6441bd1ee784519b2a6ad51dd832b4 [file] [log] [blame]
// Licensed to Apache Software Foundation (ASF) under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Apache Software Foundation (ASF) licenses this file to you 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 java_package = "org.apache.skywalking.banyandb";
option go_package = "github.com/apache/skywalking-banyandb/api/proto/banyandb/v1;v1";
package banyandb.v1;
import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
import "banyandb/v1/database.proto";
message Str {
string value = 1;
}
message Int {
int64 value = 1;
}
message StrArray {
repeated string value = 1;
}
message IntArray {
repeated int64 value = 1;
}
message Field {
oneof value_type {
google.protobuf.NullValue null = 1;
Str str = 2;
StrArray str_array = 3;
Int int = 4;
IntArray int_array = 5;
}
}
message EntityValue {
// entity_id could be span_id of a Span or segment_id of a Segment in the context of Trace
string entity_id = 1;
// timestamp_nanoseconds is in the timeunit of nanoseconds. It represents
// 1) either the start time of a Span/Segment,
// 2) or the timestamp of a log
google.protobuf.Timestamp timestamp = 2;
// binary representation of segments, including tags, spans...
bytes data_binary = 3;
// support all of indexed fields in the fields.
// Pair only has value, as the value of PairValue match with the key
// by the index rules and index rule bindings of Metadata group.
// indexed fields of multiple entities are compression in the fields.
repeated Field fields = 4;
}
message WriteRequest {
// the metadata is only required in the first write.
Metadata metadata = 1;
// the entity is required.
EntityValue entity = 2;
}
message WriteResponse {}