feat: file uploads
This commit is contained in:
@ -2,22 +2,45 @@ syntax = "proto3";
|
||||
|
||||
package user.v1;
|
||||
|
||||
service UserService {
|
||||
rpc ChangePassword (ChangePasswordRequest) returns (ChangePasswordResponse) {}
|
||||
rpc APIKey (APIKeyRequest) returns (APIKeyResponse) {}
|
||||
message User {
|
||||
uint32 id = 1;
|
||||
string username = 2;
|
||||
optional string profile_picture = 3;
|
||||
}
|
||||
|
||||
message ChangePasswordRequest {
|
||||
service UserService {
|
||||
rpc GetUser (GetUserRequest) returns (GetUserResponse) {}
|
||||
rpc UpdatePassword (UpdatePasswordRequest) returns (UpdatePasswordResponse) {}
|
||||
rpc GetAPIKey (GetAPIKeyRequest) returns (GetAPIKeyResponse) {}
|
||||
rpc UpdateProfilePicture (UpdateProfilePictureRequest) returns (UpdateProfilePictureResponse) {}
|
||||
}
|
||||
|
||||
message GetUserRequest {}
|
||||
message GetUserResponse {
|
||||
User user = 1;
|
||||
}
|
||||
|
||||
message UpdatePasswordRequest {
|
||||
string old_password = 1;
|
||||
string new_password = 2;
|
||||
string confirm_password = 3;
|
||||
}
|
||||
message ChangePasswordResponse {}
|
||||
message UpdatePasswordResponse {
|
||||
User user = 1;
|
||||
}
|
||||
|
||||
message APIKeyRequest {
|
||||
message GetAPIKeyRequest {
|
||||
string password = 1;
|
||||
string confirm_password = 2;
|
||||
}
|
||||
message APIKeyResponse {
|
||||
message GetAPIKeyResponse {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
message UpdateProfilePictureRequest {
|
||||
string file_name = 1;
|
||||
bytes data = 2;
|
||||
}
|
||||
message UpdateProfilePictureResponse {
|
||||
User user = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user