Compare commits
12 Commits
update-js-
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
dbd6423439
|
|||
|
52f43e57ad
|
|||
|
a00093ffc1
|
|||
|
92ae9a7a1b
|
|||
|
2431d438e5
|
|||
|
d88ceea9ea
|
|||
|
1325118309
|
|||
|
50a2797157
|
|||
|
9a404e5f09
|
|||
| 2b8987cab4 | |||
| 0401be278d | |||
| d3fd8e87e4 |
41
.woodpecker/dart-generate.yaml
Normal file
41
.woodpecker/dart-generate.yaml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone dart repo
|
||||||
|
image: alpine
|
||||||
|
environment:
|
||||||
|
GITEA_USER: devops-bot
|
||||||
|
GITEA_TOKEN:
|
||||||
|
from_secret: gitea_repo_access
|
||||||
|
commands:
|
||||||
|
- apk update && apk add git
|
||||||
|
- git clone https://$GITEA_USER:$GITEA_TOKEN@gitea.badhouseplants.net/softplayer/softplayer-dart-proto.git target
|
||||||
|
- git -C ./target config user.name "devops-bot"
|
||||||
|
- git -C ./target config user.email "bot@badhouseplants.net"
|
||||||
|
- git -C ./target checkout $CI_COMMIT_BRANCH || git -C ./target checkout -b $CI_COMMIT_BRANCH
|
||||||
|
- name: Generate code
|
||||||
|
image: bufbuild/buf
|
||||||
|
commands:
|
||||||
|
- buf generate
|
||||||
|
- rm -rf ./target/lib/src
|
||||||
|
- mkdir -p ./target/lib/src
|
||||||
|
- cp -r ./gen/dart/* ./target/
|
||||||
|
- name: Push the dart repo
|
||||||
|
image: alpine
|
||||||
|
environment:
|
||||||
|
GITEA_USER: devops-bot
|
||||||
|
GITEA_TOKEN:
|
||||||
|
from_secret: gitea_repo_access
|
||||||
|
commands:
|
||||||
|
- apk update && apk add git
|
||||||
|
- git -C ./target add .
|
||||||
|
- |-
|
||||||
|
git -C ./target commit --allow-empty \
|
||||||
|
-m "Update protobuf definitions: ${CI_COMMIT_SHA:0:8}" \
|
||||||
|
-m "By ${CI_COMMIT_AUTHOR}" \
|
||||||
|
-m "Commit link: ${CI_REPO_URL}/commit/${CI_COMMIT_SHA}" \
|
||||||
|
-m "Pipeline link: ${CI_PIPELINE_URL}"
|
||||||
|
- git -C ./target push --set-upstream origin $CI_COMMIT_BRANCH
|
||||||
@@ -15,7 +15,8 @@ steps:
|
|||||||
- git clone https://$GITEA_USER:$GITEA_TOKEN@gitea.badhouseplants.net/softplayer/softplayer-go-proto.git target
|
- git clone https://$GITEA_USER:$GITEA_TOKEN@gitea.badhouseplants.net/softplayer/softplayer-go-proto.git target
|
||||||
- git -C ./target config user.name "devops-bot"
|
- git -C ./target config user.name "devops-bot"
|
||||||
- git -C ./target config user.email "bot@badhouseplants.net"
|
- git -C ./target config user.email "bot@badhouseplants.net"
|
||||||
- name: Generate go code
|
- git -C ./target checkout $CI_COMMIT_BRANCH || git -C ./target checkout -b $CI_COMMIT_BRANCH
|
||||||
|
- name: Generate code
|
||||||
image: bufbuild/buf
|
image: bufbuild/buf
|
||||||
commands:
|
commands:
|
||||||
- buf generate
|
- buf generate
|
||||||
@@ -29,9 +30,6 @@ steps:
|
|||||||
from_secret: gitea_repo_access
|
from_secret: gitea_repo_access
|
||||||
commands:
|
commands:
|
||||||
- apk update && apk add git
|
- apk update && apk add git
|
||||||
- git config user.name "woodpecker-ci"
|
|
||||||
- git config user.email "bot@badhouseplants.net"
|
|
||||||
- git -C ./target checkout $CI_COMMIT_BRANCH || git -C ./target checkout -b $CI_COMMIT_BRANCH
|
|
||||||
- git -C ./target add .
|
- git -C ./target add .
|
||||||
- |-
|
- |-
|
||||||
git -C ./target commit --allow-empty \
|
git -C ./target commit --allow-empty \
|
||||||
|
|||||||
@@ -15,13 +15,15 @@ steps:
|
|||||||
- git clone https://$GITEA_USER:$GITEA_TOKEN@gitea.badhouseplants.net/softplayer/softplayer-js-proto.git target
|
- git clone https://$GITEA_USER:$GITEA_TOKEN@gitea.badhouseplants.net/softplayer/softplayer-js-proto.git target
|
||||||
- git -C ./target config user.name "devops-bot"
|
- git -C ./target config user.name "devops-bot"
|
||||||
- git -C ./target config user.email "bot@badhouseplants.net"
|
- git -C ./target config user.email "bot@badhouseplants.net"
|
||||||
- name: Generate go code
|
- git -C ./target checkout $CI_COMMIT_BRANCH || git -C ./target checkout -b $CI_COMMIT_BRANCH
|
||||||
|
- name: Generate code
|
||||||
image: bufbuild/buf
|
image: bufbuild/buf
|
||||||
commands:
|
commands:
|
||||||
- buf generate
|
- buf generate
|
||||||
- rm -rf ./target/src/api
|
- rm -rf ./target/src/api
|
||||||
|
- mkdir -p ./target/src/api
|
||||||
- cp -r ./gen/ts/* ./target/src/api
|
- cp -r ./gen/ts/* ./target/src/api
|
||||||
- name: Clone go repo
|
- name: Push the typescript repo
|
||||||
image: alpine
|
image: alpine
|
||||||
environment:
|
environment:
|
||||||
GITEA_USER: devops-bot
|
GITEA_USER: devops-bot
|
||||||
@@ -29,9 +31,6 @@ steps:
|
|||||||
from_secret: gitea_repo_access
|
from_secret: gitea_repo_access
|
||||||
commands:
|
commands:
|
||||||
- apk update && apk add git
|
- apk update && apk add git
|
||||||
- git config user.name "woodpecker-ci"
|
|
||||||
- git config user.email "bot@badhouseplants.net"
|
|
||||||
- git -C ./target checkout $CI_COMMIT_BRANCH || git -C ./target checkout -b $CI_COMMIT_BRANCH
|
|
||||||
- git -C ./target add .
|
- git -C ./target add .
|
||||||
- |-
|
- |-
|
||||||
git -C ./target commit --allow-empty \
|
git -C ./target commit --allow-empty \
|
||||||
|
|||||||
@@ -20,3 +20,7 @@ plugins:
|
|||||||
out: .
|
out: .
|
||||||
opt:
|
opt:
|
||||||
- markdown,README.md
|
- markdown,README.md
|
||||||
|
- remote: buf.build/protocolbuffers/dart:v25.0.0
|
||||||
|
out: gen/dart/lib/src
|
||||||
|
opt:
|
||||||
|
- grpc
|
||||||
|
|||||||
8
buf.yaml
8
buf.yaml
@@ -1,3 +1,11 @@
|
|||||||
version: v2
|
version: v2
|
||||||
modules:
|
modules:
|
||||||
- path: proto
|
- path: proto
|
||||||
|
|
||||||
|
lint:
|
||||||
|
use:
|
||||||
|
- STANDARD
|
||||||
|
enum_zero_value_suffix: _UNSPECIFIED
|
||||||
|
rpc_allow_same_request_response: true
|
||||||
|
rpc_allow_google_protobuf_empty_requests: true
|
||||||
|
rpc_allow_google_protobuf_empty_responses: true
|
||||||
|
|||||||
@@ -1,60 +1,64 @@
|
|||||||
/// This file has messages for describing environments
|
/// Protobuf definitions for the accounts service.
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package accounts;
|
package accounts.v1;
|
||||||
import "google/protobuf/empty.proto";
|
import "google/protobuf/empty.proto";
|
||||||
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts";
|
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/accounts/v1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service for handling environments
|
* Service for handling accounts that do not require authentication
|
||||||
*/
|
*/
|
||||||
service Accounts {
|
service PublicAccountsService {
|
||||||
rpc SignUp (AccountWithPassword) returns (AccountFullWithToken) {}
|
// Sing in into an existing account
|
||||||
rpc SignIn (AccountWithPassword) returns (AccountFullWithToken) {}
|
rpc SignIn (SignInRequest) returns (google.protobuf.Empty) {}
|
||||||
rpc ResetPassword (AccountData) returns (google.protobuf.Empty) {}
|
// Create a new account
|
||||||
rpc NewPassword (AccountWithPasswordAndCode) returns (google.protobuf.Empty) {}
|
rpc SignUp (SignUpRequest) returns (google.protobuf.Empty) {}
|
||||||
rpc IsEmailVerified (AccountData) returns (EmailVerified) {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message EmailVerified {
|
service AccountsService {
|
||||||
bool verified = 1;
|
// Is email for the current account verified
|
||||||
}
|
rpc IsEmailVerified (IsEmailVerifiedRequest) returns (IsEmailVerifiedResponse) {}
|
||||||
/**
|
rpc RefreshSession (google.protobuf.Empty) returns (google.protobuf.Empty) {}
|
||||||
* Represents a environment UUID only
|
// Authorize using long living tokens
|
||||||
*/
|
rpc TokenAuthorization (google.protobuf.Empty) returns (google.protobuf.Empty) {}
|
||||||
message AccountId {
|
|
||||||
string id = 1; // Contour ID: UUID
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message AccountPassword {
|
message AccountPassword {
|
||||||
string password = 1;
|
string password = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message AccountData {
|
message AccountData {
|
||||||
string name = 1; // Account name
|
string name = 1; // Account name
|
||||||
string email = 2; // Account email
|
string email = 2; // Account email
|
||||||
}
|
}
|
||||||
|
|
||||||
message AccountWithPassword {
|
message SignUpRequest {
|
||||||
AccountData data = 1;
|
string email = 1;
|
||||||
AccountPassword password = 2;
|
string password = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AccountWithPasswordAndCode {
|
message SignInRequest {
|
||||||
|
string email = 1;
|
||||||
|
string password = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
message ResetPasswordRequest {
|
||||||
|
AccountData data = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message NewPasswordRequest {
|
||||||
AccountData data = 1;
|
AccountData data = 1;
|
||||||
AccountPassword password = 2;
|
AccountPassword password = 2;
|
||||||
string code = 3;
|
string code = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message IsEmailVerifiedRequest {
|
||||||
message AccountFull {
|
AccountData data = 1;
|
||||||
AccountId id = 1;
|
|
||||||
AccountData data = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message AccountFullWithToken {
|
message IsEmailVerifiedResponse {
|
||||||
AccountId id = 1;
|
bool verified = 1;
|
||||||
AccountData data = 2;
|
|
||||||
string token = 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message RefreshTokenRequest {
|
||||||
|
string session_id = 1;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
/// This file has messages for describing applications
|
|
||||||
syntax = "proto3";
|
|
||||||
package applications;
|
|
||||||
import "google/protobuf/empty.proto";
|
|
||||||
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/applications";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service for handling applications
|
|
||||||
*/
|
|
||||||
service Applications {
|
|
||||||
rpc Create(CreateOptions) returns (ApplicationFull) {}
|
|
||||||
rpc Update(UpdateOptions) returns (ApplicationFull) {}
|
|
||||||
rpc Delete(DeleteOptions) returns (google.protobuf.Empty) {}
|
|
||||||
rpc Get(GetOptions) returns (ApplicationFull) {}
|
|
||||||
rpc List(ListOptions) returns (stream ApplicationFull) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
User related messages
|
|
||||||
*/
|
|
||||||
|
|
||||||
message OwnerId {
|
|
||||||
string uuid = 1; // UUID of a user that is creating an environemnt
|
|
||||||
}
|
|
||||||
|
|
||||||
message Token {
|
|
||||||
string token = 1; // Token that should be used to create an environment
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Services options
|
|
||||||
*/
|
|
||||||
|
|
||||||
message CreateOptions {
|
|
||||||
ApplicationMetadata metadata = 1;
|
|
||||||
ApplicationSpec spec = 2;
|
|
||||||
OwnerId owner_id = 3;
|
|
||||||
Token token = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message UpdateOptions {
|
|
||||||
ApplicationId id = 1;
|
|
||||||
ApplicationMetadata metadata = 2;
|
|
||||||
ApplicationSpec spec = 3;
|
|
||||||
OwnerId owner_id = 4;
|
|
||||||
Token token = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
message DeleteOptions {
|
|
||||||
ApplicationId id = 1;
|
|
||||||
ApplicationMetadata metadata = 2;
|
|
||||||
OwnerId owner_id = 3;
|
|
||||||
Token token = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message GetOptions {
|
|
||||||
ApplicationId id = 1;
|
|
||||||
ApplicationMetadata metadata = 2;
|
|
||||||
OwnerId owner_id = 3;
|
|
||||||
Token token = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ListOptions {
|
|
||||||
ApplicationMetadata metadata = 1;
|
|
||||||
OwnerId owner_id = 2;
|
|
||||||
Token token = 3;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
Environment related messages
|
|
||||||
*/
|
|
||||||
|
|
||||||
message ApplicationId {
|
|
||||||
string uuid = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ApplicationMetadata {
|
|
||||||
string name = 1;
|
|
||||||
string description = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ApplicationSpec {
|
|
||||||
string application = 1;
|
|
||||||
string version = 2;
|
|
||||||
string environemnt_id = 3;
|
|
||||||
map<string, string> config = 4;
|
|
||||||
string raw_config = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ApplicationFull {
|
|
||||||
ApplicationMetadata metadata = 1;
|
|
||||||
ApplicationSpec spec = 2;
|
|
||||||
ApplicationId id = 3;
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
syntax = "proto3";
|
|
||||||
package email;
|
|
||||||
import "google/protobuf/empty.proto";
|
|
||||||
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/email";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A service that should handle email validation
|
|
||||||
*/
|
|
||||||
service EmailValidation {
|
|
||||||
rpc SendRequest (RequestValidation) returns (google.protobuf.Empty) {}
|
|
||||||
rpc ValidateEmail (ConfirmValidation) returns (google.protobuf.Empty) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
message RequestValidation {
|
|
||||||
string user_id = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ConfirmValidation {
|
|
||||||
string user_id = 1;
|
|
||||||
int32 code = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
/// This file has messages for describing environments
|
|
||||||
syntax = "proto3";
|
|
||||||
package environments;
|
|
||||||
import "google/protobuf/empty.proto";
|
|
||||||
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/environments";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service for handling environments
|
|
||||||
*/
|
|
||||||
service Environments {
|
|
||||||
rpc Create(CreateOptions) returns (EnvironmentFull) {}
|
|
||||||
rpc Update(UpdateOptions) returns (EnvironmentFull) {}
|
|
||||||
rpc Delete(DeleteOptions) returns (google.protobuf.Empty) {}
|
|
||||||
rpc Get(GetOptions) returns (EnvironmentFull) {}
|
|
||||||
rpc List(ListOptions) returns (stream EnvironmentFull) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
User related messages
|
|
||||||
*/
|
|
||||||
|
|
||||||
message OwnerId {
|
|
||||||
string uuid = 1; // UUID of a user that is creating an environemnt
|
|
||||||
}
|
|
||||||
|
|
||||||
message Token {
|
|
||||||
string token = 1; // Token that should be used to create an environment
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Services options
|
|
||||||
*/
|
|
||||||
|
|
||||||
message CreateOptions {
|
|
||||||
EnvironmentMetadata metadata = 1;
|
|
||||||
EnvironmentSpec spec = 2;
|
|
||||||
OwnerId owner_id = 3;
|
|
||||||
Token token = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message UpdateOptions {
|
|
||||||
EnvironmentId id = 1;
|
|
||||||
EnvironmentMetadata metadata = 2;
|
|
||||||
EnvironmentSpec spec = 3;
|
|
||||||
OwnerId owner_id = 4;
|
|
||||||
Token token = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
message DeleteOptions {
|
|
||||||
EnvironmentId id = 1;
|
|
||||||
EnvironmentMetadata metadata = 2;
|
|
||||||
OwnerId owner_id = 3;
|
|
||||||
Token token = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message GetOptions {
|
|
||||||
EnvironmentId id = 1;
|
|
||||||
EnvironmentMetadata metadata = 2;
|
|
||||||
OwnerId owner_id = 3;
|
|
||||||
Token token = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ListOptions {
|
|
||||||
EnvironmentMetadata metadata = 1;
|
|
||||||
string search_string = 2;
|
|
||||||
OwnerId owner_id = 3;
|
|
||||||
Token token = 4;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
Environment related messages
|
|
||||||
*/
|
|
||||||
|
|
||||||
message EnvironmentId {
|
|
||||||
string uuid = 1;
|
|
||||||
}
|
|
||||||
message EnvironmentMetadata {
|
|
||||||
string name = 1; // A name of the environment
|
|
||||||
string description = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message EnvironmentSpec {
|
|
||||||
Provider provider = 1; // Provide
|
|
||||||
Kubernetes kubernetes = 2;
|
|
||||||
ServerType server_type = 3;
|
|
||||||
Location server_location = 4;
|
|
||||||
int32 disk_size = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
message EnvironmentFull {
|
|
||||||
EnvironmentMetadata metadata = 1;
|
|
||||||
EnvironmentSpec spec = 2;
|
|
||||||
EnvironmentId id = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
Helpers and other messages
|
|
||||||
*/
|
|
||||||
enum Provider {
|
|
||||||
PROVIDER_UNSPECIFIED = 0;
|
|
||||||
PROVIDER_HETZNER = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ServerType {
|
|
||||||
SERVER_TYPE_UNSPECIFIED = 0;
|
|
||||||
SERVER_TYPE_STARTER = 1;
|
|
||||||
SERVER_TYPE_REGULAR = 2;
|
|
||||||
SERVER_TYPE_PLUS = 3;
|
|
||||||
SERVER_TYPE_PRO = 4;
|
|
||||||
SERVER_TYPE_CUSTOM = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Location {
|
|
||||||
LOCATION_UNSPECIFIED = 0;
|
|
||||||
LOCATION_HETZNER_NUREMBERG = 1;
|
|
||||||
LOCATION_HETZNER_FALKENSTEIN = 2;
|
|
||||||
LOCATION_HETZNER_HELSINKI = 3;
|
|
||||||
LOCATION_HETZNER_HILLSBORO = 4;
|
|
||||||
LOCATION_HETZNER_ASHBURN = 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Kubernetes {
|
|
||||||
KUBERNETES_UNSPECIFIED = 0;
|
|
||||||
KUBERNETES_K3S = 1;
|
|
||||||
}
|
|
||||||
@@ -5,8 +5,11 @@ option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg
|
|||||||
/**
|
/**
|
||||||
* Service for handling environments
|
* Service for handling environments
|
||||||
*/
|
*/
|
||||||
service TestService {
|
service PublicTestService {
|
||||||
rpc Ping (PingRequest) returns (PingResponse) {}
|
rpc Ping (PingRequest) returns (PingResponse) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
service TestService {
|
||||||
rpc Pong (PongRequest) returns (PongResponse) {}
|
rpc Pong (PongRequest) returns (PongResponse) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
94
proto/tokens/v1/tokens_v1.proto
Normal file
94
proto/tokens/v1/tokens_v1.proto
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/// Protobuf definitions for the accounts service.
|
||||||
|
syntax = "proto3";
|
||||||
|
package tokens.v1;
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/tokens/v1";
|
||||||
|
|
||||||
|
// Tokens should be used for programmatic access
|
||||||
|
// For example CLI or terraform modules
|
||||||
|
service TokensService {
|
||||||
|
// Create a new token
|
||||||
|
rpc CreateToken (CreateTokenRequest) returns (CreateTokenResponse) {}
|
||||||
|
// Update an existing token
|
||||||
|
rpc UpdateToken (UpdateTokenRequest) returns (UpdateTokenResponse) {}
|
||||||
|
// Expire an existing token
|
||||||
|
rpc ForceTokenExpiration (ForceTokenExpirationRequest) returns (google.protobuf.Empty) {}
|
||||||
|
// Create a new token with the same UUID
|
||||||
|
rpc RegenerateToken (RegenerateTokenRequest) returns (RegenerateTokenResponse) {}
|
||||||
|
// Get an existing token
|
||||||
|
rpc GetToken (GetTokenRequest) returns (GetTokenResponse) {}
|
||||||
|
// List all existing tokens
|
||||||
|
rpc ListTokens (google.protobuf.Empty) returns (stream ListTokensResponse) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
message TokenMetadata {
|
||||||
|
// A token name
|
||||||
|
string name = 1;
|
||||||
|
// Token expiration timestamp
|
||||||
|
google.protobuf.Timestamp expires_at = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TokenUUID {
|
||||||
|
// An ID of a token
|
||||||
|
string uuid = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TokenValue {
|
||||||
|
// Token value
|
||||||
|
// Can be only retrieved once after the generation
|
||||||
|
string token = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TokenPermissions {}
|
||||||
|
|
||||||
|
message CreateTokenRequest {
|
||||||
|
TokenMetadata token_metadata = 1;
|
||||||
|
TokenPermissions token_permissions = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateTokenResponse {
|
||||||
|
TokenUUID token_uuid = 1;
|
||||||
|
TokenMetadata token_metadata = 2;
|
||||||
|
TokenPermissions token_permissions = 3;
|
||||||
|
TokenValue token_value = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateTokenRequest {
|
||||||
|
TokenUUID token_uuid = 1;
|
||||||
|
TokenMetadata token_metadata = 2;
|
||||||
|
TokenPermissions token_permissions = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateTokenResponse {
|
||||||
|
TokenUUID token_uuid = 1;
|
||||||
|
TokenMetadata token_metadata = 2;
|
||||||
|
TokenPermissions token_permissions = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ForceTokenExpirationRequest {
|
||||||
|
TokenUUID token_uuid = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RegenerateTokenRequest {
|
||||||
|
TokenUUID token_uuid = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RegenerateTokenResponse {
|
||||||
|
TokenValue token_value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetTokenRequest {
|
||||||
|
TokenUUID token_uuid = 1;
|
||||||
|
}
|
||||||
|
message GetTokenResponse {
|
||||||
|
TokenUUID token_uuid = 1;
|
||||||
|
TokenMetadata token_metadata = 2;
|
||||||
|
TokenPermissions token_permissions = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListTokensResponse {
|
||||||
|
TokenUUID token_uuid = 1;
|
||||||
|
TokenMetadata token_metadata = 2;
|
||||||
|
TokenPermissions token_permissions = 3;
|
||||||
|
}
|
||||||
3
renovate.json
Normal file
3
renovate.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user