[#54] apemanager: Move APE specific types to separate package

* Introduce `ape` package and move `apemanager/types.proto`
  to `ape/`;
* Fix `apemanager/service.proto`.

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-05-27 17:44:56 +03:00 committed by Evgenii Stratonikov
parent e199ad2914
commit 393c95899f
4 changed files with 101 additions and 72 deletions

View file

@ -2,7 +2,7 @@ syntax = "proto3";
package frostfs.v2.apemanager;
import "apemanager/types.proto";
import "ape/types.proto";
import "session/types.proto";
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager";
@ -52,10 +52,10 @@ service APEManagerService {
message AddChainRequest {
message Body {
// A target for which a rule chain is added.
ChainTarget target = 1;
frostfs.v2.ape.ChainTarget target = 1;
// The chain to set for the target.
Chain chain = 2;
frostfs.v2.ape.Chain chain = 2;
}
// The request's body.
@ -95,7 +95,7 @@ message AddChainResponse {
message RemoveChainRequest {
message Body {
// Target for which a rule chain is removed.
ChainTarget target = 1;
frostfs.v2.ape.ChainTarget target = 1;
// Chain ID assigned for the rule chain.
bytes chain_id = 2;
@ -135,7 +135,7 @@ message RemoveChainResponse {
message ListChainsRequest {
message Body {
// Target for which rule chains are listed.
ChainTarget target = 1;
frostfs.v2.ape.ChainTarget target = 1;
}
// The request's body.
@ -154,7 +154,7 @@ message ListChainsRequest {
message ListChainsResponse {
message Body {
// The list of chains defined for the reqeusted target.
repeated Chain chains = 1;
repeated frostfs.v2.ape.Chain chains = 1;
}
// The response's body.

View file

@ -1,33 +0,0 @@
syntax = "proto3";
package frostfs.v2.apemanager;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager/grpc;apemanager";
// TargetType is a type target to which a rule chain is defined.
enum TargetType {
UNDEFINED = 0;
NAMESPACE = 1;
CONTAINER = 2;
USER = 3;
GROUP = 4;
}
// ChainTarget is an object to which a rule chain is defined.
message ChainTarget {
TargetType type = 1;
string name = 2;
}
// Chain is a chain of rules defined for a specific target.
message Chain {
oneof kind {
// Raw representation of a serizalized rule chain.
bytes raw = 1;
}
}