softplayer-proto/proto/accounts/accounts_v1.proto

53 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

2024-03-18 10:14:42 +00:00
/// This file has messages for describing environments
syntax = "proto3";
package accounts;
2024-05-20 20:11:20 +00:00
import "google/protobuf/empty.proto";
2024-03-18 10:14:42 +00:00
option go_package = "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts";
/**
* Service for handling environments
*/
2024-03-18 11:16:30 +00:00
service Accounts {
2024-03-18 13:20:24 +00:00
rpc SignUp (AccountWithPassword) returns (AccountFullWithToken) {}
rpc SignIn (AccountWithPassword) returns (AccountFullWithToken) {}
2024-05-20 20:11:20 +00:00
rpc ResetPassword (AccountData) returns (google.protobuf.Empty) {}
2024-05-21 07:18:31 +00:00
rpc IsEmailVerified (AccountData) returns (EmailVerified) {}
2024-03-18 10:14:42 +00:00
}
2024-05-21 07:18:31 +00:00
message EmailVerified {
bool verified = 1;
}
2024-03-18 10:14:42 +00:00
/**
* Represents a environment UUID only
*/
message AccountId {
string id = 1; // Contour ID: UUID
}
message AccountPassword {
2024-03-21 09:20:03 +00:00
string password = 1;
2024-03-18 10:14:42 +00:00
}
message AccountData {
string name = 1; // Account name
2024-03-18 11:49:55 +00:00
string email = 2; // Account email
2024-03-18 10:14:42 +00:00
}
message AccountWithPassword {
AccountData data = 1;
2024-03-21 09:20:03 +00:00
AccountPassword password = 2;
2024-03-18 10:14:42 +00:00
}
message AccountFull {
AccountId id = 1;
AccountData data = 2;
}
2024-03-18 11:16:30 +00:00
2024-03-18 13:20:24 +00:00
message AccountFullWithToken {
AccountId id = 1;
AccountData data = 2;
2024-03-21 09:20:03 +00:00
string token = 3;
2024-03-18 11:16:30 +00:00
}