mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-21 04:29:24 +08:00
73 lines
1.6 KiB
Protocol Buffer
73 lines
1.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package api;
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
service LabelService {
|
|
rpc GetLabels (GetLabelsRequest) returns (GetLabelsResponse) {
|
|
option (google.api.http) = {
|
|
get: "/apis/v1beta1/{namespace}/{resource}/{uid}/labels"
|
|
};
|
|
}
|
|
|
|
rpc AddLabels (AddLabelsRequest) returns (GetLabelsResponse) {
|
|
option (google.api.http) = {
|
|
post: "/apis/v1beta1/{namespace}/{resource}/{uid}/labels"
|
|
body: "labels"
|
|
};
|
|
}
|
|
|
|
rpc ReplaceLabels (ReplaceLabelsRequest) returns (GetLabelsResponse) {
|
|
option (google.api.http) = {
|
|
put: "/apis/v1beta1/{namespace}/{resource}/{uid}/labels"
|
|
body: "labels"
|
|
};
|
|
}
|
|
|
|
rpc DeleteLabel (DeleteLabelRequest) returns (GetLabelsResponse) {
|
|
option (google.api.http) = {
|
|
delete: "/apis/v1beta1/{namespace}/{resource}/{uid}/labels/{key}"
|
|
};
|
|
}
|
|
}
|
|
|
|
message KeyValue {
|
|
string key = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message Labels {
|
|
repeated KeyValue items = 1;
|
|
}
|
|
|
|
message AddLabelsRequest {
|
|
string namespace = 1;
|
|
string resource = 2;
|
|
string uid = 3;
|
|
Labels labels = 4;
|
|
}
|
|
|
|
message ReplaceLabelsRequest {
|
|
string namespace = 1;
|
|
string resource = 2;
|
|
string uid = 3;
|
|
Labels labels = 4;
|
|
}
|
|
|
|
message GetLabelsRequest {
|
|
string namespace = 1;
|
|
string resource = 2;
|
|
string uid = 3;
|
|
}
|
|
|
|
message GetLabelsResponse {
|
|
repeated KeyValue labels = 1;
|
|
}
|
|
|
|
message DeleteLabelRequest {
|
|
string namespace = 1;
|
|
string resource = 2;
|
|
string uid = 3;
|
|
string key = 4;
|
|
} |