mobility-accounts/grpcapi/comasvc.proto

69 lines
1.4 KiB
Protocol Buffer

//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) {}
rpc GetAccounts(GetAccountsRequest) returns (GetAccountsResponse) {}
// 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;
string username = 10;
string namespace = 11;
}
message GetAccountResponse {
Account account = 12;
}
message GetAccountsRequest {
repeated string namespaces = 13; // Filter on namespaces
}
message GetAccountsResponse {
repeated Account accounts = 14;
}
message ChangePasswordRequest {
string id = 15;
string password = 16;
}
message ChangePasswordResponse {}