2022-08-02 10:26:28 +00:00
|
|
|
//COMA (COOPGO Mobility Accounts) gRPC service definition
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
option go_package = "git.coopgo.io/coopgo-platform/mobility-accounts/grpcapi";
|
|
|
|
|
|
|
|
import "accounts.proto";
|
|
|
|
|
|
|
|
service MobilityAccounts {
|
|
|
|
rpc Register(RegisterRequest) returns (RegisterResponse) {}
|
|
|
|
rpc UpdateData(UpdateDataRequest) returns (UpdateDataResponse) {}
|
|
|
|
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse) {}
|
2022-09-06 13:03:39 +00:00
|
|
|
rpc GetAccountUsername(GetAccountUsernameRequest) returns (GetAccountUsernameResponse) {}
|
2022-08-02 10:26:28 +00:00
|
|
|
rpc GetAccounts(GetAccountsRequest) returns (GetAccountsResponse) {}
|
2022-08-11 15:14:21 +00:00
|
|
|
rpc GetAccountsBatch(GetAccountsBatchRequest) returns (GetAccountsBatchResponse) {}
|
2022-08-02 10:26:28 +00:00
|
|
|
|
|
|
|
// Authentication functions
|
|
|
|
rpc Login(LoginRequest) returns (LoginResponse) {}
|
|
|
|
rpc ChangePassword(ChangePasswordRequest) returns (ChangePasswordResponse) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
message LoginRequest {
|
|
|
|
string username = 1;
|
|
|
|
string password = 2;
|
|
|
|
string namespace = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LoginResponse {
|
|
|
|
Account account = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterRequest {
|
|
|
|
Account account = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterResponse {
|
|
|
|
Account account = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateDataRequest {
|
|
|
|
Account account = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateDataResponse {
|
|
|
|
Account account = 8;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetAccountRequest {
|
|
|
|
string id = 9;
|
2022-09-06 13:03:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetAccountResponse {
|
|
|
|
Account account = 12;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetAccountUsernameRequest {
|
2022-08-02 10:26:28 +00:00
|
|
|
string username = 10;
|
|
|
|
string namespace = 11;
|
|
|
|
}
|
|
|
|
|
2022-09-06 13:03:39 +00:00
|
|
|
message GetAccountUsernameResponse {
|
2022-08-02 10:26:28 +00:00
|
|
|
Account account = 12;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetAccountsRequest {
|
|
|
|
repeated string namespaces = 13; // Filter on namespaces
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetAccountsResponse {
|
|
|
|
repeated Account accounts = 14;
|
|
|
|
}
|
|
|
|
|
2022-08-11 15:14:21 +00:00
|
|
|
message GetAccountsBatchRequest {
|
|
|
|
repeated string accountids = 13; // Filter on namespaces
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetAccountsBatchResponse {
|
|
|
|
repeated Account accounts = 14;
|
|
|
|
}
|
|
|
|
|
2022-08-02 10:26:28 +00:00
|
|
|
message ChangePasswordRequest {
|
|
|
|
string id = 15;
|
|
|
|
string password = 16;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ChangePasswordResponse {}
|