Add the validate email rpc

This commit is contained in:
Nikolai Rodionov 2024-03-21 10:20:03 +01:00
parent 2bd603442a
commit 9535487822
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
2 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,7 @@
/// This file has messages for describing environments /// This file has messages for describing environments
syntax = "proto3"; syntax = "proto3";
package accounts; package accounts;
import "google/protobuf/empty.proto";
option go_package = "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts"; option go_package = "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts";
/** /**
@ -9,6 +10,7 @@ option go_package = "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/a
service Accounts { service Accounts {
rpc SignUp (AccountWithPassword) returns (AccountFullWithToken) {} rpc SignUp (AccountWithPassword) returns (AccountFullWithToken) {}
rpc SignIn (AccountWithPassword) returns (AccountFullWithToken) {} rpc SignIn (AccountWithPassword) returns (AccountFullWithToken) {}
rpc ValidateEmail(AccountDataWithEmailCode) returns (google.protobuf.Empty) {}
} }
/** /**
@ -19,7 +21,7 @@ message AccountId {
} }
message AccountPassword { message AccountPassword {
string Password = 1; string password = 1;
} }
@ -30,7 +32,7 @@ message AccountData {
message AccountWithPassword { message AccountWithPassword {
AccountData data = 1; AccountData data = 1;
AccountPassword AccountPassword = 2; AccountPassword password = 2;
} }
message AccountFull { message AccountFull {
@ -41,6 +43,10 @@ message AccountFull {
message AccountFullWithToken { message AccountFullWithToken {
AccountId id = 1; AccountId id = 1;
AccountData data = 2; AccountData data = 2;
string Token = 3; string token = 3;
} }
message AccountDataWithEmailCode {
AccountData data = 1;
int32 code = 2;
}

View File

@ -28,7 +28,8 @@ message EnvironmentData {
} }
enum Provider { enum Provider {
Hetzner = 0; PROVIDER_UNSPECIFIED = 0;
PROVIDER_HETZNER = 1;
} }
message EnvironmentFull { message EnvironmentFull {