Skip to content

Commit

Permalink
Define create workspace proto
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Nov 15, 2023
1 parent e8b7849 commit 748f008
Show file tree
Hide file tree
Showing 7 changed files with 1,299 additions and 257 deletions.
52 changes: 52 additions & 0 deletions components/public-api/gitpod/v1/workspace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ service WorkspaceService {

// ListWorkspaces returns a list of workspaces that match the query.
rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) {}

// CreateAndStartWorkspace creates a new workspace and starts it.
rpc CreateAndStartWorkspace(CreateAndStartWorkspaceRequest)
returns (CreateAndStartWorkspaceResponse) {}

// StartWorkspace starts an existing workspace.
rpc StartWorkspace(StartWorkspaceRequest) returns (StartWorkspaceResponse) {}
}

message GetWorkspaceRequest { string workspace_id = 1; }
Expand Down Expand Up @@ -65,6 +72,51 @@ message ListWorkspacesResponse {
PaginationResponse pagination = 2;
}

message CreateAndStartWorkspaceRequest {
message Source {

message Git {
string clone_url = 1;

// ref is an alternatively symbolic. e.g. refs/tags/v1.0,
// 9585191f37f7b0fb9444f35a9bf50de191beadc2
string ref = 2;

// create_local_branch is the branch you want to create based on provided
// clone_url and ref when workspace started
string create_local_branch = 3;
}

Git git = 1;
}

string organisation_id = 1;

string project_id = 2;

Source source = 3;

repeated WorkspaceEnvironmentVariable additional_env_variables = 4;

string region = 5;

string workspace_class = 6;

EditorReference editor = 7;

string name = 8;

bool pinned = 9;

bool force_default_config = 10;
}

message CreateAndStartWorkspaceResponse { Workspace workspace = 1; }

message StartWorkspaceRequest { string workspace_id = 1; }

message StartWorkspaceResponse { Workspace workspace = 1; }

// +resource get workspace
message Workspace {
string id = 1;
Expand Down
54 changes: 51 additions & 3 deletions components/public-api/go/v1/v1connect/workspace.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions components/public-api/go/v1/v1connect/workspace.proxy.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 748f008

Please sign in to comment.