| // Copyright 2022 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package protos; |
| |
| option go_package = "golang.org/x/build/internal/relui/protos"; |
| |
| // ReleaseService enables the signing of release artifacts. |
| service ReleaseService { |
| // UpdateSigningStatus is a bidirectional connection where server is requesting that the client: |
| // - Sign a release artifact. |
| // - Provide an update on a previous request to sign a release artifact. |
| // - Consider a previous request to sign a release artifact as obsolete. |
| // The client initiates a connection with the server and waits for the server to issue a request |
| // such as: |
| // - An update on the status of a signing request (either running or completed). |
| // - An acknowledgement that a request to sign a release artifact has been accepted and initiated. |
| rpc UpdateSigningStatus (stream SigningStatus) returns (stream SigningRequest) {} |
| } |
| |
| // Request an action from the signing client. |
| message SigningRequest { |
| // unique identifier for the request. This would normally reside within |
| // the metadata. This is primarily used to route requests between |
| // caller/responder. The server and client must use the same id for each |
| // corresponging request. |
| string message_id = 1; |
| |
| // Request type for the signing client. |
| oneof request_oneof { |
| SignArtifactRequest sign = 2; |
| SignArtifactStatusRequest status = 3; |
| SignArtifactCancelRequest cancel = 4; |
| } |
| } |
| |
| // Request to sign a release artifact. |
| message SignArtifactRequest { |
| // The type of artifact signing request. |
| enum BuildType { |
| BUILD_TYPE_UNSPECIFIED = 0; |
| |
| BUILD_TYPE_MACOS = 1; |
| BUILD_TYPE_WINDOWS = 2; |
| BUILD_TYPE_GPG = 3; |
| |
| BUILD_TYPE_MACOS_CONSTRUCT_INSTALLER_ONLY = 4; |
| BUILD_TYPE_WINDOWS_CONSTRUCT_INSTALLER_ONLY = 5; |
| |
| // Sign individual binary application artifacts. |
| // The signing server expects zipped application bundles and signs the files in them. |
| BUILD_TYPE_MACOS_BINARY = 6; |
| BUILD_TYPE_WINDOWS_BINARY = 7; |
| } |
| BuildType build_type = 1; |
| |
| // The GCS URI for the artifact that should be signed. |
| // This artifact must reside in the agreed upon private |
| // GCS bucket. |
| // |
| // There must be at least one entry, and |
| // each one points to an individual file. |
| // For example, "gs://golang-release-staging/relui-scratch/<...>/go123.linux-amd64.tar.gz". |
| repeated string gcs_uri = 2; |
| } |
| // Request for an update on an existing signing request. |
| message SignArtifactStatusRequest { |
| // unique identifier for the signing job. |
| string job_id = 1; |
| } |
| // Request to stop a previous signing request sooner if possible. |
| message SignArtifactCancelRequest { |
| // unique identifier for the signing job. |
| string job_id = 1; |
| } |
| |
| // The status of the signing request. |
| message SigningStatus { |
| // unique identifier for the request. This would normally reside within |
| // the metadata. This is primarily used to route requests between |
| // caller/responder. The server and client must use the same id for each |
| // corresponging request. |
| string message_id = 1; |
| |
| // The status type of the signing request. |
| oneof status_oneof { |
| StatusNotFound not_found = 3; |
| StatusStarted started = 4; |
| StatusRunning running = 5; |
| StatusFailed failed = 6; |
| StatusCompleted completed = 7; |
| } |
| } |
| |
| // The signing status for a signing request which does not exist. |
| message StatusNotFound {} |
| // The signing status for an in progress signing request. |
| message StatusStarted { |
| // unique identifier for the signing job that started. |
| string job_id = 1; |
| } |
| message StatusRunning { |
| // Details about the signing request status. |
| string description = 1; |
| } |
| // The signing status for a failed signing request. |
| message StatusFailed { |
| // Details about the signing request status. |
| string description = 1; |
| } |
| // The signing status for a successfully completed signing request. |
| message StatusCompleted { |
| // The GCS URIs of the signed artifact(s), |
| // each one pointing to an individual file. |
| // For example, "gs://golang-release-staging/relui-scratch/<...>/go123.linux-amd64.tar.gz". |
| repeated string gcs_uri = 1; |
| } |