Skip to content

Commit be71417

Browse files
add endpoint to wallet server for subscribing, upgrading and renewing storage plans
1 parent 38ce408 commit be71417

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

protos/platform_management/wallet_server.proto

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ service Wallet {
2222
rpc ListStoragePlans(ListStoragePlansRequest) returns (ListStoragePlansResponse);
2323
rpc UpdateStoragePlan(UpdateStoragePlanRequest) returns (UpdateStoragePlanResponse);
2424
rpc DeleteStoragePlan(DeleteStoragePlanRequest) returns (DeleteStoragePlanResponse);
25+
rpc SubscribeStoragePlan(SubscribeStoragePlanRequest) returns (SubscribeStoragePlanResponse);
26+
rpc UpgradeStoragePlan(UpgradeStoragePlanRequest) returns (UpgradeStoragePlanResponse);
27+
rpc RenewStoragePlan(RenewStoragePlanRequest) returns (RenewStoragePlanResponse);
2528
}
2629

2730

@@ -205,3 +208,39 @@ message DeleteStoragePlanRequest {
205208
message DeleteStoragePlanResponse {
206209
bool success = 1;
207210
}
211+
212+
message UserStoragePlan {
213+
string id = 1;
214+
uint32 user_id = 2;
215+
double price = 3;
216+
string expiration_date = 4;
217+
}
218+
219+
message SubscribeStoragePlanRequest {
220+
uint32 user_id = 1;
221+
string username = 2;
222+
string storage_plan_id = 3;
223+
}
224+
225+
message SubscribeStoragePlanResponse {
226+
UserStoragePlan user_storage_plan = 1;
227+
}
228+
229+
message UpgradeStoragePlanRequest {
230+
int32 user_id = 1;
231+
string username = 2;
232+
string storage_plan_id = 3;
233+
}
234+
235+
message UpgradeStoragePlanResponse {
236+
UserStoragePlan user_storage_plan = 1;
237+
}
238+
239+
message RenewStoragePlanRequest {
240+
int32 user_id = 1;
241+
string username = 2;
242+
}
243+
244+
message RenewStoragePlanResponse {
245+
UserStoragePlan user_storage_plan = 1;
246+
}

0 commit comments

Comments
 (0)