| /* |
| * Copyright 2018 The Kythe Authors. All rights reserved. |
| * |
| * 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 kythe.proto.serving.graph; |
| |
| option go_package = "graph_serving_go_proto"; |
| option java_package = "com.google.devtools.kythe.proto"; |
| |
| import "kythe/proto/schema.proto"; |
| import "kythe/proto/storage.proto"; |
| |
| // Columnar protocol buffer format for Edges. |
| // |
| // Design: https://github.com/kythe/kythe/blob/master/kythe/docs/rfc/2909.md |
| // |
| // Columnar key prefix: "eg"-source |
| message Edges { |
| kythe.proto.VName source = 1; |
| |
| oneof entry { |
| Index index = 2; |
| Edge edge = 3; |
| Target target = 4; |
| } |
| |
| // Index for columnar edges data. |
| // |
| // Columnar key: <empty> |
| message Index { |
| kythe.proto.schema.Node node = 1; |
| } |
| |
| // A single edge |
| // |
| // Columnar key: 10-kind-reverse-ordinal-target |
| message Edge { |
| oneof kind { |
| kythe.proto.schema.EdgeKind kythe_kind = 1; |
| string generic_kind = 2; |
| } |
| // Edge ordinal for this relation to the node. |
| int32 ordinal = 3; |
| // Whether the relation is a reverse edge. |
| bool reverse = 4; |
| |
| // TODO(schroederc): add priority grouping |
| kythe.proto.VName target = 5; |
| } |
| |
| // Edge target node |
| // |
| // Columnar key: 20-target |
| message Target { |
| kythe.proto.schema.Node node = 1; |
| } |
| } |