Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: format proto (#5147)

p0ny31a9b756813b
diff --git a/proto/store/data_source.proto b/proto/store/data_source.proto
index 2d572c44ba..705393ff0e 100644
--- a/proto/store/data_source.proto
+++ b/proto/store/data_source.proto
@@ -14,4 +14,4 @@ message DataSourceOptions {
// sid and service_name are used for Oracle.
string sid = 3;
string service_name = 4;
-}
\ No newline at end of file
+}
diff --git a/proto/store/database.proto b/proto/store/database.proto
index b9dae181d1..bb16c1ac30 100644
--- a/proto/store/database.proto
+++ b/proto/store/database.proto
@@ -1,10 +1,11 @@
syntax = "proto3";
package bytebase.store;
-option go_package = "generated-go/store";
import "google/protobuf/wrappers.proto";
+option go_package = "generated-go/store";
+
// DatabaseMetadata is the metadata for databases.
message DatabaseMetadata {
string name = 1;
@@ -72,7 +73,7 @@ message TableMetadata {
// The comment is the comment of a table.
string comment = 11;
-
+
// The foreign_keys is the list of foreign keys in a table.
repeated ForeignKeyMetadata foreign_keys = 12;
}
@@ -141,7 +142,6 @@ message IndexMetadata {
string comment = 7;
}
-
// ExtensionMetadata is the metadata for extensions.
message ExtensionMetadata {
// The name is the name of an extension.
@@ -161,26 +161,26 @@ message ExtensionMetadata {
message ForeignKeyMetadata {
// The name is the name of a foreign key.
string name = 1;
-
+
// The columns are the ordered referencing columns of a foreign key.
repeated string columns = 2;
-
+
// The referenced_schema is the referenced schema name of a foreign key.
// It is an empty string for databases without such concept such as MySQL.
string referenced_schema = 3;
-
+
// The referenced_table is the referenced table name of a foreign key.
string referenced_table = 4;
-
+
// The referenced_columns are the ordered referenced columns of a foreign key.
repeated string referenced_columns = 5;
-
+
// The on_delete is the on delete action of a foreign key.
string on_delete = 6;
// The on_update is the on update action of a foreign key.
string on_update = 7;
-
+
// The match_type is the match type of a foreign key.
// The match_type is the PostgreSQL specific field.
// It's empty string for other databases.
@@ -192,6 +192,6 @@ message InstanceRoleMetadata {
// The role name. It's unique within the instance.
string name = 2;
- // The grant display string on the instance. It's generated by database engine.
+ // The grant display string on the instance. It's generated by database engine.
string grant = 7;
-}
\ No newline at end of file
+}
diff --git a/proto/store/idp.proto b/proto/store/idp.proto
index ec6c072d4f..b540dd38b6 100644
--- a/proto/store/idp.proto
+++ b/proto/store/idp.proto
@@ -49,7 +49,7 @@ message OIDCIdentityProviderConfig {
// As we save all raw json string of user info response data into `principal.idp_user_info`,
// we can extract the relevant data based with `FieldMapping`.
//
-// e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.
+// e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.
// Then the identifier of FieldMapping will be `login`, display_name will be `name`,
// and email will be `email`.
// reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user
diff --git a/proto/store/setting.proto b/proto/store/setting.proto
index ae4a33f71e..bff612f900 100644
--- a/proto/store/setting.proto
+++ b/proto/store/setting.proto
@@ -6,10 +6,10 @@ option go_package = "generated-go/store";
message WorkspaceProfileSetting {
// The URL user visits Bytebase.
- //
- // The external URL is used for:
- // 1. Constructing the correct callback URL when configuring the VCS provider. The callback URL points to the frontend.
- // 2. Creating the correct webhook endpoint when configuring the project GitOps workflow. The webhook endpoint points to the backend.
+ //
+ // The external URL is used for:
+ // 1. Constructing the correct callback URL when configuring the VCS provider. The callback URL points to the frontend.
+ // 2. Creating the correct webhook endpoint when configuring the project GitOps workflow. The webhook endpoint points to the backend.
string external_url = 1;
// Disallow self-service signup, users can only be invited by the owner.
diff --git a/proto/v1/actuator_service.proto b/proto/v1/actuator_service.proto
index 464e9e015c..7e0942a9e9 100644
--- a/proto/v1/actuator_service.proto
+++ b/proto/v1/actuator_service.proto
@@ -12,15 +12,12 @@ option go_package = "generated-go/v1";
service ActuatorService {
rpc GetActuatorInfo(GetActuatorInfoRequest) returns (ActuatorInfo) {
- option (google.api.http) = {
- get: "/v1/actuator/info"
- };
+ option (google.api.http) = {get: "/v1/actuator/info"};
option (google.api.method_signature) = "";
}
}
-message GetActuatorInfoRequest {
-}
+message GetActuatorInfoRequest {}
// ServerInfo is the API message for server info.
// Actuator concept is similar to the Spring Boot Actuator.
diff --git a/proto/v1/anomaly_service.proto b/proto/v1/anomaly_service.proto
index 78f0fa8467..6cdcb22a5c 100644
--- a/proto/v1/anomaly_service.proto
+++ b/proto/v1/anomaly_service.proto
@@ -4,20 +4,17 @@ package bytebase.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
-import "google/api/http.proto";
import "google/api/field_behavior.proto";
+import "google/api/http.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
service AnomalyService {
rpc SearchAnomalies(SearchAnomaliesRequest) returns (SearchAnomaliesResponse) {
- option (google.api.http) = {
- get: "/v1/anomalies:search"
- };
+ option (google.api.http) = {get: "/v1/anomalies:search"};
}
}
@@ -37,7 +34,7 @@ message SearchAnomaliesRequest {
int32 page_size = 2;
// Not used. A page token, received from a previous `SearchAnomalies` call.
- // Provide this to retrieve the subsequent page.
+ // Provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `SearchAnomalies` must match
// the call that provided the page token.
@@ -59,12 +56,12 @@ message Anomaly {
// Unspecified anomaly type.
ANOMALY_TYPE_UNSPECIFIED = 0;
// Instance level anomaly.
- //
+ //
// INSTANCE_CONNECTION is the anomaly type for instance connection, e.g. the instance is down.
INSTANCE_CONNECTION = 1;
// MIGRATION_SCHEMA is the anomaly type for migration schema, e.g. the migration schema in the instance is missing.
MIGRATION_SCHEMA = 2;
-
+
// Database level anomaly.
//
// DATABASE_BACKUP_POLICY_VIOLATION is the anomaly type for database backup policy violation,
@@ -173,4 +170,4 @@ message Anomaly {
DatabaseBackupMissingDetail database_backup_missing_detail = 7;
DatabaseSchemaDriftDetail database_schema_drift_detail = 8;
}
-}
\ No newline at end of file
+}
diff --git a/proto/v1/auth_service.proto b/proto/v1/auth_service.proto
index e10323b3a1..7d7e5c39f3 100644
--- a/proto/v1/auth_service.proto
+++ b/proto/v1/auth_service.proto
@@ -8,23 +8,18 @@ import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/wrappers.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
service AuthService {
rpc GetUser(GetUserRequest) returns (User) {
- option (google.api.http) = {
- get: "/v1/{name=users/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=users/*}"};
option (google.api.method_signature) = "name";
}
rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) {
- option (google.api.http) = {
- get: "/v1/users"
- };
+ option (google.api.http) = {get: "/v1/users"};
option (google.api.method_signature) = "parent";
}
@@ -45,9 +40,7 @@ service AuthService {
}
rpc DeleteUser(DeleteUserRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=users/*}"
- };
+ option (google.api.http) = {delete: "/v1/{name=users/*}"};
option (google.api.method_signature) = "name";
}
@@ -111,7 +104,6 @@ message CreateUserRequest {
User user = 1 [(google.api.field_behavior) = REQUIRED];
}
-
message UpdateUserRequest {
// The user to update.
//
@@ -181,8 +173,7 @@ message OAuth2IdentityProviderContext {
string code = 1;
}
-message OIDCIdentityProviderContext {
-}
+message OIDCIdentityProviderContext {}
message LoginResponse {
string token = 1;
@@ -190,8 +181,7 @@ message LoginResponse {
optional string mfa_temp_token = 2;
}
-message LogoutRequest {
-}
+message LogoutRequest {}
message User {
// The name of the user.
diff --git a/proto/v1/bookmark_service.proto b/proto/v1/bookmark_service.proto
index 8a7c35d2e9..fd761f58ea 100644
--- a/proto/v1/bookmark_service.proto
+++ b/proto/v1/bookmark_service.proto
@@ -8,7 +8,6 @@ import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/wrappers.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
@@ -22,20 +21,16 @@ service BookmarkService {
};
option (google.api.method_signature) = "parent,bookmark";
}
-
+
// DeleteBookmark deletes a bookmark.
rpc DeleteBookmark(DeleteBookmarkRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=users/*/bookmarks/*}"
- };
+ option (google.api.http) = {delete: "/v1/{name=users/*/bookmarks/*}"};
option (google.api.method_signature) = "name";
}
// ListBookmark lists bookmarks.
rpc ListBookmarks(ListBookmarksRequest) returns (ListBookmarksResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=users/*}/bookmarks"
- };
+ option (google.api.http) = {get: "/v1/{parent=users/*}/bookmarks"};
option (google.api.method_signature) = "parent";
}
}
@@ -67,7 +62,7 @@ message ListBookmarksRequest {
int32 page_size = 2;
// Not used. A page token, received from a previous `ListBookmarks` call.
- // Provide this to retrieve the subsequent page.
+ // Provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `ListBookmarks` must match
// the call that provided the page token.
@@ -90,7 +85,7 @@ message Bookmark {
// The title of the bookmark.
string title = 2 [(google.api.field_behavior) = REQUIRED];
-
+
// The resource link of the bookmark. Only support issue link for now.
// Format:
// Issue: /issue/slug(issue_name)-{issue_uid}
diff --git a/proto/v1/database_service.proto b/proto/v1/database_service.proto
index fb93e20708..65147254aa 100644
--- a/proto/v1/database_service.proto
+++ b/proto/v1/database_service.proto
@@ -10,23 +10,18 @@ import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
service DatabaseService {
rpc GetDatabase(GetDatabaseRequest) returns (Database) {
- option (google.api.http) = {
- get: "/v1/{name=environments/*/instances/*/databases/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=environments/*/instances/*/databases/*}"};
option (google.api.method_signature) = "name";
}
rpc ListDatabases(ListDatabasesRequest) returns (ListDatabasesResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=environments/*/instances/*}/databases"
- };
+ option (google.api.http) = {get: "/v1/{parent=environments/*/instances/*}/databases"};
option (google.api.method_signature) = "";
}
@@ -46,21 +41,15 @@ service DatabaseService {
}
rpc GetDatabaseMetadata(GetDatabaseMetadataRequest) returns (DatabaseMetadata) {
- option (google.api.http) = {
- get: "/v1/{name=environments/*/instances/*/databases/*/metadata}"
- };
+ option (google.api.http) = {get: "/v1/{name=environments/*/instances/*/databases/*/metadata}"};
}
rpc GetDatabaseSchema(GetDatabaseSchemaRequest) returns (DatabaseSchema) {
- option (google.api.http) = {
- get: "/v1/{name=environments/*/instances/*/databases/*/schema}"
- };
+ option (google.api.http) = {get: "/v1/{name=environments/*/instances/*/databases/*/schema}"};
}
rpc GetBackupSetting(GetBackupSettingRequest) returns (BackupSetting) {
- option (google.api.http) = {
- get: "/v1/{name=environments/*/instances/*/databases/*/backupSetting}"
- };
+ option (google.api.http) = {get: "/v1/{name=environments/*/instances/*/databases/*/backupSetting}"};
}
rpc UpdateBackupSetting(UpdateBackupSettingRequest) returns (BackupSetting) {
@@ -78,9 +67,7 @@ service DatabaseService {
}
rpc ListBackup(ListBackupRequest) returns (ListBackupResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=environments/*/instances/*/databases/*}/backups"
- };
+ option (google.api.http) = {get: "/v1/{parent=environments/*/instances/*/databases/*}/backups"};
option (google.api.method_signature) = "parent";
}
}
@@ -144,8 +131,7 @@ message BatchUpdateDatabasesRequest {
// The request message specifying the resources to update.
// A maximum of 1000 databases can be modified in a batch.
- repeated UpdateDatabaseRequest requests = 2
- [(google.api.field_behavior) = REQUIRED];
+ repeated UpdateDatabaseRequest requests = 2 [(google.api.field_behavior) = REQUIRED];
}
message BatchUpdateDatabasesResponse {
@@ -198,7 +184,7 @@ message ListBackupRequest {
int32 page_size = 2;
// Not used. A page token, received from a previous `ListBackup` call.
- // Provide this to retrieve the subsequent page.
+ // Provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `ListBackup` must match
// the call that provided the page token.
@@ -305,7 +291,7 @@ message TableMetadata {
// The comment is the comment of a table.
string comment = 11;
-
+
// The foreign_keys is the list of foreign keys in a table.
repeated ForeignKeyMetadata foreign_keys = 12;
}
@@ -374,7 +360,6 @@ message IndexMetadata {
string comment = 7;
}
-
// ExtensionMetadata is the metadata for extensions.
message ExtensionMetadata {
// The name is the name of an extension.
@@ -394,26 +379,26 @@ message ExtensionMetadata {
message ForeignKeyMetadata {
// The name is the name of a foreign key.
string name = 1;
-
+
// The columns are the ordered referencing columns of a foreign key.
repeated string columns = 2;
-
+
// The referenced_schema is the referenced schema name of a foreign key.
// It is an empty string for databases without such concept such as MySQL.
string referenced_schema = 3;
-
+
// The referenced_table is the referenced table name of a foreign key.
string referenced_table = 4;
-
+
// The referenced_columns are the ordered referenced columns of a foreign key.
repeated string referenced_columns = 5;
-
+
// The on_delete is the on delete action of a foreign key.
string on_delete = 6;
// The on_update is the on update action of a foreign key.
string on_update = 7;
-
+
// The match_type is the match type of a foreign key.
// The match_type is the PostgreSQL specific field.
// It's empty string for other databases.
@@ -440,7 +425,7 @@ message BackupSetting {
// Cron(https://wikipedia.com/wiki/cron) string that defines a repeating schedule for creating Backups.
// Support hour of day, day of week. (UTC time)
- //
+ //
// Default (empty): Disable automatic backup.
string cron_schedule = 3;
@@ -492,7 +477,7 @@ message Backup {
// The state of the backup.
BackupState state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
-
+
// The type of the backup.
BackupType backup_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
diff --git a/proto/v1/environment_service.proto b/proto/v1/environment_service.proto
index f15019485f..6abd959a5c 100644
--- a/proto/v1/environment_service.proto
+++ b/proto/v1/environment_service.proto
@@ -7,23 +7,18 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
service EnvironmentService {
rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) {
- option (google.api.http) = {
- get: "/v1/{name=environments/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=environments/*}"};
option (google.api.method_signature) = "name";
}
rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) {
- option (google.api.http) = {
- get: "/v1/environments"
- };
+ option (google.api.http) = {get: "/v1/environments"};
option (google.api.method_signature) = "";
}
@@ -44,9 +39,7 @@ service EnvironmentService {
}
rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=environments/*}"
- };
+ option (google.api.http) = {delete: "/v1/{name=environments/*}"};
option (google.api.method_signature) = "name";
}
@@ -147,4 +140,4 @@ enum EnvironmentTier {
ENVIRONMENT_TIER_UNSPECIFIED = 0;
PROTECTED = 1;
UNPROTECTED = 2;
-}
\ No newline at end of file
+}
diff --git a/proto/v1/externalvs_service.proto b/proto/v1/externalvs_service.proto
index 6f3ff5e23c..55201b4f6a 100644
--- a/proto/v1/externalvs_service.proto
+++ b/proto/v1/externalvs_service.proto
@@ -7,23 +7,18 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
service ExternalVersionControlService {
rpc GetExternalVersionControl(GetExternalVersionControlRequest) returns (ExternalVersionControl) {
- option (google.api.http) = {
- get: "/v1/{name=externalVersionControls/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=externalVersionControls/*}"};
option (google.api.method_signature) = "name";
}
rpc ListExternalVersionControls(ListExternalVersionControlsRequest) returns (ListExternalVersionControlsResponse) {
- option (google.api.http) = {
- get: "/v1/externalVersionControls"
- };
+ option (google.api.http) = {get: "/v1/externalVersionControls"};
option (google.api.method_signature) = "";
}
@@ -44,9 +39,7 @@ service ExternalVersionControlService {
}
rpc DeleteExternalVersionControl(DeleteExternalVersionControlRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=externalVersionControls/*}"
- };
+ option (google.api.http) = {delete: "/v1/{name=externalVersionControls/*}"};
}
rpc SearchExternalVersionControlProjects(SearchExternalVersionControlProjectsRequest) returns (SearchExternalVersionControlProjectsResponse) {
@@ -57,9 +50,7 @@ service ExternalVersionControlService {
}
rpc ListProjectGitOpsInfo(ListProjectGitOpsInfoRequest) returns (ListProjectGitOpsInfoResponse) {
- option (google.api.http) = {
- get: "/v1/{name=externalVersionControls/*}/projects"
- };
+ option (google.api.http) = {get: "/v1/{name=externalVersionControls/*}/projects"};
}
}
@@ -68,9 +59,9 @@ message CreateExternalVersionControlRequest {
}
message GetExternalVersionControlRequest {
- // The name of the external version control to retrieve.
- // Format: externalVersionControls/{externalVersionControl}
- string name = 1 [(google.api.field_behavior) = REQUIRED];
+ // The name of the external version control to retrieve.
+ // Format: externalVersionControls/{externalVersionControl}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
}
message ListExternalVersionControlsRequest {
@@ -78,7 +69,7 @@ message ListExternalVersionControlsRequest {
// If unspecified, at most 100 external version control will be returned.
// The maximum value is 1000; values above 1000 will be coerced to 1000.
int32 page_size = 1;
-
+
// Not used. A page token, received from a previous `ListExternalVersionControls` call.
// Provide this to retrieve the subsequent page.
string page_token = 2;
@@ -87,7 +78,7 @@ message ListExternalVersionControlsRequest {
message ListExternalVersionControlsResponse {
// The list of external version control.
repeated ExternalVersionControl external_version_controls = 1;
-
+
// Not used. A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
string next_page_token = 2;
@@ -95,7 +86,7 @@ message ListExternalVersionControlsResponse {
message UpdateExternalVersionControlRequest {
ExternalVersionControl external_version_control = 1 [(google.api.field_behavior) = REQUIRED];
-
+
// The list of fields to be updated.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
@@ -112,7 +103,7 @@ message SearchExternalVersionControlProjectsRequest {
string name = 1 [(google.api.field_behavior) = REQUIRED];
string access_token = 2 [(google.api.field_behavior) = REQUIRED];
-
+
string refresh_token = 3 [(google.api.field_behavior) = REQUIRED];
}
@@ -134,7 +125,7 @@ message SearchExternalVersionControlProjectsResponse {
message ListProjectGitOpsInfoRequest {
// The name of the external version control to retrieve the linked projects.
// Format: externalVersionControls/{externalVersionControl}
- string name = 1 [(google.api.field_behavior) = REQUIRED];
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
}
message ListProjectGitOpsInfoResponse {
@@ -216,4 +207,4 @@ message ProjectGitOpsInfo {
// The webhook endpoint ID of the repository.
string webhook_endpoint_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
-}
\ No newline at end of file
+}
diff --git a/proto/v1/idp_service.proto b/proto/v1/idp_service.proto
index 5099a58cee..a72d7ca5bc 100644
--- a/proto/v1/idp_service.proto
+++ b/proto/v1/idp_service.proto
@@ -7,23 +7,18 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
service IdentityProviderService {
rpc GetIdentityProvider(GetIdentityProviderRequest) returns (IdentityProvider) {
- option (google.api.http) = {
- get: "/v1/{name=idps/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=idps/*}"};
option (google.api.method_signature) = "name";
}
rpc ListIdentityProviders(ListIdentityProvidersRequest) returns (ListIdentityProvidersResponse) {
- option (google.api.http) = {
- get: "/v1/idps"
- };
+ option (google.api.http) = {get: "/v1/idps"};
option (google.api.method_signature) = "";
}
@@ -44,9 +39,7 @@ service IdentityProviderService {
}
rpc DeleteIdentityProvider(DeleteIdentityProviderRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=idps/*}"
- };
+ option (google.api.http) = {delete: "/v1/{name=idps/*}"};
option (google.api.method_signature) = "name";
}
@@ -213,7 +206,7 @@ message OIDCIdentityProviderConfig {
// As we save all raw json string of user info response data into `principal.idp_user_info`,
// we can extract the relevant data based with `FieldMapping`.
//
-// e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.
+// e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.
// Then the identifier of FieldMapping will be `login`, display_name will be `name`,
// and email will be `email`.
// reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user
diff --git a/proto/v1/instance_role_service.proto b/proto/v1/instance_role_service.proto
index fb97ba3c04..ae3266779d 100644
--- a/proto/v1/instance_role_service.proto
+++ b/proto/v1/instance_role_service.proto
@@ -7,23 +7,18 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
service InstanceRoleService {
rpc GetRole(GetRoleRequest) returns (InstanceRole) {
- option (google.api.http) = {
- get: "/v1/{name=environments/*/instances/*/roles/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=environments/*/instances/*/roles/*}"};
option (google.api.method_signature) = "name";
}
rpc ListRoles(ListRolesRequest) returns (ListRolesResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=environments/*/instances/*}/roles"
- };
+ option (google.api.http) = {get: "/v1/{parent=environments/*/instances/*}/roles"};
option (google.api.method_signature) = "parent";
}
@@ -44,9 +39,7 @@ service InstanceRoleService {
}
rpc DeleteRole(DeleteRoleRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=environments/*/instances/*/roles/*}"
- };
+ option (google.api.http) = {delete: "/v1/{name=environments/*/instances/*/roles/*}"};
option (google.api.method_signature) = "name";
}
@@ -148,4 +141,4 @@ message InstanceRole {
// For PostgreSQL, it containt super_user, no_inherit, create_role, create_db, can_login, replication and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html
// For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html
optional string attribute = 6;
-}
\ No newline at end of file
+}
diff --git a/proto/v1/instance_service.proto b/proto/v1/instance_service.proto
index 7e17fafcfe..99d2867774 100644
--- a/proto/v1/instance_service.proto
+++ b/proto/v1/instance_service.proto
@@ -7,23 +7,18 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
service InstanceService {
rpc GetInstance(GetInstanceRequest) returns (Instance) {
- option (google.api.http) = {
- get: "/v1/{name=environments/*/instances/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=environments/*/instances/*}"};
option (google.api.method_signature) = "name";
}
rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=environments/*}/instances"
- };
+ option (google.api.http) = {get: "/v1/{parent=environments/*}/instances"};
option (google.api.method_signature) = "parent";
}
@@ -44,9 +39,7 @@ service InstanceService {
}
rpc DeleteInstance(DeleteInstanceRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=environments/*/instances/*}"
- };
+ option (google.api.http) = {delete: "/v1/{name=environments/*/instances/*}"};
option (google.api.method_signature) = "name";
}
@@ -63,7 +56,7 @@ service InstanceService {
body: "*"
};
}
-
+
rpc RemoveDataSource(RemoveDataSourceRequest) returns (Instance) {
option (google.api.http) = {
post: "/v1/{instance=environments/*/instances/*}:removeDataSource"
@@ -230,4 +223,4 @@ enum DataSourceType {
DATA_SOURCE_UNSPECIFIED = 0;
ADMIN = 1;
READ_ONLY = 2;
-}
\ No newline at end of file
+}
diff --git a/proto/v1/logging_service.proto b/proto/v1/logging_service.proto
index 9d8ddea214..b70ab710fa 100644
--- a/proto/v1/logging_service.proto
+++ b/proto/v1/logging_service.proto
@@ -7,10 +7,9 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-import "google/protobuf/wrappers.proto";
-import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
-
+import "google/protobuf/timestamp.proto";
+import "google/protobuf/wrappers.proto";
import "v1/common.proto";
option go_package = "generated-go/v1";
@@ -19,9 +18,7 @@ service LoggingService {
rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) {
option (google.api.http) = {
post: "/v1/{parent=projects/*}/logs"
- additional_bindings: {
- post: "/v1/{parent=workspaces/*}/logs"
- }
+ additional_bindings: {post: "/v1/{parent=workspaces/*}/logs"}
};
option (google.api.method_signature) = "parent";
}
@@ -124,7 +121,7 @@ message LogEntry {
// ACTION_PROJECT_DATABASE_TRANSFER is the type for transferring a database to a project.
ACTION_PROJECT_DTABASE_TRANSFER = 18;
-
+
// ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE is the type for database PITR recovery done.
ACTION_PROJECT_DATABASE_RECOVERY_PITR_DONE = 19;
@@ -156,7 +153,7 @@ message LogEntry {
// For ACTION_PROJECT_*: projects/{project}
// For ACTION_SQL_EDITOR_QUERY: workspaces/{workspace} OR projects/{project}
string resource_name = 6 [(google.api.field_behavior) = REQUIRED];
-
+
// The payload of the log entry.
google.protobuf.Struct json_payload = 7;
}
diff --git a/proto/v1/org_policy_service.proto b/proto/v1/org_policy_service.proto
index 7f3c6477ff..d86cc0921d 100644
--- a/proto/v1/org_policy_service.proto
+++ b/proto/v1/org_policy_service.proto
@@ -8,7 +8,6 @@ import "google/api/field_behavior.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-
import "v1/common.proto";
import "v1/deployment.proto";
@@ -19,18 +18,10 @@ service OrgPolicyService {
option (google.api.http) = {
get: "/v1/{name=policies/*}"
- additional_bindings {
- get: "/v1/{name=projects/*/policies/*}"
- }
- additional_bindings {
- get: "/v1/{name=environments/*/policies/*}"
- }
- additional_bindings {
- get: "/v1/{name=environments/*/instances/*/policies/*}"
- }
- additional_bindings {
- get: "/v1/{name=environments/*/instances/*/databases/*/policies/*}"
- }
+ additional_bindings {get: "/v1/{name=projects/*/policies/*}"}
+ additional_bindings {get: "/v1/{name=environments/*/policies/*}"}
+ additional_bindings {get: "/v1/{name=environments/*/instances/*/policies/*}"}
+ additional_bindings {get: "/v1/{name=environments/*/instances/*/databases/*/policies/*}"}
};
option (google.api.method_signature) = "name";
}
@@ -39,18 +30,10 @@ service OrgPolicyService {
option (google.api.http) = {
get: "/v1/policies"
- additional_bindings {
- get: "/v1/{parent=projects/*}/policies"
- }
- additional_bindings {
- get: "/v1/{parent=environments/*}/policies"
- }
- additional_bindings {
- get: "/v1/{parent=environments/*/instances/*}/policies"
- }
- additional_bindings {
- get: "/v1/{parent=environments/*/instances/*/databases/*}/policies"
- }
+ additional_bindings {get: "/v1/{parent=projects/*}/policies"}
+ additional_bindings {get: "/v1/{parent=environments/*}/policies"}
+ additional_bindings {get: "/v1/{parent=environments/*/instances/*}/policies"}
+ additional_bindings {get: "/v1/{parent=environments/*/instances/*/databases/*}/policies"}
};
option (google.api.method_signature) = "";
}
@@ -109,18 +92,10 @@ service OrgPolicyService {
option (google.api.http) = {
delete: "/v1/{name=policies/*}"
- additional_bindings {
- delete: "/v1/{name=projects/*/policies/*}"
- }
- additional_bindings {
- delete: "/v1/{name=environments/*/policies/*}"
- }
- additional_bindings {
- delete: "/v1/{name=environments/*/instances/*/policies/*}"
- }
- additional_bindings {
- delete: "/v1/{name=environments/*/instances/*/databases/*/policies/*}"
- }
+ additional_bindings {delete: "/v1/{name=projects/*/policies/*}"}
+ additional_bindings {delete: "/v1/{name=environments/*/policies/*}"}
+ additional_bindings {delete: "/v1/{name=environments/*/instances/*/policies/*}"}
+ additional_bindings {delete: "/v1/{name=environments/*/instances/*/databases/*/policies/*}"}
};
option (google.api.method_signature) = "name";
}
@@ -316,4 +291,4 @@ enum SQLReviewRuleLevel {
ERROR = 1;
WARNING = 2;
DISABLED = 3;
-}
\ No newline at end of file
+}
diff --git a/proto/v1/project_service.proto b/proto/v1/project_service.proto
index 6085a030f2..0e754788a3 100644
--- a/proto/v1/project_service.proto
+++ b/proto/v1/project_service.proto
@@ -8,7 +8,6 @@ import "google/api/field_behavior.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
-
import "v1/common.proto";
import "v1/externalvs_service.proto";
@@ -16,16 +15,12 @@ option go_package = "generated-go/v1";
service ProjectService {
rpc GetProject(GetProjectRequest) returns (Project) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=projects/*}"};
option (google.api.method_signature) = "name";
}
rpc ListProjects(ListProjectsRequest) returns (ListProjectsResponse) {
- option (google.api.http) = {
- get: "/v1/projects"
- };
+ option (google.api.http) = {get: "/v1/projects"};
option (google.api.method_signature) = "";
}
@@ -46,9 +41,7 @@ service ProjectService {
}
rpc DeleteProject(DeleteProjectRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- delete: "/v1/{name=projects/*}"
- };
+ option (google.api.http) = {delete: "/v1/{name=projects/*}"};
option (google.api.method_signature) = "name";
}
@@ -59,13 +52,11 @@ service ProjectService {
};
}
- rpc GetIamPolicy(GetIamPolicyRequest) returns (IamPolicy){
- option (google.api.http) = {
- get: "/v1/{project=projects/*}:getIamPolicy"
- };
+ rpc GetIamPolicy(GetIamPolicyRequest) returns (IamPolicy) {
+ option (google.api.http) = {get: "/v1/{project=projects/*}:getIamPolicy"};
}
- rpc SetIamPolicy(SetIamPolicyRequest) returns (IamPolicy){
+ rpc SetIamPolicy(SetIamPolicyRequest) returns (IamPolicy) {
option (google.api.http) = {
post: "/v1/{project=projects/*}:setIamPolicy"
body: "*"
@@ -73,16 +64,12 @@ service ProjectService {
}
rpc GetReview(GetReviewRequest) returns (Review) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/reviews/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=projects/*/reviews/*}"};
option (google.api.method_signature) = "name";
}
rpc ListReviews(ListReviewsRequest) returns (ListReviewsResponse) {
- option (google.api.http) = {
- get: "/v1/{parent=projects/*}/reviews"
- };
+ option (google.api.http) = {get: "/v1/{parent=projects/*}/reviews"};
option (google.api.method_signature) = "parent";
}
@@ -102,9 +89,7 @@ service ProjectService {
}
rpc GetDeploymentConfig(GetDeploymentConfigRequest) returns (DeploymentConfig) {
- option (google.api.http) = {
- get: "/v1/{name=projects/*/deploymentConfig}"
- };
+ option (google.api.http) = {get: "/v1/{name=projects/*/deploymentConfig}"};
}
rpc UpdateDeploymentConfig(UpdateDeploymentConfigRequest) returns (DeploymentConfig) {
@@ -150,9 +135,7 @@ service ProjectService {
}
rpc GetProjectGitOpsInfo(SetProjectGitOpsInfoRequest) returns (ProjectGitOpsInfo) {
- option (google.api.http) = {
- get: "/v1/{project=projects/*}/gitOpsInfo"
- };
+ option (google.api.http) = {get: "/v1/{project=projects/*}/gitOpsInfo"};
}
}
@@ -227,7 +210,7 @@ message UndeleteProjectRequest {
message GetIamPolicyRequest {
// The name of the project to get the IAM policy.
// Format: projects/{project}
- string project = 1 [(google.api.field_behavior) = REQUIRED];
+ string project = 1 [(google.api.field_behavior) = REQUIRED];
}
message SetIamPolicyRequest {
@@ -238,14 +221,14 @@ message SetIamPolicyRequest {
IamPolicy policy = 2 [(google.api.field_behavior) = REQUIRED];
}
-message GetDeploymentConfigRequest{
+message GetDeploymentConfigRequest {
// The name of the resource.
// Format: projects/{project}/deploymentConfig
string name = 1 [(google.api.field_behavior) = REQUIRED];
}
message UpdateDeploymentConfigRequest {
- DeploymentConfig config = 1 [(google.api.field_behavior) = REQUIRED];
+ DeploymentConfig config = 1 [(google.api.field_behavior) = REQUIRED];
}
message SetProjectGitOpsInfoRequest {
@@ -345,7 +328,6 @@ enum SchemaChange {
SDL = 2;
}
-
enum LgtmCheck {
LGTM_CHECK_UNSPECIFIED = 0;
LGTM_CHECK_DISABLED = 1;
@@ -414,8 +396,7 @@ message BatchUpdateReviewsRequest {
// The request message specifying the resources to update.
// A maximum of 1000 databases can be modified in a batch.
- repeated UpdateReviewRequest requests = 2
- [(google.api.field_behavior) = REQUIRED];
+ repeated UpdateReviewRequest requests = 2 [(google.api.field_behavior) = REQUIRED];
}
message BatchUpdateReviewsResponse {
@@ -449,7 +430,7 @@ message RemoveWebhookRequest {
// The name of the project to remove the webhook from.
// Format: projects/{project}
string project = 1 [(google.api.field_behavior) = REQUIRED];
-
+
// The webhook to remove. Identified by its url.
Webhook webhook = 2 [(google.api.field_behavior) = REQUIRED];
}
@@ -552,7 +533,7 @@ message DeploymentConfig {
}
message Schedule {
- repeated ScheduleDeployment deployments = 1;
+ repeated ScheduleDeployment deployments = 1;
}
message ScheduleDeployment {
@@ -569,7 +550,7 @@ message LabelSelector {
repeated LabelSelectorRequirement match_expressions = 1;
}
-message LabelSelectorRequirement{
+message LabelSelectorRequirement {
string key = 1;
OperatorType operator = 2;
repeated string values = 3;
@@ -584,7 +565,6 @@ enum OperatorType {
OPERATOR_TYPE_EXISTS = 2;
}
-
// TODO(zp): move to activity later.
message Activity {
enum Type {
@@ -642,4 +622,4 @@ message Activity {
// TYPE_DATABASE_RECOVERY_PITR_DONE represents the database recovery to a point in time is done.
TYPE_DATABASE_RECOVERY_PITR_DONE = 20;
}
-}
\ No newline at end of file
+}
diff --git a/proto/v1/setting_service.proto b/proto/v1/setting_service.proto
index 3425045c79..29518f1173 100644
--- a/proto/v1/setting_service.proto
+++ b/proto/v1/setting_service.proto
@@ -8,11 +8,9 @@ import "google/api/field_behavior.proto";
option go_package = "generated-go/v1";
-service SettingService{
+service SettingService {
rpc GetSetting(GetSettingRequest) returns (Setting) {
- option (google.api.http) = {
- get: "/v1/{name=settings/*}"
- };
+ option (google.api.http) = {get: "/v1/{name=settings/*}"};
option (google.api.method_signature) = "name";
}
@@ -41,7 +39,6 @@ message SetSettingRequest {
Setting setting = 1 [(google.api.field_behavior) = REQUIRED];
}
-
// The schema of setting.
message Setting {
// The resource name of the setting. Must be one of the following forms:
@@ -61,4 +58,4 @@ message Value {
// Defines this value as being a string value.
string string_value = 1;
}
-}
\ No newline at end of file
+}
diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.proto
index 8534f521ac..578ce64c01 100644
--- a/proto/v1/sql_service.proto
+++ b/proto/v1/sql_service.proto
@@ -3,7 +3,6 @@ syntax = "proto3";
package bytebase.v1;
import "google/api/annotations.proto";
-
import "v1/common.proto";
option go_package = "generated-go/v1";
@@ -23,7 +22,7 @@ message PrettyRequest {
// The SDL format SQL schema information that was dumped from a database engine.
// This information will be sorted to match the order of statements in the userSchema.
string current_schema = 2;
-
+
// The expected SDL schema. This schema will be checked for correctness and normalized.
string expected_schema = 3;
}
@@ -34,4 +33,4 @@ message PrettyResponse {
// The expected SDL schema after normalizing.
string expected_schema = 2;
-}
\ No newline at end of file
+}