Add accounts RPCs
This commit is contained in:
parent
5a816b2084
commit
9060b308bd
122
README.md
122
README.md
@ -3,7 +3,7 @@
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [proto/environments_v1.proto](#proto_environments_v1-proto)
|
||||
- [environments/environments_v1.proto](#environments_environments_v1-proto)
|
||||
- [EnvironmentData](#environments-EnvironmentData)
|
||||
- [EnvironmentFull](#environments-EnvironmentFull)
|
||||
- [EnvironmentId](#environments-EnvironmentId)
|
||||
@ -12,14 +12,23 @@
|
||||
|
||||
- [Environments](#environments-Environments)
|
||||
|
||||
- [accounts/accounts_v1.proto](#accounts_accounts_v1-proto)
|
||||
- [AccountData](#accounts-AccountData)
|
||||
- [AccountFull](#accounts-AccountFull)
|
||||
- [AccountId](#accounts-AccountId)
|
||||
- [AccountPassword](#accounts-AccountPassword)
|
||||
- [AccountWithPassword](#accounts-AccountWithPassword)
|
||||
|
||||
- [Accounts](#accounts-Accounts)
|
||||
|
||||
- [Scalar Value Types](#scalar-value-types)
|
||||
|
||||
|
||||
|
||||
<a name="proto_environments_v1-proto"></a>
|
||||
<a name="environments_environments_v1-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## proto/environments_v1.proto
|
||||
## environments/environments_v1.proto
|
||||
This file has messages for describing environments
|
||||
|
||||
|
||||
@ -104,6 +113,113 @@ Service for handling environments
|
||||
|
||||
|
||||
|
||||
<a name="accounts_accounts_v1-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## accounts/accounts_v1.proto
|
||||
This file has messages for describing environments
|
||||
|
||||
|
||||
<a name="accounts-AccountData"></a>
|
||||
|
||||
### AccountData
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| name | [string](#string) | | Account name |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-AccountFull"></a>
|
||||
|
||||
### AccountFull
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| id | [AccountId](#accounts-AccountId) | | |
|
||||
| data | [AccountData](#accounts-AccountData) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-AccountId"></a>
|
||||
|
||||
### AccountId
|
||||
Represents a environment UUID only
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| id | [string](#string) | | Contour ID: UUID |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-AccountPassword"></a>
|
||||
|
||||
### AccountPassword
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| Password | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-AccountWithPassword"></a>
|
||||
|
||||
### AccountWithPassword
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| data | [AccountData](#accounts-AccountData) | | |
|
||||
| AccountPassword | [AccountPassword](#accounts-AccountPassword) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-Accounts"></a>
|
||||
|
||||
### Accounts
|
||||
Service for handling environments
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| Create | [AccountData](#accounts-AccountData) | [AccountFull](#accounts-AccountFull) | |
|
||||
| Update | [AccountFull](#accounts-AccountFull) | [AccountFull](#accounts-AccountFull) | |
|
||||
| Delete | [AccountFull](#accounts-AccountFull) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
|
||||
| Get | [AccountId](#accounts-AccountId) | [AccountFull](#accounts-AccountFull) | |
|
||||
| List | [.google.protobuf.Empty](#google-protobuf-Empty) | [AccountFull](#accounts-AccountFull) stream | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Scalar Value Types
|
||||
|
||||
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|
||||
|
42
proto/accounts/accounts_v1.proto
Normal file
42
proto/accounts/accounts_v1.proto
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user