kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/proto/identifier.proto (about) 1 /* 2 * Copyright 2017 The Kythe Authors. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 syntax = "proto3"; 18 19 package kythe.proto; 20 21 option go_package = "kythe.io/kythe/proto/identifier_go_proto"; 22 option java_package = "com.google.devtools.kythe.proto"; 23 24 service IdentifierService { 25 // Find returns a list of tickets associated with a given identifier string. 26 rpc Find(FindRequest) returns (FindReply); 27 } 28 29 message FindRequest { 30 // The qualified name of the identifier being searched for 31 string identifier = 1; 32 33 // Restricts the matches to the given corpus labels. 34 repeated string corpus = 2; 35 36 // Restricts the match to the given languages. 37 repeated string languages = 3; 38 39 // When two or more nodes are present for the same logical symbol (e.g. the 40 // definition and declaration of a field in C++) and if a canonical node is 41 // known, only return the canonical node. 42 bool pick_canonical_nodes = 4; 43 } 44 45 message FindReply { 46 message Match { 47 // Kythe ticket for the matched node. 48 string ticket = 1; 49 50 // Kind of the node being referenced. 51 string node_kind = 2; 52 53 // Subkind of the node being referenced. 54 string node_subkind = 3; 55 56 // The local identifier for the node. 57 string base_name = 4; 58 59 // The fully qualified identifier for the node. 60 string qualified_name = 5; 61 } 62 63 // The list of matches found 64 repeated Match matches = 1; 65 }