github.com/argoproj/argo-cd/v3@v3.2.1/cmpserver/plugin/plugin.proto (about)

     1  syntax = "proto3";
     2  option go_package = "github.com/argoproj/argo-cd/v3/cmpserver/apiclient";
     3  
     4  package plugin;
     5  
     6  import "github.com/argoproj/argo-cd/v3/reposerver/repository/repository.proto";
     7  import "google/protobuf/empty.proto";
     8  
     9  // AppStreamRequest is the request object used to send the application's
    10  // files over a stream.
    11  message AppStreamRequest {
    12      oneof request {
    13          ManifestRequestMetadata metadata = 1;
    14          File file = 2;
    15      }
    16  }
    17  
    18  // ManifestRequestMetadata defines the metada related to the file being sent
    19  // to the CMP server.
    20  message ManifestRequestMetadata {
    21      // appName refers to the ArgoCD Application name
    22      string appName = 1;
    23      // appRelPath points to the application relative path inside the tarball
    24      string appRelPath = 2;
    25      // checksum is used to verify the integrity of the file
    26      string checksum = 3;
    27      // size relates to the file size in bytes
    28      int64 size = 4;
    29      // env is a list with the environment variables needed to generate manifests
    30      repeated EnvEntry env = 5;
    31  }
    32  
    33  // EnvEntry represents an entry in the application's environment
    34  message EnvEntry {
    35      // Name is the name of the variable, usually expressed in uppercase
    36      string name = 1;
    37      // Value is the value of the variable
    38      string value = 2;
    39  }
    40  
    41  message ManifestResponse {
    42      repeated string manifests = 1;
    43      string sourceType = 2;
    44  }
    45  
    46  message RepositoryResponse {
    47      bool isSupported = 1;
    48      bool isDiscoveryEnabled = 2;
    49  }
    50  
    51  // ParametersAnnouncementResponse contains a list of announcements. This list represents all the parameters which a CMP
    52  // is able to accept.
    53  message ParametersAnnouncementResponse {
    54      repeated repository.ParameterAnnouncement parameterAnnouncements = 1;
    55  }
    56  
    57  message File {
    58      bytes chunk = 1;
    59  }
    60  
    61  // CheckPluginConfigurationResponse contains a list of plugin configuration flags.
    62  message CheckPluginConfigurationResponse {
    63      bool isDiscoveryConfigured = 1;
    64      bool provideGitCreds = 2;
    65  }
    66  
    67  // ConfigManagementPlugin Service
    68  service ConfigManagementPluginService {
    69      // GenerateManifests receive a stream containing a tgz archive with all required files necessary
    70      // to generate manifests
    71      rpc GenerateManifest(stream AppStreamRequest) returns (ManifestResponse) {
    72      }
    73  
    74      // CheckPluginConfiguration is a pre-flight request  to check the plugin configuration
    75      // without sending the whole repo.
    76      rpc CheckPluginConfiguration(google.protobuf.Empty) returns (CheckPluginConfigurationResponse) {
    77      }
    78  
    79      // MatchRepository returns whether or not the given application is supported by the plugin
    80      rpc MatchRepository(stream AppStreamRequest) returns (RepositoryResponse) {
    81      }
    82  
    83      // GetParametersAnnouncement gets a list of parameter announcements for the given app
    84      rpc GetParametersAnnouncement(stream AppStreamRequest) returns (ParametersAnnouncementResponse) {
    85      }
    86  }