mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-14 18:03:41 +08:00
171 lines
4.9 KiB
Protocol Buffer
171 lines
4.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package api;
|
|
|
|
import "google/api/annotations.proto";
|
|
import "label.proto";
|
|
|
|
service WorkflowTemplateService {
|
|
rpc CreateWorkflowTemplate (CreateWorkflowTemplateRequest) returns (WorkflowTemplate) {
|
|
option (google.api.http) = {
|
|
post: "/apis/v1beta1/{namespace}/workflow_templates"
|
|
body: "workflowTemplate"
|
|
};
|
|
}
|
|
|
|
rpc UpdateWorkflowTemplateVersion (UpdateWorkflowTemplateVersionRequest) returns (WorkflowTemplate) {
|
|
option (google.api.http) = {
|
|
put: "/apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions/{workflowTemplate.version}"
|
|
body: "workflowTemplate"
|
|
};
|
|
}
|
|
|
|
rpc CreateWorkflowTemplateVersion (CreateWorkflowTemplateRequest) returns (WorkflowTemplate) {
|
|
option (google.api.http) = {
|
|
post: "/apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions"
|
|
body: "workflowTemplate"
|
|
};
|
|
}
|
|
|
|
rpc GetWorkflowTemplate (GetWorkflowTemplateRequest) returns (WorkflowTemplate) {
|
|
option (google.api.http) = {
|
|
get: "/apis/v1beta1/{namespace}/workflow_templates/{uid}"
|
|
additional_bindings {
|
|
get: "/apis/v1beta1/{namespace}/workflow_templates/{uid}/versions/{version}"
|
|
}
|
|
};
|
|
}
|
|
|
|
rpc ListWorkflowTemplateVersions (ListWorkflowTemplateVersionsRequest) returns (ListWorkflowTemplateVersionsResponse) {
|
|
option (google.api.http) = {
|
|
get: "/apis/v1beta1/{namespace}/workflow_templates/{uid}/versions"
|
|
};
|
|
}
|
|
|
|
rpc ListWorkflowTemplates (ListWorkflowTemplatesRequest) returns (ListWorkflowTemplatesResponse) {
|
|
option (google.api.http) = {
|
|
get: "/apis/v1beta1/{namespace}/workflow_templates"
|
|
};
|
|
}
|
|
|
|
rpc CloneWorkflowTemplate (CloneWorkflowTemplateRequest) returns (WorkflowTemplate) {
|
|
option (google.api.http) = {
|
|
get: "/apis/v1beta1/{namespace}/workflow_templates/{uid}/clone/{name}"
|
|
additional_bindings {
|
|
get: "/apis/v1beta1/{namespace}/workflow_templates/{uid}/clone/{name}/{version}"
|
|
}
|
|
};
|
|
}
|
|
|
|
rpc ArchiveWorkflowTemplate (ArchiveWorkflowTemplateRequest) returns (ArchiveWorkflowTemplateResponse) {
|
|
option (google.api.http) = {
|
|
put: "/apis/v1beta1/{namespace}/workflow_templates/{uid}/archive"
|
|
};
|
|
}
|
|
|
|
rpc GetWorkflowTemplateLabels (GetWorkflowTemplateLabelsRequest) returns (GetLabelsResponse) {
|
|
option (google.api.http) = {
|
|
get: "/apis/v1beta1/{namespace}/workflow_templates/{name}/labels"
|
|
};
|
|
}
|
|
|
|
rpc AddWorkflowTemplateLabels (AddLabelsRequest) returns (GetLabelsResponse) {
|
|
option (google.api.http) = {
|
|
post: "/apis/v1beta1/{namespace}/workflow_templates/{name}/labels"
|
|
body: "labels"
|
|
};
|
|
}
|
|
|
|
rpc ReplaceWorkflowTemplateLabels (ReplaceLabelsRequest) returns (GetLabelsResponse) {
|
|
option (google.api.http) = {
|
|
put: "/apis/v1beta1/{namespace}/workflow_templates/{name}/labels"
|
|
body: "labels"
|
|
};
|
|
}
|
|
|
|
rpc DeleteWorkflowTemplateLabel (DeleteLabelRequest) returns (GetLabelsResponse) {
|
|
option (google.api.http) = {
|
|
delete: "/apis/v1beta1/{namespace}/workflow_templates/{name}/labels/{key}"
|
|
};
|
|
}
|
|
}
|
|
|
|
message CreateWorkflowTemplateRequest {
|
|
string namespace = 1;
|
|
WorkflowTemplate workflowTemplate = 2;
|
|
}
|
|
|
|
message UpdateWorkflowTemplateVersionRequest {
|
|
string namespace = 1;
|
|
WorkflowTemplate workflowTemplate = 2;
|
|
}
|
|
|
|
message GetWorkflowTemplateRequest {
|
|
string namespace = 1;
|
|
string uid = 2;
|
|
int64 version = 3;
|
|
}
|
|
|
|
message CloneWorkflowTemplateRequest {
|
|
string namespace = 1;
|
|
string uid = 2;
|
|
string name = 3;
|
|
int64 version = 4;
|
|
}
|
|
|
|
message ListWorkflowTemplateVersionsRequest {
|
|
string namespace = 1;
|
|
string uid = 2;
|
|
}
|
|
|
|
message ListWorkflowTemplateVersionsResponse {
|
|
int32 count = 1;
|
|
repeated WorkflowTemplate workflowTemplates = 2;
|
|
}
|
|
|
|
message ListWorkflowTemplatesRequest {
|
|
string namespace = 1;
|
|
}
|
|
|
|
message ListWorkflowTemplatesResponse {
|
|
int32 count = 1;
|
|
repeated WorkflowTemplate workflowTemplates = 2;
|
|
}
|
|
|
|
message ArchiveWorkflowTemplateRequest {
|
|
string namespace = 1;
|
|
string uid = 2;
|
|
}
|
|
|
|
message ArchiveWorkflowTemplateResponse {
|
|
WorkflowTemplate workflowTemplate = 1;
|
|
}
|
|
|
|
message WorkflowExecutionStatisticReport {
|
|
int32 total = 1;
|
|
string lastExecuted = 2;
|
|
int32 running = 3;
|
|
int32 completed = 4;
|
|
int32 failed = 5;
|
|
}
|
|
|
|
message WorkflowTemplate {
|
|
string createdAt = 1;
|
|
string uid = 2;
|
|
string name = 3;
|
|
int64 version = 4;
|
|
int64 versions = 5;
|
|
string manifest = 6;
|
|
bool isLatest = 7;
|
|
bool isArchived = 8;
|
|
repeated KeyValue labels = 9;
|
|
|
|
WorkflowExecutionStatisticReport stats = 10;
|
|
}
|
|
|
|
message GetWorkflowTemplateLabelsRequest {
|
|
string namespace = 1;
|
|
string name = 2;
|
|
int64 version = 3;
|
|
WorkflowExecutionStatisticReport stats = 8;
|
|
} |