github.com/argoproj/argo-cd@v1.8.7/server/project/project.proto (about) 1 syntax = "proto3"; 2 option go_package = "github.com/argoproj/argo-cd/pkg/apiclient/project"; 3 4 // Project Service 5 // 6 // Project Service API performs CRUD actions against project resources 7 package project; 8 9 import "gogoproto/gogo.proto"; 10 import "google/api/annotations.proto"; 11 import "k8s.io/api/core/v1/generated.proto"; 12 import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 13 import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto"; 14 15 16 // ProjectCreateRequest defines project creation parameters. 17 message ProjectCreateRequest { 18 github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject project = 1; 19 bool upsert = 2; 20 } 21 22 // ProjectTokenCreateRequest defines project token deletion parameters. 23 message ProjectTokenDeleteRequest { 24 string project = 1; 25 string role = 2; 26 int64 iat = 3; 27 string id = 4; 28 } 29 30 // ProjectTokenCreateRequest defines project token creation parameters. 31 message ProjectTokenCreateRequest { 32 string project = 1; 33 string description = 2; 34 string role = 3; 35 // expiresIn represents a duration in seconds 36 int64 expiresIn = 4; 37 string id = 5; 38 } 39 // ProjectTokenResponse wraps the created token or returns an empty string if deleted. 40 message ProjectTokenResponse { 41 string token = 1; 42 } 43 44 45 // ProjectQuery is a query for Project resources 46 message ProjectQuery { 47 string name = 1; 48 } 49 50 message ProjectUpdateRequest { 51 github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject project = 1; 52 } 53 54 message EmptyResponse {} 55 56 message SyncWindowsQuery { 57 string name = 1; 58 } 59 60 message SyncWindowsResponse { 61 repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.SyncWindow windows = 1; 62 } 63 64 message GlobalProjectsResponse { 65 repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject items = 1; 66 } 67 68 // ProjectService 69 service ProjectService { 70 71 // Create a new project token 72 rpc CreateToken(ProjectTokenCreateRequest) returns (ProjectTokenResponse) { 73 option (google.api.http) = { 74 post: "/api/v1/projects/{project}/roles/{role}/token" 75 body: "*" 76 }; 77 } 78 79 // Delete a new project token 80 rpc DeleteToken(ProjectTokenDeleteRequest) returns (EmptyResponse) { 81 option (google.api.http).delete = "/api/v1/projects/{project}/roles/{role}/token/{iat}"; 82 } 83 84 // Create a new project 85 rpc Create(ProjectCreateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { 86 option (google.api.http) = { 87 post: "/api/v1/projects" 88 body: "*" 89 }; 90 } 91 92 // List returns list of projects 93 rpc List(ProjectQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProjectList) { 94 option (google.api.http).get = "/api/v1/projects"; 95 } 96 97 // Get returns a project by name 98 rpc Get(ProjectQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { 99 option (google.api.http).get = "/api/v1/projects/{name}"; 100 } 101 102 // Get returns a virtual project by name 103 rpc GetGlobalProjects(ProjectQuery) returns (GlobalProjectsResponse) { 104 option (google.api.http).get = "/api/v1/projects/{name}/globalprojects"; 105 } 106 107 // Update updates a project 108 rpc Update(ProjectUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) { 109 option (google.api.http) = { 110 put: "/api/v1/projects/{project.metadata.name}" 111 body: "*" 112 }; 113 } 114 115 // Delete deletes a project 116 rpc Delete(ProjectQuery) returns (EmptyResponse) { 117 option (google.api.http).delete = "/api/v1/projects/{name}"; 118 } 119 120 // ListEvents returns a list of project events 121 rpc ListEvents(ProjectQuery) returns (k8s.io.api.core.v1.EventList) { 122 option (google.api.http).get = "/api/v1/projects/{name}/events"; 123 } 124 125 // GetSchedulesState returns true if there are any active sync syncWindows 126 rpc GetSyncWindowsState(SyncWindowsQuery) returns (SyncWindowsResponse) { 127 option (google.api.http).get = "/api/v1/projects/{name}/syncwindows"; 128 } 129 }