Skip to content

Commit

Permalink
[papi] add support for java and kotlin (#19868)
Browse files Browse the repository at this point in the history
Co-authored-by: Jean Pierre <[email protected]>
  • Loading branch information
mustard-mh and jeanp413 authored Jun 7, 2024
1 parent 92d622f commit 8f643e7
Show file tree
Hide file tree
Showing 147 changed files with 332,429 additions and 156 deletions.
5 changes: 5 additions & 0 deletions components/public-api/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ plugins:
out: typescript/src
opt: target=ts
path: typescript/node_modules/.bin/protoc-gen-connect-es

- plugin: buf.build/connectrpc/kotlin
out: java/src/main/java
- plugin: buf.build/protocolbuffers/java
out: java/src/main/java
3 changes: 3 additions & 0 deletions components/public-api/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ buf breaking --against "https://github.com/gitpod-io/gitpod.git#branch=main,subd

# Remove generated files, so they are re-created
rm -rf go/experimental
rm -rf java/src/main/java

protoc_buf_generate

update_license

git ls-files -- 'java/**/*.java' 'java/**/*.kt' | xargs pre-commit run trailing-whitespace --files || true

# Run end-of-file-fixer
git ls-files -- 'typescript/*.ts' | xargs pre-commit run end-of-file-fixer --files || true

Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/experimental/v1/dummy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.experimental.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

// HelloService is a dummy service that says hello. It is used for reliability
// testing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.experimental.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

service EditorService {
rpc ListEditorOptions(ListEditorOptionsRequest) returns (ListEditorOptionsResponse) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package gitpod.experimental.v1;
import "gitpod/experimental/v1/workspaces.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

service IDEClientService {
// SendHeartbeat sends a clientheartbeat signal for a running workspace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.experimental.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

service IdentityProviderService {
// GetIDToken produces a new OIDC ID token (https://openid.net/specs/openid-connect-core-1_0.html#ImplicitIDToken)
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/experimental/v1/oidc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "gitpod/experimental/v1/pagination.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

// Configuration of an OpenID client.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.experimental.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

message Pagination {
// Page size is the maximum number of results to retrieve per page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "gitpod/experimental/v1/pagination.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

message Project {
// ID is the unique identifier for the project.
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/experimental/v1/scm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.experimental.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

service SCMService {
// GetSuggestedRepoURLs returns a list of suggested repositories to open for
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/experimental/v1/stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.experimental.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

service StatsService {
// Retrieves the current user stats
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/experimental/v1/teams.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package gitpod.experimental.v1;
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

message Team {
// id is a UUID of the Team
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/experimental/v1/tokens.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

// PersonalAccessToken represents details of an access token for personal use.
message PersonalAccessToken {
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/experimental/v1/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package gitpod.experimental.v1;
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

message User {
// id is a UUID of the user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/experimental/v1";
option java_package = "io.gitpod.publicapi.experimental.v1";

service WorkspacesService {
// ListWorkspaces enumerates all workspaces belonging to the authenticated user.
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/authprovider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package gitpod.v1;
import "gitpod/v1/pagination.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service AuthProviderService {
// CreateAuthProvider creates a new auth provider.
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/configuration.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "gitpod/v1/sorting.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

message Configuration {
string id = 1;
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/editor.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

message EditorReference {
string name = 1;
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/envvar.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package gitpod.v1;
import "gitpod/v1/pagination.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service EnvironmentVariableService {
// ListUserEnvironmentVariables returns all environment variables for the
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/error.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package gitpod.v1;
import "google/protobuf/descriptor.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

// details for PERMISSION_DENIED status code
message PermissionDeniedDetails {
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/installation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "gitpod/v1/sorting.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service InstallationService {
// GetInstallationWorkspaceDefaultImage returns the default image for current
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/organization.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "gitpod/v1/workspace.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

message Organization {
string id = 1;
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/pagination.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

message PaginationRequest {
// Page size is the maximum number of results to retrieve per page.
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/prebuild.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "gitpod/v1/sorting.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service PrebuildService {
rpc StartPrebuild(StartPrebuildRequest) returns (StartPrebuildResponse) {}
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/scm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "gitpod/v1/pagination.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service SCMService {
// SearchSCMTokens allows clients to retrieve SCM tokens based on the
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/sorting.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

enum SortOrder {
SORT_ORDER_UNSPECIFIED = 0;
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/ssh.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import "gitpod/v1/pagination.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service SSHService {
// ListSSHPublicKeys returns all the ssh public keys for the
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/token.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service TokenService {
// CreateUserToken creates a new temporary access token for the specified user.
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service UserService {
// GetAuthenticatedUser allows to retrieve the current user.
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/verification.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package gitpod.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service VerificationService {
// SendPhoneNumberVerificationToken sends a verification token to the
Expand Down
1 change: 1 addition & 0 deletions components/public-api/gitpod/v1/workspace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
option java_package = "io.gitpod.publicapi.v1";

service WorkspaceService {
// GetWorkspace returns a single workspace.
Expand Down
15 changes: 9 additions & 6 deletions components/public-api/go/experimental/v1/dummy.pb.go

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

14 changes: 8 additions & 6 deletions components/public-api/go/experimental/v1/editor_service.pb.go

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

14 changes: 8 additions & 6 deletions components/public-api/go/experimental/v1/ide_client.pb.go

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

13 changes: 8 additions & 5 deletions components/public-api/go/experimental/v1/identityprovider.pb.go

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

14 changes: 8 additions & 6 deletions components/public-api/go/experimental/v1/oidc.pb.go

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

13 changes: 8 additions & 5 deletions components/public-api/go/experimental/v1/pagination.pb.go

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

Loading

0 comments on commit 8f643e7

Please sign in to comment.