Skip to content

[public-api] Add envvar proto file #19085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 157 additions & 0 deletions components/public-api/gitpod/v1/envvar.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
syntax = "proto3";

package gitpod.v1;

option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1";
import "gitpod/v1/pagination.proto";

service EnvironmentVariableService {
// ListUserEnvironmentVariables returns all environment variables for the
// authenticated user.
rpc ListUserEnvironmentVariables(ListUserEnvironmentVariablesRequest)
returns (ListUserEnvironmentVariablesResponse) {}

// UpdateUserEnvironmentVariable updates an environment variable for the
// authenticated user.
rpc UpdateUserEnvironmentVariable(UpdateUserEnvironmentVariableRequest)
returns (UpdateUserEnvironmentVariableResponse) {}

// CreateUserEnvironmentVariable creates a new environment variable for the
// authenticated user.
rpc CreateUserEnvironmentVariable(CreateUserEnvironmentVariableRequest)
returns (CreateUserEnvironmentVariableResponse) {}

// DeleteUserEnvironmentVariable deletes an environment variable for the
// authenticated user.
rpc DeleteUserEnvironmentVariable(DeleteUserEnvironmentVariableRequest)
returns (DeleteUserEnvironmentVariableResponse) {}

// ListConfigurationEnvironmentVariables returns all environment variables in
// a configuration.
rpc ListConfigurationEnvironmentVariables(
ListConfigurationEnvironmentVariablesRequest)
returns (ListConfigurationEnvironmentVariablesResponse) {}

// UpdateConfigurationEnvironmentVariable updates an environment variable in
// a configuration.
rpc UpdateConfigurationEnvironmentVariable(
UpdateConfigurationEnvironmentVariableRequest)
returns (UpdateConfigurationEnvironmentVariableResponse) {}

// CreateConfigurationEnvironmentVariable creates a new environment variable
// in a configuration.
rpc CreateConfigurationEnvironmentVariable(
CreateConfigurationEnvironmentVariableRequest)
returns (CreateConfigurationEnvironmentVariableResponse) {}

// DeleteConfigurationEnvironmentVariable deletes an environment variable in
// a configuration.
rpc DeleteConfigurationEnvironmentVariable(
DeleteConfigurationEnvironmentVariableRequest)
returns (DeleteConfigurationEnvironmentVariableResponse) {}

rpc ResolveWorkspaceEnvironmentVariables(
ResolveWorkspaceEnvironmentVariablesRequest)
returns (ResolveWorkspaceEnvironmentVariablesResponse) {}
}

message UserEnvironmentVariable {
string id = 1;
string name = 2;
string value = 3;
string repository_pattern = 4;
}

message ListUserEnvironmentVariablesRequest {
PaginationRequest pagination = 1;
}

message ListUserEnvironmentVariablesResponse {
repeated UserEnvironmentVariable environment_variables = 1;
PaginationResponse pagination = 2;
}

message UpdateUserEnvironmentVariableRequest {
string env_var_id = 1;
optional string name = 2;
optional string value = 3;
optional string repository_pattern = 4;
}

message UpdateUserEnvironmentVariableResponse {
UserEnvironmentVariable environment_variable = 1;
}

message CreateUserEnvironmentVariableRequest {
string name = 1;
string value = 2;
string repository_pattern = 3;
}

message CreateUserEnvironmentVariableResponse {
UserEnvironmentVariable environment_variable = 1;
}

message DeleteUserEnvironmentVariableRequest { string env_var_id = 1; }

message DeleteUserEnvironmentVariableResponse {}

enum EnvironmentVariableAdmission {
ENVIRONMENT_VARIABLE_ADMISSION_UNSPECIFIED = 0;
ENVIRONMENT_VARIABLE_ADMISSION_PREBUILD = 1;
ENVIRONMENT_VARIABLE_ADMISSION_EVERYWHERE = 2;
}

message ConfigurationEnvironmentVariable {
string id = 1;
string name = 2;
string configuration_id = 4;
EnvironmentVariableAdmission admission = 5;
}

message ListConfigurationEnvironmentVariablesRequest {
string configuration_id = 1;
PaginationRequest pagination = 2;
}

message ListConfigurationEnvironmentVariablesResponse {
repeated ConfigurationEnvironmentVariable environment_variables = 1;
PaginationResponse pagination = 2;
}

message UpdateConfigurationEnvironmentVariableRequest {
string configuration_id = 1;
string env_var_id = 2;
optional string name = 3;
optional string value = 4;
optional EnvironmentVariableAdmission admission = 5;
}

message UpdateConfigurationEnvironmentVariableResponse {
ConfigurationEnvironmentVariable environment_variable = 1;
}

message CreateConfigurationEnvironmentVariableRequest {
string configuration_id = 1;
string name = 2;
string value = 3;
EnvironmentVariableAdmission admission = 4;
}

message CreateConfigurationEnvironmentVariableResponse {
ConfigurationEnvironmentVariable environment_variable = 1;
}

message DeleteConfigurationEnvironmentVariableRequest { string env_var_id = 1; }

message DeleteConfigurationEnvironmentVariableResponse {}

message ResolveWorkspaceEnvironmentVariablesRequest { string workspace_id = 1; }

message ResolveWorkspaceEnvironmentVariablesResponse {
message EnvironmentVariable {
string name = 1;
string value = 2;
}
repeated EnvironmentVariable environment_variables = 1;
}
Loading