softplayer-proto/proto/accounts/accounts_v1.proto

49 lines
1008 B
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 ResetPassword (AccountData) 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;
}