kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/proto/filetree.proto (about) 1 /* 2 * Copyright 2015 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/filetree_go_proto"; 22 option java_package = "com.google.devtools.kythe.proto"; 23 24 // FileTreeService provides an interface to explore a tree of files. 25 service FileTreeService { 26 // CorpusRoots returns all known corpus/root pairs for stored files. 27 rpc CorpusRoots(CorpusRootsRequest) returns (CorpusRootsReply) {} 28 29 // Directory returns the file/sub-directory contents of the given directory. 30 rpc Directory(DirectoryRequest) returns (DirectoryReply) {} 31 } 32 33 message CorpusRootsRequest {} 34 35 message CorpusRootsReply { 36 message Corpus { 37 // Name of the corpus. 38 string name = 1; 39 40 // Each known root within the corpus. 41 repeated string root = 2; 42 43 // Each known build configuration within the corpus. 44 repeated string build_config = 3; 45 } 46 repeated Corpus corpus = 1; 47 } 48 49 message DirectoryRequest { 50 string corpus = 1; 51 string root = 2; 52 string path = 3; 53 54 // Whether to return files that are missing text. 55 bool include_files_missing_text = 4; 56 } 57 58 message DirectoryReply { 59 // The corpus of the requested directory. 60 string corpus = 3; 61 // The root of the requested directory. 62 string root = 4; 63 // The path of the requested directory. 64 string path = 5; 65 66 // Each known entry in the requested directory. Each entry shares the above 67 // corpus, root, and path prefix. 68 repeated Entry entry = 6; 69 70 message Entry { 71 // The kind of entry. 72 Kind kind = 1; 73 74 // The basename of the entry within the directory. 75 string name = 2; 76 77 // Set of known build configurations of this FILE or all files recursively 78 // contained in/below this DIRECTORY. 79 repeated string build_config = 3; 80 81 // True if the entry is generated. 82 bool generated = 4; 83 84 // Whether the FILE entry is missing text or the DIRECTORY entry contains 85 // only entries with missing_text. 86 bool missing_text = 5; 87 } 88 enum Kind { 89 UNKNOWN = 0; 90 FILE = 1; 91 DIRECTORY = 2; 92 } 93 94 reserved 1, 2; 95 }