golang.org/x/build@v0.0.0-20240506185731-218518f32b70/internal/relui/protos/relui.proto (about)

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  syntax = "proto3";
     6  
     7  package protos;
     8  
     9  option go_package = "golang.org/x/build/internal/relui/protos";
    10  
    11  // ReleaseService enables the signing of release artifacts.
    12  service ReleaseService {
    13    // UpdateSigningStatus is a bidirectional connection where server is requesting that the client:
    14    // - Sign a release artifact.
    15    // - Provide an update on a previous request to sign a release artifact.
    16    // - Consider a previous request to sign a release artifact as obsolete.
    17    // The client initiates a connection with the server and waits for the server to issue a request
    18    // such as:
    19    // - An update on the status of a signing request (either running or completed).
    20    // - An acknowledgement that a request to sign a release artifact has been accepted and initiated.
    21    rpc UpdateSigningStatus (stream SigningStatus) returns (stream SigningRequest) {}
    22  }
    23  
    24  // Request an action from the signing client.
    25  message SigningRequest {
    26    // unique identifier for the request. This would normally reside within
    27    // the metadata. This is primarily used to route requests between
    28    // caller/responder. The server and client must use the same id for each
    29    // corresponging request.
    30    string message_id = 1;
    31  
    32    // Request type for the signing client.
    33    oneof request_oneof {
    34      SignArtifactRequest sign = 2;
    35      SignArtifactStatusRequest status = 3;
    36      SignArtifactCancelRequest cancel = 4;
    37    }
    38  }
    39  
    40  // Request to sign a release artifact.
    41  message SignArtifactRequest {
    42    // The type of artifact signing request.
    43    enum BuildType {
    44      BUILD_TYPE_UNSPECIFIED = 0;
    45  
    46      BUILD_TYPE_MACOS = 1;
    47      BUILD_TYPE_WINDOWS = 2;
    48      BUILD_TYPE_GPG = 3;
    49  
    50      BUILD_TYPE_MACOS_CONSTRUCT_INSTALLER_ONLY = 4;
    51      BUILD_TYPE_WINDOWS_CONSTRUCT_INSTALLER_ONLY = 5;
    52  
    53      // Sign individual binary application artifacts.
    54      // The signing server expects zipped application bundles and signs the files in them.
    55      BUILD_TYPE_MACOS_BINARY = 6;
    56      BUILD_TYPE_WINDOWS_BINARY = 7;
    57    }
    58    BuildType build_type = 1;
    59  
    60    // The GCS URI for the artifact that should be signed.
    61    // This artifact must reside in the agreed upon private
    62    // GCS bucket.
    63    //
    64    // There must be at least one entry, and
    65    // each one points to an individual file.
    66    // For example, "gs://golang-release-staging/relui-scratch/<...>/go123.linux-amd64.tar.gz".
    67    repeated string gcs_uri = 2;
    68  }
    69  // Request for an update on an existing signing request.
    70  message SignArtifactStatusRequest {
    71    // unique identifier for the signing job.
    72    string job_id = 1;
    73  }
    74  // Request to stop a previous signing request sooner if possible.
    75  message SignArtifactCancelRequest {
    76    // unique identifier for the signing job.
    77    string job_id = 1;
    78  }
    79  
    80  // The status of the signing request.
    81  message SigningStatus {
    82    // unique identifier for the request. This would normally reside within
    83    // the metadata. This is primarily used to route requests between
    84    // caller/responder. The server and client must use the same id for each
    85    // corresponging request.
    86    string message_id = 1;
    87  
    88    // The status type of the signing request.
    89    oneof status_oneof {
    90      StatusNotFound not_found = 3;
    91      StatusStarted started = 4;
    92      StatusRunning running = 5;
    93      StatusFailed failed = 6;
    94      StatusCompleted completed = 7;
    95    }
    96  }
    97  
    98  // The signing status for a signing request which does not exist.
    99  message StatusNotFound {}
   100  // The signing status for an in progress signing request.
   101  message StatusStarted {
   102    // unique identifier for the signing job that started.
   103    string job_id = 1;
   104  }
   105  message StatusRunning {
   106    // Details about the signing request status.
   107    string description = 1;
   108  }
   109  // The signing status for a failed signing request.
   110  message StatusFailed {
   111    // Details about the signing request status.
   112    string description = 1;
   113  }
   114  // The signing status for a successfully completed signing request.
   115  message StatusCompleted {
   116    // The GCS URIs of the signed artifact(s),
   117    // each one pointing to an individual file.
   118    // For example, "gs://golang-release-staging/relui-scratch/<...>/go123.linux-amd64.tar.gz".
   119    repeated string gcs_uri = 1;
   120  }