From 9535487822d0edd390f9050adf0c1752da3e808c Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 21 Mar 2024 10:20:03 +0100 Subject: [PATCH] Add the validate email rpc --- proto/accounts/accounts_v1.proto | 12 +++++++++--- proto/environments/environments_v1.proto | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/proto/accounts/accounts_v1.proto b/proto/accounts/accounts_v1.proto index 633b946..45ad26d 100644 --- a/proto/accounts/accounts_v1.proto +++ b/proto/accounts/accounts_v1.proto @@ -1,6 +1,7 @@ /// This file has messages for describing environments syntax = "proto3"; package accounts; +import "google/protobuf/empty.proto"; 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 { rpc SignUp (AccountWithPassword) returns (AccountFullWithToken) {} rpc SignIn (AccountWithPassword) returns (AccountFullWithToken) {} + rpc ValidateEmail(AccountDataWithEmailCode) returns (google.protobuf.Empty) {} } /** @@ -19,7 +21,7 @@ message AccountId { } message AccountPassword { - string Password = 1; + string password = 1; } @@ -30,7 +32,7 @@ message AccountData { message AccountWithPassword { AccountData data = 1; - AccountPassword AccountPassword = 2; + AccountPassword password = 2; } message AccountFull { @@ -41,6 +43,10 @@ message AccountFull { message AccountFullWithToken { AccountId id = 1; AccountData data = 2; - string Token = 3; + string token = 3; } +message AccountDataWithEmailCode { + AccountData data = 1; + int32 code = 2; +} diff --git a/proto/environments/environments_v1.proto b/proto/environments/environments_v1.proto index 07049e7..a33e2b1 100644 --- a/proto/environments/environments_v1.proto +++ b/proto/environments/environments_v1.proto @@ -28,7 +28,8 @@ message EnvironmentData { } enum Provider { - Hetzner = 0; + PROVIDER_UNSPECIFIED = 0; + PROVIDER_HETZNER = 1; } message EnvironmentFull {