mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-24 09:50:08 +00:00
* feat: Let user to define meaningful unique JWT token name * Update sessionmanager.go * Update server_test.go * Update sessionmanager_test.go * Adding get JWTToken by id if not then by issued time * Adding relate tests * Adding relate tests * Retrigger the build * feat: Let user to define meaningful unique JWT token name * Update sessionmanager.go * Update server_test.go * Update sessionmanager_test.go * Adding get JWTToken by id if not then by issued time * Adding relate tests * Retrigger the build * feat: Let user to define meaningful unique JWT token name * Adding get JWTToken by id if not then by issued time * Adding relate tests * Adding UI change * add yarn lint
120 lines
No EOL
3.6 KiB
Protocol Buffer
120 lines
No EOL
3.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
option go_package = "github.com/argoproj/argo-cd/pkg/apiclient/project";
|
|
|
|
// Project Service
|
|
//
|
|
// Project Service API performs CRUD actions against project resources
|
|
package project;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "k8s.io/api/core/v1/generated.proto";
|
|
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
|
import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto";
|
|
|
|
|
|
// ProjectCreateRequest defines project creation parameters.
|
|
message ProjectCreateRequest {
|
|
github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject project = 1;
|
|
bool upsert = 2;
|
|
}
|
|
|
|
// ProjectTokenCreateRequest defines project token deletion parameters.
|
|
message ProjectTokenDeleteRequest {
|
|
string project = 1;
|
|
string role = 2;
|
|
int64 iat = 3;
|
|
string id = 4;
|
|
}
|
|
|
|
// ProjectTokenCreateRequest defines project token creation parameters.
|
|
message ProjectTokenCreateRequest {
|
|
string project = 1;
|
|
string description = 2;
|
|
string role = 3;
|
|
// expiresIn represents a duration in seconds
|
|
int64 expiresIn = 4;
|
|
string id = 5;
|
|
}
|
|
// ProjectTokenResponse wraps the created token or returns an empty string if deleted.
|
|
message ProjectTokenResponse {
|
|
string token = 1;
|
|
}
|
|
|
|
|
|
// ProjectQuery is a query for Project resources
|
|
message ProjectQuery {
|
|
string name = 1;
|
|
}
|
|
|
|
message ProjectUpdateRequest {
|
|
github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject project = 1;
|
|
}
|
|
|
|
message EmptyResponse {}
|
|
|
|
message SyncWindowsQuery {
|
|
string name = 1;
|
|
}
|
|
|
|
message SyncWindowsResponse {
|
|
repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.SyncWindow windows = 1;
|
|
}
|
|
|
|
// ProjectService
|
|
service ProjectService {
|
|
|
|
// Create a new project token.
|
|
rpc CreateToken(ProjectTokenCreateRequest) returns (ProjectTokenResponse) {
|
|
option (google.api.http) = {
|
|
post: "/api/v1/projects/{project}/roles/{role}/token"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// Delete a new project token.
|
|
rpc DeleteToken(ProjectTokenDeleteRequest) returns (EmptyResponse) {
|
|
option (google.api.http).delete = "/api/v1/projects/{project}/roles/{role}/token/{iat}";
|
|
}
|
|
|
|
// Create a new project.
|
|
rpc Create(ProjectCreateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) {
|
|
option (google.api.http) = {
|
|
post: "/api/v1/projects"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// List returns list of projects
|
|
rpc List(ProjectQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProjectList) {
|
|
option (google.api.http).get = "/api/v1/projects";
|
|
}
|
|
|
|
// Get returns a project by name
|
|
rpc Get(ProjectQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) {
|
|
option (google.api.http).get = "/api/v1/projects/{name}";
|
|
}
|
|
|
|
// Update updates a project
|
|
rpc Update(ProjectUpdateRequest) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.AppProject) {
|
|
option (google.api.http) = {
|
|
put: "/api/v1/projects/{project.metadata.name}"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
// Delete deletes a project
|
|
rpc Delete(ProjectQuery) returns (EmptyResponse) {
|
|
option (google.api.http).delete = "/api/v1/projects/{name}";
|
|
}
|
|
|
|
// ListEvents returns a list of project events
|
|
rpc ListEvents(ProjectQuery) returns (k8s.io.api.core.v1.EventList) {
|
|
option (google.api.http).get = "/api/v1/projects/{name}/events";
|
|
}
|
|
|
|
// GetSchedulesState returns true if there are any active sync syncWindows
|
|
rpc GetSyncWindowsState(SyncWindowsQuery) returns (SyncWindowsResponse) {
|
|
option (google.api.http).get = "/api/v1/projects/{name}/syncwindows";
|
|
}
|
|
} |