Denis Kirillov
42862fd69e
All checks were successful
/ Vulncheck (pull_request) Successful in 3m20s
/ DCO (pull_request) Successful in 3m56s
/ Builds (1.20) (pull_request) Successful in 4m13s
/ Builds (1.21) (pull_request) Successful in 4m9s
/ Lint (pull_request) Successful in 3m9s
/ Tests (1.20) (pull_request) Successful in 4m14s
/ Tests (1.21) (pull_request) Successful in 3m59s
Add PutPolicies, RemovePolicies, GetPolicy, ListPolicies methods Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
180 lines
3.2 KiB
Protocol Buffer
180 lines
3.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package s3gw.control;
|
|
|
|
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-s3-gw/pkg/service/control";
|
|
|
|
// `ControlService` provides an interface for internal work with the storage node.
|
|
service ControlService {
|
|
// Performs health check of the storage node.
|
|
rpc HealthCheck (HealthCheckRequest) returns (HealthCheckResponse);
|
|
|
|
rpc PutPolicies (PutPoliciesRequest) returns (PutPoliciesResponse);
|
|
|
|
rpc RemovePolicies (RemovePoliciesRequest) returns (RemovePoliciesResponse);
|
|
|
|
rpc GetPolicy (GetPolicyRequest) returns (GetPolicyResponse);
|
|
|
|
rpc ListPolicies (ListPoliciesRequest) returns (ListPoliciesResponse);
|
|
}
|
|
|
|
// Signature of some message.
|
|
message Signature {
|
|
// Public key used for signing.
|
|
bytes key = 1 [json_name = "key"];
|
|
|
|
// Binary signature.
|
|
bytes sign = 2 [json_name = "signature"];
|
|
}
|
|
|
|
// Health check request.
|
|
message HealthCheckRequest {
|
|
message Body {
|
|
}
|
|
|
|
// Body of health check request message.
|
|
Body body = 1;
|
|
|
|
// Body signature.
|
|
Signature signature = 2;
|
|
}
|
|
|
|
// Health check response.
|
|
message HealthCheckResponse {
|
|
// Health check response body
|
|
message Body {
|
|
// Health status of storage node application.
|
|
HealthStatus health_status = 1;
|
|
}
|
|
|
|
// Body of health check response message.
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
}
|
|
|
|
|
|
// Health status of the storage node application.
|
|
enum HealthStatus {
|
|
// Undefined status, default value.
|
|
HEALTH_STATUS_UNDEFINED = 0;
|
|
|
|
// Storage node application is starting.
|
|
STARTING = 1;
|
|
|
|
// Storage node application is started and serves all services.
|
|
READY = 2;
|
|
|
|
// Storage node application is shutting down.
|
|
SHUTTING_DOWN = 3;
|
|
}
|
|
|
|
// Put policies request.
|
|
message PutPoliciesRequest {
|
|
message ChainData {
|
|
// Namespace.
|
|
string namespace = 1;
|
|
// Chain rules.
|
|
bytes chain = 2;
|
|
}
|
|
|
|
message Body {
|
|
repeated ChainData chainDatas = 1;
|
|
}
|
|
|
|
Body body = 1;
|
|
|
|
// Body signature.
|
|
Signature signature = 2;
|
|
}
|
|
|
|
// Put policies response.
|
|
message PutPoliciesResponse {
|
|
message Body {
|
|
}
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
}
|
|
|
|
// Remove policies request.
|
|
message RemovePoliciesRequest {
|
|
message ChainInfo {
|
|
// Namespace.
|
|
string namespace = 1;
|
|
// Chain id to remove.
|
|
string chainID = 2;
|
|
}
|
|
|
|
message Body {
|
|
repeated ChainInfo chainInfos = 1;
|
|
}
|
|
|
|
Body body = 1;
|
|
|
|
// Body signature.
|
|
Signature signature = 2;
|
|
}
|
|
|
|
// Remove policies response.
|
|
message RemovePoliciesResponse {
|
|
message Body {
|
|
}
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
}
|
|
|
|
// Get policy request.
|
|
message GetPolicyRequest {
|
|
message Body {
|
|
// Namespace.
|
|
string namespace = 1;
|
|
// Chain id to remove.
|
|
string chainID = 2;
|
|
}
|
|
|
|
Body body = 1;
|
|
|
|
// Body signature.
|
|
Signature signature = 2;
|
|
}
|
|
|
|
// Get policy response.
|
|
message GetPolicyResponse {
|
|
message Body {
|
|
// Chain rules.
|
|
bytes chain = 1;
|
|
}
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
}
|
|
|
|
// List policies request.
|
|
message ListPoliciesRequest {
|
|
message Body {
|
|
// Namespace.
|
|
string namespace = 1;
|
|
}
|
|
|
|
Body body = 1;
|
|
|
|
// Body signature.
|
|
Signature signature = 2;
|
|
}
|
|
|
|
// List policies response.
|
|
message ListPoliciesResponse {
|
|
message Body {
|
|
// Chain ids.
|
|
repeated string chainIDs = 1;
|
|
}
|
|
|
|
Body body = 1;
|
|
|
|
Signature signature = 2;
|
|
}
|