Skip to content

Commit

Permalink
[public-api] Remove gp-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
easyCZ committed May 2, 2022
1 parent e0452ea commit bea7a54
Show file tree
Hide file tree
Showing 21 changed files with 483 additions and 1,538 deletions.
1 change: 0 additions & 1 deletion components/public-api-server/pkg/apiv1/prebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type PrebuildService struct {

func (p *PrebuildService) GetPrebuild(ctx context.Context, req *v1.GetPrebuildRequest) (*v1.GetPrebuildResponse, error) {
return &v1.GetPrebuildResponse{
ResponseStatus: nil,
Prebuild: &v1.Prebuild{
PrebuildId: req.GetPrebuildId(),
Spec: &v1.PrebuildSpec{
Expand Down
1 change: 0 additions & 1 deletion components/public-api-server/pkg/apiv1/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type WorkspaceService struct {

func (w *WorkspaceService) GetWorkspace(ctx context.Context, r *v1.GetWorkspaceRequest) (*v1.GetWorkspaceResponse, error) {
return &v1.GetWorkspaceResponse{
ResponseStatus: nil,
Result: &v1.Workspace{
WorkspaceId: r.GetWorkspaceId(),
OwnerId: "mock_owner",
Expand Down
1 change: 0 additions & 1 deletion components/public-api-server/pkg/apiv1/workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func TestWorkspaceService_GetWorkspace(t *testing.T) {
})
require.NoError(t, err)
require.Equal(t, &v1.GetWorkspaceResponse{
ResponseStatus: nil,
Result: &v1.Workspace{
WorkspaceId: workspaceID,
OwnerId: "mock_owner",
Expand Down
9 changes: 0 additions & 9 deletions components/public-api/BUILD.yaml

This file was deleted.

1 change: 0 additions & 1 deletion components/public-api/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ COMPONENTS_DIR="$ROOT_DIR"/components
source "$ROOT_DIR"/scripts/protoc-generator.sh

lint
leeway run .:lint

install_dependencies
go_protoc "$COMPONENTS_DIR" "gitpod/v1"
Expand Down
17 changes: 4 additions & 13 deletions components/public-api/gitpod/v1/prebuilds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ syntax = "proto3";
package gitpod.v1;

import "gitpod/v1/workspaces.proto";
import "google/rpc/status.proto";

option go_package = "github.com/gitpod-io/gitpod/public-api/v1";

Expand Down Expand Up @@ -34,36 +33,28 @@ message GetPrebuildRequest {
string prebuild_id = 1;
}
message GetPrebuildResponse {
google.rpc.Status response_status = 1;

Prebuild prebuild = 2;
Prebuild prebuild = 1;
}

message GetRunningPrebuildRequest {
string context_url = 1;
}
message GetRunningPrebuildResponse {
google.rpc.Status response_status = 1;

Prebuild prebuild = 2;
Prebuild prebuild = 1;
}

message ListenToPrebuildStatusRequest{
string prebuild_id = 1;
}
message ListenToPrebuildStatusResponse {
google.rpc.Status response_status = 1;

PrebuildStatus status = 2;
PrebuildStatus status = 1;
}

message ListenToPrebuildLogsRequest {
string prebuild_id = 1;
}
message ListenToPrebuildLogsResponse {
google.rpc.Status response_status = 1;

string line = 2;
string line = 1;
}

////////////////////////////////
Expand Down
41 changes: 11 additions & 30 deletions components/public-api/gitpod/v1/workspaces.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ option go_package = "github.com/gitpod-io/gitpod/public-api/v1";

import "google/protobuf/timestamp.proto";
import "google/protobuf/field_mask.proto";
import "google/rpc/status.proto";
import "gitpod/v1/pagination.proto";

service WorkspacesService {
Expand Down Expand Up @@ -58,20 +57,16 @@ message ListWorkspacesResponse {
WorkspaceInstance last_active_instances = 2;
}

google.rpc.Status response_status = 1;
string next_page_token = 1;

string next_page_token = 2;

repeated WorkspaceAndInstance result = 3;
repeated WorkspaceAndInstance result = 2;
}

message GetWorkspaceRequest {
string workspace_id = 1;
}
message GetWorkspaceResponse {
google.rpc.Status response_status = 1;

Workspace result = 2;
Workspace result = 1;
}

message CreateAndStartWorkspaceRequest {
Expand All @@ -85,9 +80,7 @@ message CreateAndStartWorkspaceRequest {
StartWorkspaceSpec start_spec = 5;
}
message CreateAndStartWorkspaceResponse {
google.rpc.Status response_status = 1;

string workspace_id = 2;
string workspace_id = 1;
}

message StartWorkspaceRequest {
Expand All @@ -97,56 +90,44 @@ message StartWorkspaceRequest {
StartWorkspaceSpec spec = 3;
}
message StartWorkspaceResponse {
google.rpc.Status response_status = 1;

string instance_id = 2;
string workspace_url = 3;
string instance_id = 1;
string workspace_url = 2;
}

message GetActiveWorkspaceInstanceRequest {
string workspace_id = 1;
}
message GetActiveWorkspaceInstanceResponse {
google.rpc.Status response_status = 1;

WorkspaceInstance instance = 2;
WorkspaceInstance instance = 1;
}

message GetWorkspaceInstanceOwnerTokenRequest {
string instance_id = 1;
}
message GetWorkspaceInstanceOwnerTokenResponse {
google.rpc.Status response_status = 1;

string owner_token = 2;
string owner_token = 1;
}

message ListenToWorkspaceInstanceRequest {
string instance_id = 1;
}
message ListenToWorkspaceInstanceResponse {
google.rpc.Status response_status = 1;

WorkspaceInstanceStatus instance_status = 2;
WorkspaceInstanceStatus instance_status = 1;
}

message ListenToImageBuildLogsRequest {
string instance_id = 1;
}
message ListenToImageBuildLogsResponse {
google.rpc.Status response_status = 1;

string line = 2;
string line = 1;
}

message StopWorkspaceRequest {
string idempotency_token = 1;

string workspace_id = 2;
}
message StopWorkspaceResponse {
google.rpc.Status response_status = 1;
}
message StopWorkspaceResponse {}

////////////////////////////////
// Shared messages come here
Expand Down
Loading

0 comments on commit bea7a54

Please sign in to comment.