| // Copyright 2022 The ChromiumOS Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package chromiumos.test.api; |
| |
| option go_package = "go.chromium.org/chromiumos/config/go/test/api"; |
| |
| import "chromiumos/longrunning/operations.proto"; |
| import "google/protobuf/any.proto"; |
| import "chromiumos/storage_path.proto"; |
| |
| // Generic provisioning interface for CFT. Intended to be interchangeable across |
| // services |
| service GenericPublishService { |
| // Publish publishes test results to a specific endpoint. |
| // It is intended to be a generic publish grpc that may be |
| // used by all endpoints. |
| rpc Publish(PublishRequest) |
| returns (longrunning.Operation) { |
| option (longrunning.operation_info) = { |
| response_type: "PublishResponse", |
| metadata_type: "PublishMetadata" |
| }; |
| } |
| } |
| |
| message PublishRequest { |
| // Local path to tests artifact directory |
| StoragePath artifact_dir_path = 1; |
| |
| // Retry count. Default is 0 where no retry will be done. |
| int32 retry_count = 2; |
| |
| // Endpoint specific metadata |
| google.protobuf.Any metadata = 3; |
| } |
| |
| message PublishResponse { |
| // Status of the publish operation |
| enum Status { |
| // Success |
| STATUS_SUCCESS = 0; |
| // Invalid Request |
| STATUS_INVALID_REQUEST = 1; |
| // Failure |
| STATUS_FAILURE = 2; |
| } |
| |
| Status status = 1; |
| |
| // Any kind of message that the service wants to respond with. |
| // In case of failure, this will hold the error message. |
| string message = 2; |
| |
| // Endpoint specific metadata |
| google.protobuf.Any metadata = 3; |
| } |