From bb6bef9072f9c7f0f841cdd8938c71edc888d8b1 Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Thu, 7 Mar 2024 10:40:37 +0300 Subject: [PATCH] [#9999] services: Generate BillingService proto Signed-off-by: Dmitrii Stepanov --- pkg/services/billing/service.pb.go | Bin 0 -> 35700 bytes pkg/services/billing/service.proto | 87 +++++++++++++++++++++ pkg/services/billing/service_frostfs.pb.go | Bin 0 -> 11631 bytes pkg/services/billing/service_grpc.pb.go | Bin 0 -> 4050 bytes 4 files changed, 87 insertions(+) create mode 100644 pkg/services/billing/service.pb.go create mode 100644 pkg/services/billing/service.proto create mode 100644 pkg/services/billing/service_frostfs.pb.go create mode 100644 pkg/services/billing/service_grpc.pb.go diff --git a/pkg/services/billing/service.pb.go b/pkg/services/billing/service.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..e13e7fb36c36a1d63fe6c6497e88a1d6909b6840 GIT binary patch literal 35700 zcmeHQTW{OQ6@Hd}#nca5YvCxm_>!ndflcfzjAj#Kle9&Hz@;V1VIz?$NjY`{|M#97 z$-}Ei$+ClN7Q0@1ICJiEzB9ui`S`JU;Z1CFX}h*>h4#c;+?a*$h2HoPv^~1?y5{(e zdHv>{IXOOk*KI$3Y_4oSa6C5{;UBG3XLHr>4u{>Ix?<#?tNrfafUgAJ(jVI+v-o`Z zII#UIXKV+LFPz!TapQ(A(QUUE*7&n^X&brRZaedZ=Z9vu&76IEI2*}3$*%bDH1 z^k$ZO+4cO($3)>`IejdBxIzBdk?}xoRy}y>hR)pP!Ppx{#!M4p!HqjMJNR>_-D$VS zU>_0^O!Rl#ccwQc{A7jj!wHnJ$7p+K36|5TGj?n@oZXn^;!)^5nt(UD?bf+@#{NLo z-4l1}f$4xEdSG|ZGmq5O-yB!2blR;9V?V3L25iZ&B+qZwwQvMM2E7id9^Nc$^U4Xr z7oHnh4#ZXPyB#dRAolrlZ*p@Ux1WMG=WjzRTn5H*!{H!pxA*SEp2GNv38>GWfxoTg zEHqcv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(!33@^S9>@7pQry3Hv)_QM3v*F*j~|ddxyEm!!y83l-G>XQEBvgs z?Q>neXB_;qquXeq)e62i@RDP5h2M?5>gp=`FE9qzVy&?SUs&yp@YiTP^wU)r6DD{~ zF86bnVXo2#MB^@lY?ssrM6sKE;ycw3A0&ZGx9|i1YiybRomnOeNxTsFKCCp@nw2`iky)$e48NMHNW`&rh{WsV95>yA5$_`7(SueC8fDX*+VKt=HJ(I^AZW&;F4QPXN$N?%Z}G~nym2mM ziFn9F1L%_;ov+6E?dsmRtCQi<*=kcg~jT`KY23Z$cMBt)d@(ur0u uK<2hfKHr7AE-!1YuAbovm!8yae2Wa0Nwl=6D`;}VqtUQrBNB(*w*L>XF{Ysa literal 0 HcmV?d00001 diff --git a/pkg/services/billing/service.proto b/pkg/services/billing/service.proto new file mode 100644 index 000000000..6c06cc0f6 --- /dev/null +++ b/pkg/services/billing/service.proto @@ -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; +} \ No newline at end of file diff --git a/pkg/services/billing/service_frostfs.pb.go b/pkg/services/billing/service_frostfs.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..c5ada111fa3219bf5e1ff870715eb5737b6b2e1e GIT binary patch literal 11631 zcmeHN(Qex|6n&1qg6NaICH9tddnn+CH7SN*SrXVO1}q2)+M;YCGU<_2Y`5sY?~)W{ zk&+!ZOH;Ws5Fl~PdqrKIb964LZWo>Mn4mFXL|{c?G+d&Y;EIoq;D1MBev}9V=3Jc}>zu$zB# zgl80zcOQEb-QSw@GvC<`jH?(R3?~2YC@3I|KJH)Aj<3vhgpIWE~Z#@ zAkK!0Yy=@hqB&I)8;7R^C6uHwdcbK0Urq1>S$#F642z{n--(ipjZkZWei+a(!#Y#D zG@n)*wahdqQ*HDqI-q(wy&hsT)gKS+e9=$Q!RP3}jQp`@=h}I@R7C2VYW;kO7M(xH zvb}!Du^zITLgW(bl+ou>mHxy+PH>8*_O}eGli!;yk}Zie)y)gSMNEV%-g$zcq6rZw zC2S1UqZ0m-y84*u`4sEYY9As-=59EQ!)eM#8a^&rKVLb_mWT+!1tM(3Gp2|DjLj!> zG(jA ziZC~)fqF7J9L(0^BVUP@2IcMD5LUaL|K0!;JMa^L1%3cbI=BQU^AXnep0w;p1B=o! z0E8g$0Sh2TB8dWOsOTX7+lQW;AD|D?-r6y5?p9db7zKa~qiWy@Lp*e9xO2_k_XVTxa%j&=fg%9BPh#n$r!_2M@(=o;5n*!#dOp3v3r&BNz_p zVW7dfivzfaLbC?^yC62tr8AcxTqG`@Uq(HQjWA*s`iQ#Gdq>f9M^P&w4nU3`4OEW+ zZEmJD`jLY*BWonhSn z$Mu$~RqBb>AvCCxHlf<{<|bv)`JE`e^sTnnLO7@BMHg;STN~Z&X*(~hbAuL5uWs({ z88oWUQT-QhU(Tnm_xP>)81uY-;m}RDW4gn&1#lbzHfv1LRM(6yEMicaz3V`iXktJGLHPcBw}yGo7a~=5ojewHqD(|6hr zR`W2u$Z@_ou*Q%3&~La6UoSLT6~30vxZ3Xf^oDKQZ7&aHcsTMk(0%(fuTh5piaSf! z-;@$`n1SVcF4C^{*o-&0n!_&PU$Bu)s@rkUdBfJU@e#%&{LLBJKmB+4>0gCYgGuh~ zkkxS9hi>>lx8QZRSK|bHH1DcHd?i^}btl!m{C6yyI#Gb8_vE;>=oI7OxJ+fTUFjr( z?G6)fT8a`Rx7pEqtq%rlx3tahU(DH&_B=&rF5#2cB<2{|pC-QaY2wzl#DUzgxq*)4 zF|jHLVh+bbvC@=sH&>CW4IB&e1T1qYYuXu)c3Y+a?m^|fLsZAaEi(We!wgypR^;3r z8FrX7O7=x>NWiH&qUcQz3C!S4l0~OaWR{xE!{F_SU^&gDjBB$IxAYDwx8a=&dhGtM3z3;(-gUhBcB|A;(ULl>>(%`4{PwFBEIFXnz>{-MrpaZ^#^i95oss zFClXSaJre+NXY&)c30j(ES*zsIHI&W-2hSVKowqD{SJ>~-MxO3^H_KB!4nQ-{{`mp Bgy8@H literal 0 HcmV?d00001 diff --git a/pkg/services/billing/service_grpc.pb.go b/pkg/services/billing/service_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..be81d72e0ffc95e7039570fffc397e6ab427cd0b GIT binary patch literal 4050 zcmcgvZExE)5dLiaikk;?a^cWjw_$*XVCd498Q9t)P4{IO0$MsdLS<1UDW^t}|Gwu) z$+2vw$$(--li1>syyv;+UNo7|naP=!T(Q-jbDD3cw#J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