Add accounts RPCs

This commit is contained in:
2024-03-18 11:14:42 +01:00
parent 5a816b2084
commit 9060b308bd
3 changed files with 161 additions and 3 deletions

View File

@ -0,0 +1,42 @@
/// 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 Create(AccountData) returns (AccountFull) {}
rpc Update(AccountFull) returns (AccountFull) {}
rpc Delete(AccountFull) returns (google.protobuf.Empty) {}
rpc Get(AccountId) returns (AccountFull) {}
rpc List(google.protobuf.Empty) returns (stream AccountFull) {}
}
/**
* 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
}
message AccountWithPassword {
AccountData data = 1;
AccountPassword AccountPassword = 2;
}
message AccountFull {
AccountId id = 1;
AccountData data = 2;
}