github.com/argoproj/argo-cd@v1.8.7/server/repository/repository.proto (about)

     1  syntax = "proto3";
     2  option go_package = "github.com/argoproj/argo-cd/pkg/apiclient/repository";
     3  
     4  // Repository Service
     5  //
     6  // Repository Service API performs CRUD actions against repository resources
     7  package repository;
     8  
     9  import "gogoproto/gogo.proto";
    10  import "google/api/annotations.proto";
    11  import "k8s.io/api/core/v1/generated.proto";
    12  import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto";
    13  import "github.com/argoproj/argo-cd/reposerver/repository/repository.proto";
    14  
    15  // RepoAppsQuery is a query for Repository apps
    16  message RepoAppsQuery {
    17  	string repo = 1;
    18  	string revision = 2;
    19  }
    20  
    21  
    22  // AppInfo contains application type and app file path
    23  message AppInfo {
    24  	string type = 1;
    25  	string path = 2;
    26  }
    27  
    28  // RepoAppDetailsQuery contains query information for app details request
    29  message RepoAppDetailsQuery {
    30  	github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSource source = 1;
    31  }
    32  
    33  // RepoAppsResponse contains applications of specified repository
    34  message RepoAppsResponse {
    35  	repeated AppInfo items = 1;
    36  }
    37  
    38  // RepoQuery is a query for Repository resources
    39  message RepoQuery {
    40  	// Repo URL for query
    41  	string repo = 1;
    42  	// Whether to force a cache refresh on repo's connection state
    43  	bool forceRefresh = 2;
    44  }
    45  
    46  // RepoAccessQuery is a query for checking access to a repo
    47  message RepoAccessQuery {
    48  	// The URL to the repo
    49  	string repo = 1;
    50  	// Username for accessing repo
    51  	string username = 2;
    52  	// Password for accessing repo
    53  	string password = 3;
    54  	// Private key data for accessing SSH repository
    55  	string sshPrivateKey = 4;
    56  	// Whether to skip certificate or host key validation
    57  	bool   insecure = 5;
    58  	// TLS client cert data for accessing HTTPS repository
    59  	string tlsClientCertData = 6;
    60  	// TLS client cert key for accessing HTTPS repository
    61  	string tlsClientCertKey = 7;
    62  	// The type of the repo
    63  	string type = 9;
    64  	// The name of the repo
    65  	string name = 10;
    66  	// Whether helm-oci support should be enabled for this repo
    67  	bool enableOci = 11;
    68  }
    69  
    70  message RepoResponse {}
    71  
    72  // RepoCreateRequest is a request for creating repository config
    73  message RepoCreateRequest {
    74  	// Repository definition
    75  	github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository repo = 1;
    76  	// Whether to create in upsert mode
    77  	bool upsert = 2;
    78  	// Whether to operate on credential set instead of repository
    79  	bool credsOnly = 3;
    80  }
    81  
    82  message RepoUpdateRequest {
    83  	github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository repo = 1;
    84  }
    85  
    86  // RepositoryService
    87  service RepositoryService {
    88  
    89  	// List returns list of repos or repository credentials
    90  	rpc List(RepoQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RepositoryList) {
    91  		option (google.api.http).get = "/api/v1/repositories";
    92  		option deprecated = true;
    93  	}
    94  
    95  		// Get returns a repository or its credentials
    96  	rpc Get(RepoQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
    97  		option (google.api.http).get = "/api/v1/repositories/{repo}";
    98  	}
    99  
   100  	// ListRepositories gets a list of all configured repositories
   101  	rpc ListRepositories(RepoQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RepositoryList) {
   102  		option (google.api.http).get = "/api/v1/repositories";
   103  	}
   104  
   105  	rpc ListRefs(RepoQuery) returns (Refs) {
   106  		option (google.api.http).get = "/api/v1/repositories/{repo}/refs";
   107  	}
   108  
   109  	// ListApps returns list of apps in the repe
   110  	rpc ListApps(RepoAppsQuery) returns (RepoAppsResponse) {
   111  		option (google.api.http).get = "/api/v1/repositories/{repo}/apps";
   112  	}
   113  
   114  	// GetAppDetails returns application details by given path
   115  	rpc GetAppDetails(RepoAppDetailsQuery) returns (repository.RepoAppDetailsResponse) {
   116  		option (google.api.http) = {
   117  			post: "/api/v1/repositories/{source.repoURL}/appdetails"
   118  			body: "*"
   119  		};
   120  	}
   121  
   122  	// GetHelmCharts returns list of helm charts in the specified repository
   123  	rpc GetHelmCharts(RepoQuery) returns (repository.HelmChartsResponse) {
   124  		option (google.api.http).get = "/api/v1/repositories/{repo}/helmcharts";
   125  	}
   126  
   127  	// Create creates a repo or a repo credential set
   128  	rpc Create(RepoCreateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
   129  		option (google.api.http) = {
   130  			post: "/api/v1/repositories"
   131  			body: "repo"
   132  		};
   133  		option deprecated = true;
   134  	}
   135  
   136  	// CreateRepository creates a new repository configuration
   137  	rpc CreateRepository(RepoCreateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
   138  		option (google.api.http) = {
   139  			post: "/api/v1/repositories"
   140  			body: "repo"
   141  		};
   142  	}
   143  
   144  	// Update updates a repo or repo credential set
   145  	rpc Update(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
   146  		option (google.api.http) = {
   147  			put: "/api/v1/repositories/{repo.repo}"
   148  			body: "repo"
   149  		};
   150  		option deprecated = true;
   151  	}
   152  
   153  	// UpdateRepository updates a repository configuration
   154  	rpc UpdateRepository(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository) {
   155  		option (google.api.http) = {
   156  			put: "/api/v1/repositories/{repo.repo}"
   157  			body: "repo"
   158  		};
   159  	}
   160  
   161  	// Delete deletes a repository from the configuration
   162  	rpc Delete(RepoQuery) returns (RepoResponse) {
   163  		option (google.api.http).delete = "/api/v1/repositories/{repo}";
   164  		option deprecated = true;
   165  	}
   166  
   167  	// DeleteRepository deletes a repository from the configuration
   168  	rpc DeleteRepository(RepoQuery) returns (RepoResponse) {
   169  		option (google.api.http).delete = "/api/v1/repositories/{repo}";
   170  	}
   171  
   172  	// ValidateAccess validates access to a repository with given parameters
   173  	rpc ValidateAccess(RepoAccessQuery) returns (RepoResponse) {
   174  		option (google.api.http) = {
   175  			post: "/api/v1/repositories/{repo}/validate"
   176  			body: "repo"
   177  		};
   178  	}
   179  }