All checks were successful
ci/woodpecker/push/go-generate Pipeline was successful
ci/woodpecker/push/dart-generate Pipeline was successful
ci/woodpecker/push/js-generate Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/repo-checks Pipeline was successful
Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
14 KiB
14 KiB
Protocol Documentation
Table of Contents
accounts/v1/accounts_v1.proto
Protobuf definitions for the accounts service.
AccountData
| Field | Type | Label | Description |
|---|---|---|---|
| name | string | Account name | |
| string | Account email |
AccountPassword
| Field | Type | Label | Description |
|---|---|---|---|
| password | string |
IsEmailVerifiedRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | AccountData |
IsEmailVerifiedResponse
| Field | Type | Label | Description |
|---|---|---|---|
| verified | bool |
NewPasswordRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | AccountData | ||
| password | AccountPassword | ||
| code | string |
RefreshTokenRequest
| Field | Type | Label | Description |
|---|---|---|---|
| session_id | string |
ResetPasswordRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | AccountData |
SignInRequest
| Field | Type | Label | Description |
|---|---|---|---|
| string | |||
| password | string |
SignUpRequest
| Field | Type | Label | Description |
|---|---|---|---|
| string | |||
| password | string |
AccountsService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| IsEmailVerified | IsEmailVerifiedRequest | IsEmailVerifiedResponse | Is email for the current account verified |
| RefreshSession | .google.protobuf.Empty | .google.protobuf.Empty | |
| TokenAuthorization | .google.protobuf.Empty | .google.protobuf.Empty | Authorize using long living tokens |
PublicAccountsService
Service for handling accounts that do not require authentication
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| SignIn | SignInRequest | .google.protobuf.Empty | Sing in into an existing account |
| SignUp | SignUpRequest | .google.protobuf.Empty | Create a new account |
test/v1/test_v1.proto
PingRequest
PingResponse
PongRequest
PongResponse
TestAuthService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Pong | PongRequest | PongResponse |
TestNoAuthService
Service for handling environments
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Ping | PingRequest | PingResponse |
tokens/v1/tokens_v1.proto
Protobuf definitions for the accounts service.
CreateTokenRequest
| Field | Type | Label | Description |
|---|---|---|---|
| token_metadata | TokenMetadata | ||
| token_permissions | TokenPermissions |
CreateTokenResponse
| Field | Type | Label | Description |
|---|---|---|---|
| token_uuid | TokenUUID | ||
| token_metadata | TokenMetadata | ||
| token_permissions | TokenPermissions | ||
| token_value | TokenValue |
ForceTokenExpirationRequest
| Field | Type | Label | Description |
|---|---|---|---|
| token_uuid | TokenUUID |
GetTokenRequest
| Field | Type | Label | Description |
|---|---|---|---|
| token_uuid | TokenUUID |
GetTokenResponse
| Field | Type | Label | Description |
|---|---|---|---|
| token_uuid | TokenUUID | ||
| token_metadata | TokenMetadata | ||
| token_permissions | TokenPermissions |
ListTokensResponse
| Field | Type | Label | Description |
|---|---|---|---|
| token_uuid | TokenUUID | ||
| token_metadata | TokenMetadata | ||
| token_permissions | TokenPermissions |
RegenerateTokenRequest
| Field | Type | Label | Description |
|---|---|---|---|
| token_uuid | TokenUUID |
RegenerateTokenResponse
| Field | Type | Label | Description |
|---|---|---|---|
| token_value | TokenValue |
TokenMetadata
| Field | Type | Label | Description |
|---|---|---|---|
| name | string | A token name | |
| expires_at | google.protobuf.Timestamp | Token expiration timestamp |
TokenPermissions
TokenUUID
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | An ID of a token |
TokenValue
| Field | Type | Label | Description |
|---|---|---|---|
| token | string | Token value Can be only retrieved once after the generation |
UpdateTokenRequest
| Field | Type | Label | Description |
|---|---|---|---|
| token_uuid | TokenUUID | ||
| token_metadata | TokenMetadata | ||
| token_permissions | TokenPermissions |
UpdateTokenResponse
| Field | Type | Label | Description |
|---|---|---|---|
| token_uuid | TokenUUID | ||
| token_metadata | TokenMetadata | ||
| token_permissions | TokenPermissions |
TokensService
Tokens should be used for programmatic access For example CLI or terraform modules
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreateToken | CreateTokenRequest | CreateTokenResponse | Create a new token |
| UpdateToken | UpdateTokenRequest | UpdateTokenResponse | Update an existing token |
| ForceTokenExpiration | ForceTokenExpirationRequest | .google.protobuf.Empty | Expire an existing token |
| RegenerateToken | RegenerateTokenRequest | RegenerateTokenResponse | Create a new token with the same UUID |
| GetToken | GetTokenRequest | GetTokenResponse | Get an existing token |
| ListTokens | .google.protobuf.Empty | ListTokensResponse stream | List all existing tokens |
Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|---|---|---|---|---|---|---|---|---|
| double | double | double | float | float64 | double | float | Float | |
| float | float | float | float | float32 | float | float | Float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |