softplayer-proto/proto/accounts/accounts_v1.proto

53 lines
1.1 KiB
Protocol Buffer

/// 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";
/**
* Service for handling environments
*/
service Accounts {
rpc SignUp (AccountWithPassword) returns (AccountFullWithToken) {}
rpc SignIn (AccountWithPassword) returns (AccountFullWithToken) {}
rpc ValidateEmail(AccountDataWithEmailCode) returns (google.protobuf.Empty) {}
}
/**
* Represents a environment UUID only
*/
message AccountId {
string id = 1; // Contour ID: UUID
}
message AccountPassword {
string password = 1;
}
message AccountData {
string name = 1; // Account name
string email = 2; // Account email
}
message AccountWithPassword {
AccountData data = 1;
AccountPassword password = 2;
}
message AccountFull {
AccountId id = 1;
AccountData data = 2;
}
message AccountFullWithToken {
AccountId id = 1;
AccountData data = 2;
string token = 3;
}
message AccountDataWithEmailCode {
AccountData data = 1;
int32 code = 2;
}