github.com/argoproj/argo-cd/v3@v3.2.1/server/repository/repository.proto (about) 1 syntax = "proto3"; 2 option go_package = "github.com/argoproj/argo-cd/v3/pkg/apiclient/repository"; 3 4 // Repository Service 5 // 6 // Repository Service API performs CRUD actions against repository resources 7 package repository; 8 9 import "google/api/annotations.proto"; 10 import "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1/generated.proto"; 11 import "github.com/argoproj/argo-cd/v3/reposerver/repository/repository.proto"; 12 13 // RepoAppsQuery is a query for Repository apps 14 message RepoAppsQuery { 15 string repo = 1; 16 string revision = 2; 17 string appName = 3; 18 string appProject = 4; 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.v3.pkg.apis.application.v1alpha1.ApplicationSource source = 1; 31 string appName = 2; 32 string appProject = 3; 33 // source index (for multi source apps) 34 int32 sourceIndex = 4; 35 // versionId from historical data (for multi source apps) 36 int32 versionId = 5; 37 } 38 39 // RepoAppsResponse contains applications of specified repository 40 message RepoAppsResponse { 41 repeated AppInfo items = 1; 42 } 43 44 // RepoQuery is a query for Repository resources 45 message RepoQuery { 46 // Repo URL for query 47 string repo = 1; 48 // Whether to force a cache refresh on repo's connection state 49 bool forceRefresh = 2; 50 // App project for query 51 string appProject = 3; 52 } 53 54 // RepoAccessQuery is a query for checking access to a repo 55 message RepoAccessQuery { 56 // The URL to the repo 57 string repo = 1; 58 // Username for accessing repo 59 string username = 2; 60 // Password for accessing repo 61 string password = 3; 62 // Private key data for accessing SSH repository 63 string sshPrivateKey = 4; 64 // Whether to skip certificate or host key validation 65 bool insecure = 5; 66 // TLS client cert data for accessing HTTPS repository 67 string tlsClientCertData = 6; 68 // TLS client cert key for accessing HTTPS repository 69 string tlsClientCertKey = 7; 70 // The type of the repo 71 string type = 9; 72 // The name of the repo 73 string name = 10; 74 // Whether helm-oci support should be enabled for this repo 75 bool enableOci = 11; 76 // Github App Private Key PEM data 77 string githubAppPrivateKey = 12; 78 // Github App ID of the app used to access the repo 79 int64 githubAppID = 13; 80 // Github App Installation ID of the installed GitHub App 81 int64 githubAppInstallationID = 14; 82 // Github App Enterprise base url if empty will default to https://api.github.com 83 string githubAppEnterpriseBaseUrl = 15; 84 // HTTP/HTTPS proxy to access the repository 85 string proxy = 16; 86 // Reference between project and repository that allow you automatically to be added as item inside SourceRepos project entity 87 string project = 17; 88 // Google Cloud Platform service account key 89 string gcpServiceAccountKey = 18; 90 // Whether to force HTTP basic auth 91 bool forceHttpBasicAuth = 19; 92 // Whether to use azure workload identity for authentication 93 bool useAzureWorkloadIdentity = 20; 94 // BearerToken contains the bearer token used for Git auth at the repo server 95 string bearerToken = 21; 96 // Whether https should be disabled for an OCI repo 97 bool insecureOciForceHttp = 22; 98 } 99 100 message RepoResponse {} 101 102 // RepoCreateRequest is a request for creating repository config 103 message RepoCreateRequest { 104 // Repository definition 105 github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository repo = 1; 106 // Whether to create in upsert mode 107 bool upsert = 2; 108 // Whether to operate on credential set instead of repository 109 bool credsOnly = 3; 110 } 111 112 message RepoUpdateRequest { 113 github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository repo = 1; 114 } 115 116 // RepositoryService 117 service RepositoryService { 118 119 // List returns list of repos or repository credentials 120 rpc List(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryList) { 121 option (google.api.http).get = "/api/v1/repositories"; 122 option deprecated = true; 123 } 124 125 // Get returns a repository or its credentials 126 rpc Get(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) { 127 option (google.api.http).get = "/api/v1/repositories/{repo}"; 128 } 129 130 // GetWrite returns a repository or its write credentials 131 rpc GetWrite(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) { 132 option (google.api.http).get = "/api/v1/write-repositories/{repo}"; 133 } 134 135 // ListRepositories gets a list of all configured repositories 136 rpc ListRepositories(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryList) { 137 option (google.api.http).get = "/api/v1/repositories"; 138 } 139 140 // ListWriteRepositories gets a list of all configured write repositories 141 rpc ListWriteRepositories(RepoQuery) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.RepositoryList) { 142 option (google.api.http).get = "/api/v1/write-repositories"; 143 } 144 145 rpc ListRefs(RepoQuery) returns (Refs) { 146 option (google.api.http).get = "/api/v1/repositories/{repo}/refs"; 147 } 148 149 rpc ListOCITags(RepoQuery) returns (Refs) { 150 option (google.api.http).get = "/api/v1/repositories/{repo}/oci-tags"; 151 } 152 153 // ListApps returns list of apps in the repo 154 rpc ListApps(RepoAppsQuery) returns (RepoAppsResponse) { 155 option (google.api.http).get = "/api/v1/repositories/{repo}/apps"; 156 } 157 158 // GetAppDetails returns application details by given path 159 rpc GetAppDetails(RepoAppDetailsQuery) returns (repository.RepoAppDetailsResponse) { 160 option (google.api.http) = { 161 post: "/api/v1/repositories/{source.repoURL}/appdetails" 162 body: "*" 163 }; 164 } 165 166 // GetHelmCharts returns list of helm charts in the specified repository 167 rpc GetHelmCharts(RepoQuery) returns (repository.HelmChartsResponse) { 168 option (google.api.http).get = "/api/v1/repositories/{repo}/helmcharts"; 169 } 170 171 // Create creates a repo or a repo credential set 172 rpc Create(RepoCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) { 173 option (google.api.http) = { 174 post: "/api/v1/repositories" 175 body: "repo" 176 }; 177 option deprecated = true; 178 } 179 180 // CreateRepository creates a new repository configuration 181 rpc CreateRepository(RepoCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) { 182 option (google.api.http) = { 183 post: "/api/v1/repositories" 184 body: "repo" 185 }; 186 } 187 188 // CreateWriteRepository creates a new write repository configuration 189 rpc CreateWriteRepository(RepoCreateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) { 190 option (google.api.http) = { 191 post: "/api/v1/write-repositories" 192 body: "repo" 193 }; 194 } 195 196 // Update updates a repo or repo credential set 197 rpc Update(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) { 198 option (google.api.http) = { 199 put: "/api/v1/repositories/{repo.repo}" 200 body: "repo" 201 }; 202 option deprecated = true; 203 } 204 205 // UpdateRepository updates a repository configuration 206 rpc UpdateRepository(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) { 207 option (google.api.http) = { 208 put: "/api/v1/repositories/{repo.repo}" 209 body: "repo" 210 }; 211 } 212 213 // UpdateWriteRepository updates a write repository configuration 214 rpc UpdateWriteRepository(RepoUpdateRequest) returns (github.com.argoproj.argo_cd.v3.pkg.apis.application.v1alpha1.Repository) { 215 option (google.api.http) = { 216 put: "/api/v1/write-repositories/{repo.repo}" 217 body: "repo" 218 }; 219 } 220 221 // Delete deletes a repository from the configuration 222 rpc Delete(RepoQuery) returns (RepoResponse) { 223 option (google.api.http).delete = "/api/v1/repositories/{repo}"; 224 option deprecated = true; 225 } 226 227 // DeleteRepository deletes a repository from the configuration 228 rpc DeleteRepository(RepoQuery) returns (RepoResponse) { 229 option (google.api.http).delete = "/api/v1/repositories/{repo}"; 230 } 231 232 // DeleteWriteRepository deletes a write repository from the configuration 233 rpc DeleteWriteRepository(RepoQuery) returns (RepoResponse) { 234 option (google.api.http).delete = "/api/v1/write-repositories/{repo}"; 235 } 236 237 // ValidateAccess validates access to a repository with given parameters 238 rpc ValidateAccess(RepoAccessQuery) returns (RepoResponse) { 239 option (google.api.http) = { 240 post: "/api/v1/repositories/{repo}/validate" 241 body: "repo" 242 }; 243 } 244 245 // ValidateWriteAccess validates write access to a repository with given parameters 246 rpc ValidateWriteAccess(RepoAccessQuery) returns (RepoResponse) { 247 option (google.api.http) = { 248 post: "/api/v1/write-repositories/{repo}/validate" 249 body: "repo" 250 }; 251 } 252 }