[#9999] services: Generate BillingService proto

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-03-07 10:40:37 +03:00
parent 46732b61d7
commit bb6bef9072
4 changed files with 87 additions and 0 deletions

BIN
pkg/services/billing/service.pb.go generated Normal file

Binary file not shown.

View file

@ -0,0 +1,87 @@
syntax = "proto3";
package billing;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/billing";
// `BillingService` provides an interface to get usage statistics.
service BillingService {
// Returns list that contains container usage statistic.
rpc ListContainers(ListContainersRequest) returns (ListContainersResponse);
}
// Signature of some message.
message Signature {
// Public key used for signing.
bytes key = 1;
// Binary signature.
bytes signature = 2;
}
message ListContainersRequest {
message Body {
// Container IDs to get container metrics. Not required. Maximum count is
// 10000 items.
repeated bytes container_id = 1;
// Max items count in the response. Not required. Default value is 1000. Not
// applicable if container_id is specified. Maximum value is 10000.
uint32 limit = 2;
// Next page token used to continue listing. Not required. If null or empty,
// listing starts from the beginning.
bytes next_page_token = 3;
}
Body body = 1;
Signature signature = 2;
}
message ListContainersResponse {
message Body {
message ContainerInfo {
message Count {
uint64 phy = 1;
uint64 logic = 2;
uint64 user = 3;
}
message Size { uint64 logic = 1; }
message Attributes {
// Container owner's wallet bytes.
bytes owner_wallet = 1;
// Container zone.
string zone = 2;
}
enum Status {
// Undefined status, default value.
UNDEFINED = 0;
// Container is available.
AVAILABLE = 1;
// Container is deleted.
DELETED = 2;
}
// Container ID.
bytes container_id = 1;
// Container status.
Status container_status = 2;
// Container attributes. May be null if container attributes are
// unavailable for current moment or container already deleted.
Attributes attributes = 3;
// Count of the objects in container.
Count count = 4;
// Size of the objects in container.
Size size = 5;
}
repeated ContainerInfo result = 1;
// Next page token used to get next batch. If returned value is null or
// empty, then listing completed.
bytes next_page_token = 2;
// Returned result is partial. This could happend if some shards are in
// degraded mode or returned an error.
bool partial = 3;
}
Body body = 1;
Signature signature = 2;
}

BIN
pkg/services/billing/service_frostfs.pb.go generated Normal file

Binary file not shown.

BIN
pkg/services/billing/service_grpc.pb.go generated Normal file

Binary file not shown.