diff --git a/README.md b/README.md index bdf8166..d5b7ee3 100644 --- a/README.md +++ b/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) - +
-## proto/environments_v1.proto +## environments/environments_v1.proto This file has messages for describing environments @@ -104,6 +113,113 @@ Service for handling environments + + + +## accounts/accounts_v1.proto +This file has messages for describing environments + + + + +### AccountData + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | Account name | + + + + + + + + +### AccountFull + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [AccountId](#accounts-AccountId) | | | +| data | [AccountData](#accounts-AccountData) | | | + + + + + + + + +### AccountId +Represents a environment UUID only + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | Contour ID: UUID | + + + + + + + + +### AccountPassword + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Password | [string](#string) | | | + + + + + + + + +### AccountWithPassword + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [AccountData](#accounts-AccountData) | | | +| AccountPassword | [AccountPassword](#accounts-AccountPassword) | | | + + + + + + + + + + + + + + +### 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 | diff --git a/proto/accounts/accounts_v1.proto b/proto/accounts/accounts_v1.proto new file mode 100644 index 0000000..8430274 --- /dev/null +++ b/proto/accounts/accounts_v1.proto @@ -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; +} diff --git a/proto/proto/environments_v1.proto b/proto/environments/environments_v1.proto similarity index 100% rename from proto/proto/environments_v1.proto rename to proto/environments/environments_v1.proto