1 // Copyright 2018 Google LLC.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
18 package google.devtools.resultstore.v2;
20 import "google/api/annotations.proto";
22 option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
23 option java_multiple_files = true;
24 option java_package = "com.google.devtools.resultstore.v2";
26 // This API allows download of File messages referenced in
27 // ResultStore resources.
28 service ResultStoreFileDownload {
29 // Retrieves the File with the given uri.
30 // returns a stream of bytes to be stitched together in order.
32 // An error will be reported in the following cases:
33 // - If the File is not found.
34 // - If the given File uri is badly formatted.
35 rpc GetFile(GetFileRequest) returns (stream GetFileResponse) {
36 option (google.api.http) = {
37 get: "/v2/{uri=file/*}"
41 // Retrieves the tail of a File with the given uri.
43 // An error will be reported in the following cases:
44 // - If the File is not found.
45 // - If the given File uri is badly formatted.
46 rpc GetFileTail(GetFileTailRequest) returns (GetFileTailResponse) {
47 option (google.api.http) = {
48 get: "/v2/{uri=file/tail/*}"
53 // Request object for GetFile
54 message GetFileRequest {
55 // This corresponds to the uri field in the File message.
58 // The offset for the first byte to return in the read, relative to the start
61 // A `read_offset` that is negative or greater than the size of the resource
62 // will cause an `OUT_OF_RANGE` error.
63 int64 read_offset = 2;
65 // The maximum number of `data` bytes the server is allowed to return in the
66 // sum of all `ReadResponse` messages. A `read_limit` of zero indicates that
67 // there is no limit, and a negative `read_limit` will cause an error.
69 // If the stream returns fewer bytes than allowed by the `read_limit` and no
70 // error occurred, the stream includes all data from the `read_offset` to the
71 // end of the resource.
75 // Response object for GetFile
76 message GetFileResponse {
81 // Request object for GetFileTail
82 message GetFileTailRequest {
83 // This corresponds to the uri field in the File message.
86 // The offset for the first byte to return in the read, relative to the end
89 // A `read_offset` that is negative or greater than the size of the resource
90 // will cause an `OUT_OF_RANGE` error.
91 int64 read_offset = 2;
93 // The maximum number of `data` bytes the server is allowed to return. The
94 // server will return bytes starting from the tail of the file.
96 // A `read_limit` of zero indicates that there is no limit, and a negative
97 // `read_limit` will cause an error.
101 // Response object for GetFileTail
102 message GetFileTailResponse {
103 // The file data, encoded with UTF-8.