Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: support Google Cloud SQL with IAM for MySQL (#11697)
ecmadao2b0e934d985a
diff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.goindex ed04cb4a60..27757a81c6 100644--- a/backend/api/v1/instance_service.go+++ b/backend/api/v1/instance_service.go@@ -853,6 +853,10 @@ func (s *InstanceService) UpdateDataSource(ctx context.Context, request *v1pb.UpdataSource.ExternalSecret = externalSecretpatch.ExternalSecret = externalSecretpatch.RemoveExternalSecret = externalSecret == nil+ case "authentication_type":+ authType := convertToAuthenticationType(request.DataSource.AuthenticationType)+ dataSource.AuthenticationType = authType+ patch.AuthenticationType = &authTypedefault:return nil, status.Errorf(codes.InvalidArgument, `unsupport update_mask "%s"`, path)}@@ -1128,6 +1132,14 @@ func convertToV1DataSources(dataSources []*store.DataSourceMessage) ([]*v1pb.DatdataSourceType = v1pb.DataSourceType_READ_ONLY}+ authenticationType := v1pb.DataSource_AUTHENTICATION_UNSPECIFIED+ switch ds.AuthenticationType {+ case storepb.DataSourceOptions_AUTHENTICATION_UNSPECIFIED, storepb.DataSourceOptions_PASSWORD:+ authenticationType = v1pb.DataSource_PASSWORD+ case storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM:+ authenticationType = v1pb.DataSource_GOOGLE_CLOUD_SQL_IAM+ }+dataSourceList = append(dataSourceList, &v1pb.DataSource{Id: ds.ID,Type: dataSourceType,@@ -1141,6 +1153,7 @@ func convertToV1DataSources(dataSources []*store.DataSourceMessage) ([]*v1pb.DatSid: ds.SID,ServiceName: ds.ServiceName,ExternalSecret: externalSecret,+ AuthenticationType: authenticationType,})}@@ -1190,6 +1203,17 @@ func convertToStoreDataSourceExternalSecret(externalSecret *v1pb.DataSourceExterreturn secret, nil}+func convertToAuthenticationType(authType v1pb.DataSource_AuthenticationType) storepb.DataSourceOptions_AuthenticationType {+ authenticationType := storepb.DataSourceOptions_AUTHENTICATION_UNSPECIFIED+ switch authType {+ case v1pb.DataSource_AUTHENTICATION_UNSPECIFIED, v1pb.DataSource_PASSWORD:+ authenticationType = storepb.DataSourceOptions_PASSWORD+ case v1pb.DataSource_GOOGLE_CLOUD_SQL_IAM:+ authenticationType = storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM+ }+ return authenticationType+}+func (s *InstanceService) convertToDataSourceMessage(dataSource *v1pb.DataSource) (*store.DataSourceMessage, error) {dsType, err := convertDataSourceTp(dataSource.Type)if err != nil {@@ -1222,6 +1246,7 @@ func (s *InstanceService) convertToDataSourceMessage(dataSource *v1pb.DataSourceSSHObfuscatedPrivateKey: common.Obfuscate(dataSource.SshPrivateKey, s.secret),AuthenticationPrivateKeyObfuscated: common.Obfuscate(dataSource.AuthenticationPrivateKey, s.secret),ExternalSecret: externalSecret,+ AuthenticationType: convertToAuthenticationType(dataSource.AuthenticationType),}, nil}diff --git a/backend/component/dbfactory/dbfactory.go b/backend/component/dbfactory/dbfactory.goindex 50fd2dd260..48f4c2a9cc 100644--- a/backend/component/dbfactory/dbfactory.go+++ b/backend/component/dbfactory/dbfactory.go@@ -214,6 +214,7 @@ func (d *DBFactory) GetDataSourceDriver(ctx context.Context, instance *store.InsSchemaTenantMode: schemaTenantMode,ConnectionContext: connectionContext,AuthenticationPrivateKey: authenticationPrivateKey,+ AuthenticationType: dataSource.AuthenticationType,},)if err != nil {diff --git a/backend/plugin/db/driver.go b/backend/plugin/db/driver.goindex 44f0efd6a2..be7a78016f 100644--- a/backend/plugin/db/driver.go+++ b/backend/plugin/db/driver.go@@ -182,6 +182,9 @@ type ConnectionConfig struct {AuthenticationPrivateKey stringConnectionContext ConnectionContext++ // AuthenticationType is for the database connection, we support normal username & password or Google IAM.+ AuthenticationType storepb.DataSourceOptions_AuthenticationType}// SSHConfig is the configuration for connection over SSH.diff --git a/backend/plugin/db/mysql/mysql.go b/backend/plugin/db/mysql/mysql.goindex 56d70cff14..2698b9e06b 100644--- a/backend/plugin/db/mysql/mysql.go+++ b/backend/plugin/db/mysql/mysql.go@@ -11,6 +11,7 @@ import ("strings""time"+ "cloud.google.com/go/cloudsqlconn""github.com/blang/semver/v4""github.com/go-sql-driver/mysql""github.com/pkg/errors"@@ -59,7 +60,40 @@ func newDriver(dc db.DriverConfig) db.Driver {}// Open opens a MySQL driver.-func (driver *Driver) Open(_ context.Context, dbType storepb.Engine, connCfg db.ConnectionConfig) (db.Driver, error) {+func (driver *Driver) Open(ctx context.Context, dbType storepb.Engine, connCfg db.ConnectionConfig) (db.Driver, error) {+ var dsn string+ if connCfg.AuthenticationType == storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM {+ connStr, err := getCloudSQLConnection(ctx, connCfg)+ if err != nil {+ return nil, err+ }+ dsn = connStr+ } else {+ connStr, err := driver.getMySQLConnection(connCfg)+ if err != nil {+ return nil, err+ }+ dsn = connStr+ }++ db, err := sql.Open("mysql", dsn)+ if err != nil {+ return nil, err+ }+ driver.dbType = dbType+ driver.db = db+ // TODO(d): remove the work-around once we have clean-up the migration connection hack.+ db.SetConnMaxLifetime(2 * time.Hour)+ db.SetMaxOpenConns(50)+ db.SetMaxIdleConns(15)+ driver.connectionCtx = connCfg.ConnectionContext+ driver.connCfg = connCfg+ driver.databaseName = connCfg.Database++ return driver, nil+}++func (driver *Driver) getMySQLConnection(connCfg db.ConnectionConfig) (string, error) {protocol := "tcp"if strings.HasPrefix(connCfg.Host, "/") {protocol = "unix"@@ -69,7 +103,7 @@ func (driver *Driver) Open(_ context.Context, dbType storepb.Engine, connCfg db.if connCfg.SSHConfig.Host != "" {sshClient, err := util.GetSSHClient(connCfg.SSHConfig)if err != nil {- return nil, err+ return "", err}driver.sshClient = sshClient// Now we register the dialer with the ssh connection as a parameter.@@ -82,34 +116,33 @@ func (driver *Driver) Open(_ context.Context, dbType storepb.Engine, connCfg db.// TODO(zp): mysql and mysqlbinlog doesn't support SSL yet. We need to write certs to temp files and load them as CLI flags.tlsConfig, err := connCfg.TLSConfig.GetSslConfig()if err != nil {- return nil, errors.Wrap(err, "sql: tls config error")+ return "", errors.Wrap(err, "sql: tls config error")}tlsKey := "storepb.Engine_MYSQL.tls"if tlsConfig != nil {if err := mysql.RegisterTLSConfig(tlsKey, tlsConfig); err != nil {- return nil, errors.Wrap(err, "sql: failed to register tls config")+ return "", errors.Wrap(err, "sql: failed to register tls config")}// TLS config is only used during sql.Open, so should be safe to deregister afterwards.defer mysql.DeregisterTLSConfig(tlsKey)params = append(params, fmt.Sprintf("tls=%s", tlsKey))}- dsn := fmt.Sprintf("%s:%s@%s(%s:%s)/%s?%s", connCfg.Username, connCfg.Password, protocol, connCfg.Host, connCfg.Port, connCfg.Database, strings.Join(params, "&"))- db, err := sql.Open("mysql", dsn)+ return fmt.Sprintf("%s:%s@%s(%s:%s)/%s?%s", connCfg.Username, connCfg.Password, protocol, connCfg.Host, connCfg.Port, connCfg.Database, strings.Join(params, "&")), nil+}++func getCloudSQLConnection(ctx context.Context, connCfg db.ConnectionConfig) (string, error) {+ d, err := cloudsqlconn.NewDialer(ctx, cloudsqlconn.WithIAMAuthN())if err != nil {- return nil, err+ return "", err}- driver.dbType = dbType- driver.db = db- // TODO(d): remove the work-around once we have clean-up the migration connection hack.- db.SetConnMaxLifetime(2 * time.Hour)- db.SetMaxOpenConns(50)- db.SetMaxIdleConns(15)- driver.connectionCtx = connCfg.ConnectionContext- driver.connCfg = connCfg- driver.databaseName = connCfg.Database+ mysql.RegisterDialContext("cloudsqlconn",+ func(ctx context.Context, _ string) (net.Conn, error) {+ return d.Dial(ctx, connCfg.Host)+ })- return driver, nil+ return fmt.Sprintf("%s:empty@cloudsqlconn(localhost:3306)/%s?parseTime=true",+ connCfg.Username, connCfg.Database), nil}// Close closes the driver.diff --git a/backend/store/data_source.go b/backend/store/data_source.goindex aae2fc0ba7..b3845e4d83 100644--- a/backend/store/data_source.go+++ b/backend/store/data_source.go@@ -41,7 +41,8 @@ type DataSourceMessage struct {// (deprecated) Output only.UID int// external secret- ExternalSecret *storepb.DataSourceExternalSecret+ ExternalSecret *storepb.DataSourceExternalSecret+ AuthenticationType storepb.DataSourceOptions_AuthenticationType}// Copy returns a copy of the data source message.@@ -69,6 +70,7 @@ func (m *DataSourceMessage) Copy() *DataSourceMessage {UID: m.UID,AuthenticationPrivateKeyObfuscated: m.AuthenticationPrivateKeyObfuscated,ExternalSecret: m.ExternalSecret,+ AuthenticationType: m.AuthenticationType,}}@@ -103,6 +105,7 @@ type UpdateDataSourceMessage struct {// external secretExternalSecret *storepb.DataSourceExternalSecretRemoveExternalSecret bool+ AuthenticationType *storepb.DataSourceOptions_AuthenticationType}func (*Store) listDataSourceV2(ctx context.Context, tx *Tx, instanceID string) ([]*DataSourceMessage, error) {@@ -165,6 +168,7 @@ func (*Store) listDataSourceV2(ctx context.Context, tx *Tx, instanceID string) (dataSourceMessage.SSHObfuscatedPrivateKey = dataSourceOptions.SshObfuscatedPrivateKeydataSourceMessage.AuthenticationPrivateKeyObfuscated = dataSourceOptions.AuthenticationPrivateKeyObfuscateddataSourceMessage.ExternalSecret = dataSourceOptions.ExternalSecret+ dataSourceMessage.AuthenticationType = dataSourceOptions.AuthenticationTypedataSourceMessages = append(dataSourceMessages, &dataSourceMessage)}if err := rows.Err(); err != nil {@@ -289,6 +293,9 @@ func (s *Store) UpdateDataSourceV2(ctx context.Context, patch *UpdateDataSourceMif v := patch.AuthenticationPrivateKeyObfuscated; v != nil {optionSet, args = append(optionSet, fmt.Sprintf("jsonb_build_object('authenticationPrivateKeyObfuscated', to_jsonb($%d::TEXT))", len(args)+1)), append(args, *v)}+ if v := patch.AuthenticationType; v != nil {+ optionSet, args = append(optionSet, fmt.Sprintf("jsonb_build_object('authenticationType', to_jsonb($%d::TEXT))", len(args)+1)), append(args, *v)+ }if v := patch.ExternalSecret; v != nil {protoBytes, err := protojson.Marshal(v)if err != nil {@@ -348,6 +355,7 @@ func (*Store) addDataSourceToInstanceImplV2(ctx context.Context, tx *Tx, instancSshObfuscatedPrivateKey: dataSource.SSHObfuscatedPrivateKey,AuthenticationPrivateKeyObfuscated: dataSource.AuthenticationPrivateKeyObfuscated,ExternalSecret: dataSource.ExternalSecret,+ AuthenticationType: dataSource.AuthenticationType,}protoBytes, err := protojson.Marshal(&dataSourceOptions)if err != nil {diff --git a/frontend/src/components/CreateDataSourceExample.vue b/frontend/src/components/InstanceForm/DataSourceSection/CreateDataSourceExample.vuesimilarity index 72%rename from frontend/src/components/CreateDataSourceExample.vuerename to frontend/src/components/InstanceForm/DataSourceSection/CreateDataSourceExample.vueindex cf3a9f925e..4dddc0c2c8 100644--- a/frontend/src/components/CreateDataSourceExample.vue+++ b/frontend/src/components/InstanceForm/DataSourceSection/CreateDataSourceExample.vue@@ -41,31 +41,46 @@"><i18n-t- tag="p"- keypath="instance.sentence.create-user-example.mysql.template"+ v-if="+ authenticationType ===+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM+ "+ tag="span"+ keypath="instance.sentence.google-cloud-sql.mysql.template">- <template #user>{{- $t("instance.sentence.create-user-example.mysql.user")- }}</template>- <template #password>- <span class="text-red-600">- {{ $t("instance.sentence.create-user-example.mysql.password") }}+ <template #user>+ <span class="font-semibold">+ {{ userName }}</span></template></i18n-t>- <a- href="https://www.bytebase.com/docs/tutorials/local-mysql-instance?source=console"- target="_blank"- class="normal-link"+ <i18n-t+ v-else+ tag="span"+ keypath="instance.sentence.create-user-example.mysql.template">- {{ $t("common.detailed-guide") }}- </a>+ <template #user>+ <span class="font-semibold">+ {{ userName }}+ </span>+ </template>+ <template #password>+ <span class="text-red-600"> YOUR_DB_PWD </span>+ </template>+ </i18n-t>+ <LearnMoreLink+ url="https://www.bytebase.com/docs/tutorials/local-mysql-instance?source=console"+ class="ml-1 text-sm"+ /></template><template v-else-if="props.engine === Engine.CLICKHOUSE"><i18n-ttag="p"keypath="instance.sentence.create-user-example.clickhouse.template">+ <template #user>+ <span class="font-semibold">{{ userName }}</span>+ </template><template #password><span class="text-red-600">YOUR_DB_PWD</span></template>@@ -92,6 +107,9 @@tag="p"keypath="instance.sentence.create-user-example.postgresql.template">+ <template #user>+ <span class="font-semibold">{{ userName }}</span>+ </template><template #password><span class="text-red-600">YOUR_DB_PWD</span></template>@@ -102,6 +120,9 @@tag="p"keypath="instance.sentence.create-user-example.snowflake.template">+ <template #user>+ <span class="font-semibold">{{ userName }}</span>+ </template><template #password><span class="text-red-600">YOUR_DB_PWD</span></template>@@ -115,13 +136,11 @@tag="p"keypath="instance.sentence.create-user-example.redis.template">- <template #user>{{- $t("instance.sentence.create-user-example.redis.user")- }}</template>+ <template #user>+ <span class="font-semibold">{{ userName }}</span>+ </template><template #password>- <span class="text-red-600">- {{ $t("instance.sentence.create-user-example.redis.password") }}- </span>+ <span class="text-red-600"> YOUR_DB_PWD </span></template></i18n-t><!-- TODO(xz): add a "detailed guide" link to docs here -->@@ -157,19 +176,26 @@ import { useI18n } from "vue-i18n";import { pushNotification } from "@/store";import { languageOfEngineV1 } from "@/types";import { Engine } from "@/types/proto/v1/common";-import { DataSourceType } from "@/types/proto/v1/instance_service";+import {+ DataSourceType,+ DataSource_AuthenticationType,+} from "@/types/proto/v1/instance_service";import { engineNameV1, toClipboard } from "@/utils";interface LocalState {showCreateUserExample: boolean;}+const ADMIN_USER_NAME = "bytebase";+const READONLY_USER_NAME = `${ADMIN_USER_NAME}-readonly`;+const props = withDefaults(defineProps<{className?: string;createInstanceFlag: boolean;engine: Engine;dataSourceType: DataSourceType;+ authenticationType: DataSource_AuthenticationType;}>(),{className: "",@@ -189,30 +215,45 @@ const isEngineUsingSQL = computed(() => {return languageOfEngineV1(props.engine) === "sql";});+const userName = computed(() => {+ return props.dataSourceType === DataSourceType.ADMIN+ ? ADMIN_USER_NAME+ : READONLY_USER_NAME;+});+const grantStatement = computed(() => {if (props.dataSourceType === DataSourceType.ADMIN) {+ const createUserStatement = `CREATE USER ${ADMIN_USER_NAME}@'%' IDENTIFIED BY 'YOUR_DB_PWD';`;switch (props.engine) {case Engine.MYSQL:+ if (+ props.authenticationType ===+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM+ ) {+ return `GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \n/*!80000 , SET_USER_ID */\nON *.* to ${ADMIN_USER_NAME}@'%';`;+ }// RELOAD, LOCK TABLES: enables use of explicit LOCK TABLES statements for backups.// REPLICATION CLIENT: enables use of the SHOW MASTER STATUS, SHOW SLAVE STATUS, and SHOW BINARY LOGS statements.// REPLICATION SLAVE: use of the SHOW SLAVE HOSTS, SHOW RELAYLOG EVENTS, and SHOW BINLOG EVENTS statements. This privilege is also required to use the mysqlbinlog options --read-from-remote-server (-R) and --read-from-remote-master.- return "CREATE USER bytebase@'%' IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \n/*!80000 , SET_USER_ID */\nON *.* to bytebase@'%';";+ // REPLICATION_APPLIER: execute the internal-use BINLOG statements used by mysqlbinlog.+ // SESSION_VARIABLES_ADMIN: use of the SET sql_log_bin statements during PITR.+ return `${createUserStatement}\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \n/*!80000 , REPLICATION_APPLIER, SYSTEM_VARIABLES_ADMIN, SET_USER_ID */\nON *.* to ${ADMIN_USER_NAME}@'%';`;case Engine.TIDB:- return "CREATE USER bytebase@'%' IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nLOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \nON *.* to bytebase@'%';";+ return `${createUserStatement}\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nLOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \nON *.* to ${ADMIN_USER_NAME}@'%';`;case Engine.MARIADB:- return "CREATE USER bytebase@'%' IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \nON *.* to bytebase@'%';";+ return `${createUserStatement}\n\nGRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE VIEW, \nDELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, PROCESS, REFERENCES, \nSELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, UPDATE, USAGE, \nRELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE \nON *.* to ${ADMIN_USER_NAME}@'%';`;case Engine.OCEANBASE:- return "CREATE USER bytebase@'%' IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, \nPROCESS, SELECT, SHOW DATABASES, SHOW VIEW, UPDATE, USAGE, \nREPLICATION CLIENT, REPLICATION SLAVE \nON *.* to bytebase@'%';";+ return `${createUserStatement}\n\nGRANT ALTER, CREATE, CREATE VIEW, DELETE, DROP, INDEX, INSERT, \nPROCESS, SELECT, SHOW DATABASES, SHOW VIEW, UPDATE, USAGE, \nREPLICATION CLIENT, REPLICATION SLAVE \nON *.* to ${ADMIN_USER_NAME}@'%';`;case Engine.CLICKHOUSE:- return "CREATE USER bytebase IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT ALL ON *.* TO bytebase WITH GRANT OPTION;";+ return `CREATE USER ${ADMIN_USER_NAME} IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT ALL ON *.* TO ${ADMIN_USER_NAME} WITH GRANT OPTION;`;case Engine.SNOWFLAKE:return `-- Option 1: grant ACCOUNTADMIN role-CREATE OR REPLACE USER bytebase PASSWORD = 'YOUR_DB_PWD'+CREATE OR REPLACE USER ${ADMIN_USER_NAME} PASSWORD = 'YOUR_DB_PWD'DEFAULT_ROLE = "ACCOUNTADMIN"DEFAULT_WAREHOUSE = 'YOUR_COMPUTE_WAREHOUSE';-GRANT ROLE "ACCOUNTADMIN" TO USER bytebase;+GRANT ROLE "ACCOUNTADMIN" TO USER ${ADMIN_USER_NAME};-- Option 2: grant more granular privileges@@ -301,13 +342,13 @@ GRANT ALL PRIVILEGES ON PIPE {{PIPE_NAME}} IN DATABASE {{YOUR_DB_NAME}} TO ROLE`;case Engine.RISINGWAVE:case Engine.POSTGRES:- return "CREATE USER bytebase WITH ENCRYPTED PASSWORD 'YOUR_DB_PWD';\n\nALTER USER bytebase WITH SUPERUSER;";+ return `CREATE USER ${ADMIN_USER_NAME} WITH ENCRYPTED PASSWORD 'YOUR_DB_PWD';\n\nALTER USER ${ADMIN_USER_NAME} WITH SUPERUSER;`;case Engine.REDSHIFT:- return "CREATE USER bytebase WITH PASSWORD 'YOUR_DB_PWD' CREATEUSER CREATEDB;";+ return `CREATE USER ${ADMIN_USER_NAME} WITH PASSWORD 'YOUR_DB_PWD' CREATEUSER CREATEDB;`;case Engine.MONGODB:return `use admin;db.createUser({- user: "bytebase",+ user: "${ADMIN_USER_NAME}",pwd: "YOUR_DB_PWD",roles: [{role: "readWriteAnyDatabase", db: "admin"},@@ -319,32 +360,45 @@ db.createUser({case Engine.SPANNER:return "";case Engine.REDIS:- return "ACL SETUSER bytebase on >YOUR_DB_PWD +@all &*";+ return `ACL SETUSER ${ADMIN_USER_NAME} on >YOUR_DB_PWD +@all &*`;case Engine.MSSQL:- return "-- If you use Cloud RDS, you need to checkout their documentation for setting up a semi-super privileged user.\n\nCREATE LOGIN bytebase WITH PASSWORD = 'YOUR_DB_PWD';\nALTER SERVER ROLE sysadmin ADD MEMBER bytebase;";+ return `-- If you use Cloud RDS, you need to checkout their documentation for setting up a semi-super privileged user.+CREATE LOGIN ${ADMIN_USER_NAME} WITH PASSWORD = 'YOUR_DB_PWD';+ALTER SERVER ROLE sysadmin ADD MEMBER ${ADMIN_USER_NAME};`;case Engine.ORACLE:- return "-- If you use Cloud RDS, you need to checkout their documentation for setting up a semi-super privileged user.\n\nCREATE USER bytebase IDENTIFIED BY 'YOUR_DB_PWD';\nGRANT ALL PRIVILEGES TO bytebase;";+ return `-- If you use Cloud RDS, you need to checkout their documentation for setting up a semi-super privileged user.+CREATE USER ${ADMIN_USER_NAME} IDENTIFIED BY 'YOUR_DB_PWD';+GRANT ALL PRIVILEGES TO ${ADMIN_USER_NAME};`;case Engine.DM:- return 'CREATE USER BYTEBASE IDENTIFIED BY "YOUR_DB_PWD";\nGRANT "DBA" TO BYTEBASE;';+ return `CREATE USER ${ADMIN_USER_NAME.toUpperCase()} IDENTIFIED BY "YOUR_DB_PWD";\nGRANT "DBA" TO ${ADMIN_USER_NAME.toUpperCase()};`;case Engine.OCEANBASE_ORACLE:- return "CREATE USER bytebase IDENTIFIED BY 'YOUR_DB_PWD';\nGRANT ALL PRIVILEGES TO bytebase;";+ return `CREATE USER ${ADMIN_USER_NAME} IDENTIFIED BY 'YOUR_DB_PWD';+GRANT ALL PRIVILEGES TO ${ADMIN_USER_NAME};`;}} else {+ const mysqlReadonlyStatement = `CREATE USER ${READONLY_USER_NAME}@'%' IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT SELECT, SHOW DATABASES, SHOW VIEW, USAGE ON *.* to ${READONLY_USER_NAME}@'%';`;switch (props.engine) {case Engine.MYSQL:+ if (+ props.authenticationType ===+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM+ ) {+ return `GRANT SELECT, SHOW DATABASES, SHOW VIEW, USAGE ON *.* to ${READONLY_USER_NAME}@'%';`;+ }+ return mysqlReadonlyStatement;case Engine.TIDB:case Engine.OCEANBASE:- return "CREATE USER bytebase@'%' IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT SELECT, SHOW DATABASES, SHOW VIEW, USAGE ON *.* to bytebase@'%';";+ return mysqlReadonlyStatement;case Engine.CLICKHOUSE:- return "CREATE USER bytebase IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT SHOW TABLES, SELECT ON database.* TO bytebase;";+ return `CREATE USER ${READONLY_USER_NAME} IDENTIFIED BY 'YOUR_DB_PWD';\n\nGRANT SHOW TABLES, SELECT ON database.* TO ${READONLY_USER_NAME};`;case Engine.SNOWFLAKE:return `-- Option 1: grant ACCOUNTADMIN role-CREATE OR REPLACE USER bytebase PASSWORD = 'YOUR_DB_PWD'+CREATE OR REPLACE USER ${READONLY_USER_NAME} PASSWORD = 'YOUR_DB_PWD'DEFAULT_ROLE = "ACCOUNTADMIN"DEFAULT_WAREHOUSE = 'YOUR_COMPUTE_WAREHOUSE';-GRANT ROLE "ACCOUNTADMIN" TO USER bytebase;+GRANT ROLE "ACCOUNTADMIN" TO USER ${READONLY_USER_NAME};-- Option 2: grant more granular privileges@@ -433,13 +487,24 @@ GRANT ALL PRIVILEGES ON PIPE {{PIPE_NAME}} IN DATABASE {{YOUR_DB_NAME}} TO ROLE`;case Engine.RISINGWAVE:case Engine.POSTGRES:- return "CREATE USER bytebase WITH ENCRYPTED PASSWORD 'YOUR_DB_PWD';\n\nALTER USER bytebase WITH SUPERUSER;";+ return `CREATE USER ${READONLY_USER_NAME} WITH ENCRYPTED PASSWORD 'YOUR_DB_PWD';+ALTER USER ${READONLY_USER_NAME} WITH SUPERUSER;`;case Engine.MONGODB:- return 'use admin;\ndb.createUser({\n\tuser: "bytebase", \n\tpwd: "YOUR_DB_PWD", \n\troles: [\n\t\t{role: "readAnyDatabase", db: "admin"},\n\t\t{role: "dbAdminAnyDatabase", db: "admin"},\n\t\t{role: "userAdminAnyDatabase", db: "admin"}\n\t]\n});';+ return `use admin;+db.createUser({+ user: "${READONLY_USER_NAME}",+ pwd: "YOUR_DB_PWD",+ roles: [+ {role: "readAnyDatabase", db: "admin"},+ {role: "dbAdminAnyDatabase", db: "admin"},+ {role: "userAdminAnyDatabase", db: "admin"}+ ]+});+ `;case Engine.SPANNER:return "";case Engine.REDIS:- return "ACL SETUSER bytebase on >YOUR_DB_PWD +@read &*";+ return `ACL SETUSER ${READONLY_USER_NAME} on >YOUR_DB_PWD +@read &*`;}}return ""; // fallbackdiff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vueindex 157463d146..b777711142 100644--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue@@ -1,11 +1,25 @@<template><!-- eslint-disable vue/no-mutating-props --><template v-if="basicInfo.engine !== Engine.SPANNER">+ <div v-if="basicInfo.engine === Engine.MYSQL" class="mt-2">+ <NRadioGroup+ v-model:value="dataSource.authenticationType"+ class="textlabel"+ >+ <NRadio :value="DataSource_AuthenticationType.PASSWORD">+ {{ $t("instance.password-type.password") }}+ </NRadio>+ <NRadio :value="DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM">+ {{ $t("instance.password-type.google-iam") }}+ </NRadio>+ </NRadioGroup>+ </div><CreateDataSourceExampleclass-name="sm:col-span-3 border-none mt-2":create-instance-flag="isCreating":engine="basicInfo.engine":data-source-type="dataSource.type"+ :authentication-type="dataSource.authenticationType"/><div class="mt-4 sm:col-span-3 sm:col-start-1"><label for="username" class="textlabel block">@@ -23,7 +37,12 @@"/></div>- <div class="mt-4 sm:col-span-3 sm:col-start-1">+ <div+ v-if="+ dataSource.authenticationType === DataSource_AuthenticationType.PASSWORD+ "+ class="mt-4 sm:col-span-3 sm:col-start-1"+ ><div class="mb-4"><NRadioGroupclass="textlabel"@@ -405,6 +424,8 @@ MIIEvQ...<templatev-if="dataSource.type === DataSourceType.READ_ONLY &&+ dataSource.authenticationType ===+ DataSource_AuthenticationType.PASSWORD &&(hasReadonlyReplicaHost || hasReadonlyReplicaPort)">@@ -456,7 +477,13 @@ MIIEvQ.../></div>- <div v-if="showSSL" class="mt-4 sm:col-span-3 sm:col-start-1">+ <div+ v-if="+ showSSL &&+ dataSource.authenticationType === DataSource_AuthenticationType.PASSWORD+ "+ class="mt-4 sm:col-span-3 sm:col-start-1"+ ><div class="flex flex-row items-center"><label for="ssl" class="textlabel block">{{ $t("data-source.ssl-connection") }}@@ -489,7 +516,13 @@ MIIEvQ...</template></div>- <div v-if="showSSH" class="mt-4 sm:col-span-3 sm:col-start-1">+ <div+ v-if="+ showSSH &&+ dataSource.authenticationType === DataSource_AuthenticationType.PASSWORD+ "+ class="mt-4 sm:col-span-3 sm:col-start-1"+ ><div class="flex flex-row items-center gap-x-1"><label for="ssh" class="textlabel block">{{ $t("data-source.ssh-connection") }}@@ -541,6 +574,7 @@ import {DataSourceExternalSecret_AuthType,DataSourceExternalSecret_SecretType,DataSourceExternalSecret_AppRoleAuthOption_SecretType,+ DataSource_AuthenticationType,} from "@/types/proto/v1/instance_service";import { onlyAllowNumber } from "@/utils";import type { EditDataSource } from "../common";diff --git a/frontend/src/components/InstanceForm/InstanceForm.vue b/frontend/src/components/InstanceForm/InstanceForm.vueindex d40f55d3c1..a000d2ad16 100644--- a/frontend/src/components/InstanceForm/InstanceForm.vue+++ b/frontend/src/components/InstanceForm/InstanceForm.vue@@ -122,6 +122,24 @@class="text-sm"/></template>+ <div+ v-else-if="+ adminDataSource.authenticationType ===+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM+ "+ >+ <span>+ {{ $t("instance.sentence.google-cloud-sql.instance-name") }}+ <span class="text-red-600 mr-2">*</span>+ </span>+ <div class="textinfolabel mb-1">+ {{+ $t(+ "instance.sentence.google-cloud-sql.instance-name-tips"+ )+ }}+ </div>+ </div><template v-else>{{ $t("instance.host-or-socket") }}<span class="text-red-600 mr-2">*</span>@@ -152,7 +170,13 @@/></div>- <template v-if="basicInfo.engine !== Engine.SPANNER">+ <template+ v-if="+ basicInfo.engine !== Engine.SPANNER &&+ adminDataSource.authenticationType ===+ DataSource_AuthenticationType.PASSWORD+ "+ ><div class="sm:col-span-1"><label for="port" class="textlabel block">{{ $t("instance.port") }}@@ -385,6 +409,7 @@ import {InstanceOptions,DataSourceExternalSecret_SecretType,DataSourceExternalSecret_AuthType,+ DataSource_AuthenticationType,} from "@/types/proto/v1/instance_service";import { PlanType } from "@/types/proto/v1/subscription_service";import {@@ -1156,6 +1181,14 @@ const checkExternalSecretFeature = (instance: Instance) => {const checkDataSource = (dataSources: DataSource[]) => {return dataSources.every((ds) => {+ if (+ ds.authenticationType ===+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM+ ) {+ // CloudSQL instance name shoule be {project}:{region}:{cloud sql name}+ return /.+:.+:.+/.test(ds.host);+ }+if (!ds.externalSecret) {return true;}diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 8a0c5f8bf0..a9f3a441cc 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -1315,28 +1315,29 @@"create-readonly-user": "This is the connection used by Bytebase to perform read-only operations such as SELECT query.","create-admin-user-non-sql": "This is the connection user used by Bytebase to perform write and admin operations.","create-readonly-user-non-sql": "This is the connection used by Bytebase to perform read-only operations.",+ "google-cloud-sql": {+ "instance-name": "Instance Connection Name",+ "instance-name-tips": "The instance connection name should like project-id:region:instance-name.",+ "mysql": {+ "template": "Create a service account named {user}, then add it in your Google Cloud SQL as IAM user {user}{'@'}'%'. Grant this user with the needed privileges."+ }+ },"create-user-example": {"snowflake": {- "user": "bytebase{'@'}%",- "password": "YOUR_DB_PWD",- "template": "Below is an example to create user 'bytebase' with password {password} for {warehouse} and grant the user with the needed privileges."+ "template": "Below is an example to create user '{user}' with password {password} for {warehouse} and grant the user with the needed privileges."},"mysql": {- "password": "YOUR_DB_PWD",- "user": "bytebase{'@'}%",- "template": "Below is an example to create user {user} with password {password} and grant the user with the needed privileges."+ "template": "Below is an example to create user {user}{'@'}% with password {password} and grant the user with the needed privileges."},"clickhouse": {- "template": "Below is an example to create user 'bytebase' with password {password} and grant the user with the needed privileges. First you need to enable ClickHouse SQL-driven workflow {link} and then run the following query to create the user.",+ "template": "Below is an example to create user '{user}' with password {password} and grant the user with the needed privileges. First you need to enable ClickHouse SQL-driven workflow {link} and then run the following query to create the user.","sql-driven-workflow": "SQL-driven workflow"},"postgresql": {"warn": "If the connecting instance is managed by the cloud provider, then SUPERUSER is not available and you should create the user via that provider's admin console. The created user will have provider specific semi-SUPERUSER privileges. You should grant Bytebase privileges with 'GRANT role_name TO bytebase;' for all existing roles, otherwise Bytebase may not access existing databases or tables.",- "template": "Below is an example to create user 'bytebase' with password {password} and grant the user with the needed privileges. If the connecting instance is self-hosted, then you can grant SUPERUSER."+ "template": "Below is an example to create user '{user}' with password {password} and grant the user with the needed privileges. If the connecting instance is self-hosted, then you can grant SUPERUSER."},"redis": {- "password": "YOUR_DB_PWD",- "user": "bytebase","template": "Below is an example to create user {user} with password {password} and grant the user with the needed privileges."}}@@ -1348,6 +1349,7 @@"password-type": {"password": "Password","password-tip": "You can also specify external secret manage endpoint",+ "google-iam": "Google CloudSQL IAM","external-secret-vault": "Vault (KV v2)","external-secret-aws": "AWS Secrets Manager","external-secret-gcp": "GCP Secret Manager"diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 580485d4d4..ca82442b5c 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1315,28 +1315,29 @@"create-readonly-user": "Esta es la conexión utilizada por Bytebase para realizar operaciones de solo lectura como la consulta SELECT.","create-admin-user-non-sql": "Este es el usuario de conexión utilizado por Bytebase para realizar operaciones de escritura y administración.","create-readonly-user-non-sql": "Esta es la conexión utilizada por Bytebase para realizar operaciones de solo lectura.",+ "google-cloud-sql": {+ "instance-name": "Nombre de conexión de instancia",+ "instance-name-tips": "El nombre de la conexión de la instancia debería ser project-id:region:instance-name.",+ "mysql": {+ "template": "Cree una cuenta de servicio llamada {user} y luego agréguela en su Google Cloud SQL como usuario de IAM {user}{'@'}'%'. Otorgue a este usuario los privilegios necesarios."+ }+ },"create-user-example": {"snowflake": {- "user": "bytebase{'@'}%",- "password": "SU_CONTRASEÑA_DE_BD","template": "A continuación se muestra un ejemplo para crear el usuario 'bytebase' con la contraseña {password} para {warehouse} y otorgar al usuario los privilegios necesarios."},"mysql": {- "password": "SU_CONTRASEÑA_DE_BD",- "user": "bytebase{'@'}%",- "template": "A continuación se muestra un ejemplo para crear el usuario {password} con la contraseña {password} y otorgar al usuario los privilegios necesarios."+ "template": "A continuación se muestra un ejemplo para crear el usuario {user}{'@'}% con la contraseña {password} y otorgarle al usuario los privilegios necesarios."},"clickhouse": {- "template": "A continuación se muestra un ejemplo para crear el usuario 'bytebase' con la contraseña {password} y otorgar al usuario los privilegios necesarios. Primero debe habilitar el flujo de trabajo impulsado por SQL de ClickHouse {link} y luego ejecutar la siguiente consulta para crear el usuario.",+ "template": "A continuación se muestra un ejemplo para crear el usuario '{user}' con la contraseña {password} y otorgar al usuario los privilegios necesarios. Primero debe habilitar el flujo de trabajo impulsado por SQL de ClickHouse {link} y luego ejecutar la siguiente consulta para crear el usuario.","sql-driven-workflow": "Flujo de trabajo impulsado por SQL"},"postgresql": {"warn": "Si la instancia de conexión es administrada por el proveedor de la nube, entonces SUPERUSER no está disponible y debes crear el usuario a través de la consola de administración del proveedor. El usuario creado tendrá privilegios semi-SUPERUSER específicos del proveedor. Debes otorgar privilegios de Bytebase con 'GRANT role_name TO bytebase;' para todos los roles existentes, de lo contrario Bytebase puede no tener acceso a las bases de datos o tablas existentes.",- "template": "A continuación se muestra un ejemplo para crear el usuario 'bytebase' con la contraseña {password} y otorgar al usuario los privilegios necesarios. Si la instancia de conexión está alojada por ti mismo, puedes otorgar SUPERUSER."+ "template": "A continuación se muestra un ejemplo para crear el usuario '{user}' con la contraseña {password} y otorgar al usuario los privilegios necesarios. Si la instancia de conexión está alojada por ti mismo, puedes otorgar SUPERUSER."},"redis": {- "password": "TU_DB_PWD",- "user": "bytebase","template": "A continuación se muestra un ejemplo para crear el usuario {user} con la contraseña {password} y otorgar al usuario los privilegios necesarios."}}@@ -1348,6 +1349,7 @@"password-type": {"password": "Contraseña","password-tip": "También puede especificar un punto final de gestión de secreto externo",+ "google-iam": "Google CloudSQL IAM","external-secret-vault": "Vault (KV v2)","external-secret-aws": "AWS Secrets Manager","external-secret-gcp": "GCP Secret Manager"diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex f95b11e887..7a270e6823 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1315,29 +1315,30 @@"create-readonly-user": "Bytebaseが書き込みおよび管理操作を実行するために使用する接続ユーザーです。","create-admin-user-non-sql": "Bytebaseが読み取り専用操作を実行するために使用する接続です。","create-readonly-user-non-sql": "bytebase{'@'}%",+ "google-cloud-sql": {+ "instance-name": "インスタンス接続名",+ "instance-name-tips": "インスタンス接続名は、project-id:region:instance-name のようになります。",+ "mysql": {+ "template": "{user} という名前のサービス アカウントを作成し、それを IAM ユーザー {user}{'@'}'%' として Google Cloud SQL に追加します。このユーザーに必要な権限を付与します。"+ }+ },"create-user-example": {"snowflake": {- "user": "YOUR_DB_PWD",- "password": "以下は、ユーザー 'bytebase' をパスワード {password} で {warehouse} に作成し、必要な権限を付与する例です。",- "template": "YOUR_DB_PWD"+ "template": "以下は、ユーザー '{user}' をパスワード {password} で {warehouse} に作成し、必要な権限を付与する例です。"},"mysql": {- "password": "bytebase{'@'}%",- "user": "以下は、ユーザー {user} をパスワード {password} で作成し、必要な権限を付与する例です。",- "template": "以下は、ユーザー 'bytebase' をパスワード {password} で作成し、必要な権限を付与する例です。まず、ClickHouseのSQL駆動型ワークフロー {link} を有効にする必要があります。その後、次のクエリを実行してユーザーを作成してください。"+ "template": "以下は、ユーザー {user} をパスワード {password} で作成し、必要な権限を付与する例です。"},"clickhouse": {- "template": "SQL駆動型ワークフロー",- "sql-driven-workflow": "接続インスタンスがクラウドプロバイダーによって管理されている場合、SUPERUSERは使用できず、そのプロバイダーの管理コンソールを介してユーザーを作成する必要があります。作成されたユーザーは、プロバイダー固有の半-SUPERUSER権限を持ちます。既存のすべてのロールに対して 'GRANT role_name TO bytebase;' を使用してBytebaseに権限を付与する必要があります。そうしないと、Bytebaseは既存のデータベースやテーブルにアクセスできない場合があります。"+ "template": "以下は、パスワード {password} を持つユーザー '{user}' を作成し、必要な権限をユーザーに付与する例です。まず、ClickHouse SQL 駆動型ワークフロー {link} を有効にし、次のクエリを実行してユーザーを作成する必要があります。",+ "sql-driven-workflow": "SQL駆動型ワークフロー"},"postgresql": {- "warn": "以下は、ユーザー 'bytebase' をパスワード {password} で作成し、必要な権限を付与する例です。接続先が自己ホストされている場合は、SUPERUSER を付与することができます。",- "template": "YOUR_DB_PWD"+ "warn": "接続インスタンスがクラウド プロバイダーによって管理されている場合、SUPERUSER は利用できないため、そのプロバイダーの管理コンソールからユーザーを作成する必要があります。作成されたユーザーには、プロバイダー固有の準 SUPERUSER 権限が付与されます。既存のすべてのロールに対して、「GRANT role_name TO bytebase;」を使用して Bytebase 権限を付与する必要があります。そうしないと、Bytebase が既存のデータベースまたはテーブルにアクセスできない可能性があります。",+ "template": "以下は、パスワード {password} を使用してユーザー '{user}' を作成し、必要な権限をユーザーに付与する例です。接続インスタンスがセルフホストされている場合は、SUPERUSER を付与できます。"},"redis": {- "password": "bytebase",- "user": "以下は、ユーザー {user} をパスワード {password} で作成し、必要な権限を付与する例です。",- "template": "パスワードなし"+ "template": "以下は、パスワード {password} を持つユーザー {user} を作成し、そのユーザーに必要な権限を付与する例です。"}}},@@ -1348,6 +1349,7 @@"password-type": {"password": "パスワード","password-tip": "外部シークレット管理エンドポイントを指定することもできます",+ "google-iam": "Google CloudSQL IAM","external-secret-vault": "Vault (KV v2)","external-secret-aws": "AWS Secrets Manager","external-secret-gcp": "GCP Secret Manager"diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 5ab46c8dc8..60b85f8a38 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1315,28 +1315,29 @@"create-readonly-user": "Đây là kết nối được Bytebase sử dụng để thực hiện các hoạt động chỉ đọc, chẳng hạn như truy vấn CHỌN.","create-admin-user-non-sql": "Đây là người dùng kết nối được Bytebase sử dụng để thực hiện các hoạt động ghi và quản trị.","create-readonly-user-non-sql": "Đây là kết nối được Bytebase sử dụng để thực hiện các hoạt động chỉ đọc.",+ "google-cloud-sql": {+ "instance-name": "Tên kết nối sơ thẩm",+ "instance-name-tips": "Tên kết nối phiên bản phải như project-id:region:instance-name.",+ "mysql": {+ "template": "Tạo một tài khoản dịch vụ có tên {user}, sau đó thêm tài khoản đó vào Google Cloud SQL của bạn với tư cách là người dùng IAM {user}{'@'}'%'. Cấp cho người dùng này những đặc quyền cần thiết."+ }+ },"create-user-example": {"snowflake": {- "user": "cơ sở byte{'@'}%",- "password": "YOUR_DB_PWD",- "template": "Dưới đây là ví dụ để tạo người dùng 'bytebase' bằng mật khẩu {password} cho {warehouse} và cấp cho người dùng các đặc quyền cần thiết."+ "template": "Dưới đây là ví dụ để tạo người dùng '{user}' bằng mật khẩu {password} cho {warehouse} và cấp cho người dùng các đặc quyền cần thiết."},"mysql": {- "password": "YOUR_DB_PWD",- "user": "cơ sở byte{'@'}%","template": "Dưới đây là ví dụ để tạo người dùng {user} bằng mật khẩu {password} và cấp cho người dùng các đặc quyền cần thiết."},"clickhouse": {- "template": "Dưới đây là ví dụ để tạo 'bytebase' người dùng bằng mật khẩu {password} và cấp cho người dùng các đặc quyền cần thiết. Trước tiên, bạn cần bật quy trình làm việc dựa trên SQL ClickHouse {link}, sau đó chạy truy vấn sau để tạo người dùng.",+ "template": "Dưới đây là ví dụ để tạo '{user}' người dùng bằng mật khẩu {password} và cấp cho người dùng các đặc quyền cần thiết. Trước tiên, bạn cần bật quy trình làm việc dựa trên SQL ClickHouse {link}, sau đó chạy truy vấn sau để tạo người dùng.","sql-driven-workflow": "Quy trình làm việc dựa trên SQL"},"postgresql": {"warn": "Nếu phiên bản kết nối được quản lý bởi nhà cung cấp đám mây thì SUPERUSER sẽ không khả dụng và bạn nên tạo người dùng thông qua bảng điều khiển dành cho quản trị viên của nhà cung cấp đó. Người dùng đã tạo sẽ có các đặc quyền bán SIÊU NGƯỜI DÙNG cụ thể của nhà cung cấp. Bạn nên cấp đặc quyền Bytebase với 'GRANT role_name TO bytebase;' đối với tất cả các vai trò hiện có, nếu không Bytebase có thể không truy cập được cơ sở dữ liệu hoặc bảng hiện có.",- "template": "Dưới đây là ví dụ để tạo 'bytebase' người dùng bằng mật khẩu {password} và cấp cho người dùng các đặc quyền cần thiết. Nếu phiên bản kết nối được tự lưu trữ thì bạn có thể cấp quyền SUPERUSER."+ "template": "Dưới đây là ví dụ để tạo '{user}' người dùng bằng mật khẩu {password} và cấp cho người dùng các đặc quyền cần thiết. Nếu phiên bản kết nối được tự lưu trữ thì bạn có thể cấp quyền SUPERUSER."},"redis": {- "password": "YOUR_DB_PWD",- "user": "cơ sở byte","template": "Dưới đây là ví dụ để tạo người dùng {user} bằng mật khẩu {password} và cấp cho người dùng các đặc quyền cần thiết."}}@@ -1348,6 +1349,7 @@"password-type": {"password": "Mật khẩu","password-tip": "Bạn cũng có thể chỉ định điểm cuối quản lý bí mật bên ngoài",+ "google-iam": "Google CloudSQL IAM","external-secret-vault": "Vault (KV v2)","external-secret-aws": "AWS Secrets Manager","external-secret-gcp": "GCP Secret Manager"diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex cbf17ef924..3b3c854537 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1315,28 +1315,29 @@"create-readonly-user": "这是 Bytebase 用于连接数据库,执行诸如 SELECT 的只读操作的用户。","create-admin-user-non-sql": "这是 Bytebase 用于连接数据库,执行写和管理操作的用户。","create-readonly-user-non-sql": "这是 Bytebase 用于连接数据库,执行只读操作的用户。",+ "google-cloud-sql": {+ "instance-name": "实例连接名称",+ "instance-name-tips": "实例连接名称应为 project-id:region:instance-name。",+ "mysql": {+ "template": "创建一个名为 {user} 的服务帐户,然后将其作为 IAM 用户 {user}{'@'}'%' 添加到您的 Google Cloud SQL 中。授予此用户所需的权限。"+ }+ },"create-user-example": {"snowflake": {- "user": "bytebase{'@'}%",- "password": "YOUR_DB_PWD",- "template": "创建用户 bytebase,密码 {password},warehouse 为{warehouse},并授予必要权限的例子如下。"+ "template": "创建用户 {user},密码 {password},warehouse 为{warehouse},并授予必要权限的例子如下。"},"mysql": {- "password": "YOUR_DB_PWD",- "user": "bytebase{'@'}%","template": "创建用户 {user},密码 {password},并授予必要权限的例子如下。"},"clickhouse": {- "template": "创建用户 bytebase,密码 {password},并授予必要权限的例子如下。您需要首先启用 {link},才能执行以下创建用户的命令。",+ "template": "创建用户 {user},密码 {password},并授予必要权限的例子如下。您需要首先启用 {link},才能执行以下创建用户的命令。","sql-driven-workflow": "SQL 工作流"},"postgresql": {"warn": "如果您将要连接到的实例是由云服务供应商管理的话,那么 SUPERUSER 是不可用的,您需要通过供应商的管理员控制台来创建用户。您所创建的用户会拥有供应商特定的 semi-SUPERUSER 的权限。 您应该对所有 role 用 'GRANT role_name TO bytebase;' 语句赋予 Bytebase 权限,否则 Bytebase 可能没有权限操作已有的数据库或者表导致操作失败。",- "template": "创建用户 bytebase,密码 {password},并授予必要权限的例子如下。如果您将要连接到的实例是自己托管的,那么您可以 grant SUPERUSER。"+ "template": "创建用户 {user},密码 {password},并授予必要权限的例子如下。如果您将要连接到的实例是自己托管的,那么您可以 grant SUPERUSER。"},"redis": {- "password": "YOUR_DB_PWD",- "user": "bytebase","template": "创建用户 {user},密码 {password},并授予必要权限的例子如下。"}}@@ -1348,6 +1349,7 @@"password-type": {"password": "密码","password-tip": "您也可以指定外部的密码管理服务 endpoint",+ "google-iam": "Google CloudSQL IAM","external-secret-vault": "Vault (KV v2)","external-secret-aws": "AWS Secrets Manager","external-secret-gcp": "GCP Secret Manager"diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex e5804c3efe..824c1150fd 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -4,6 +4,98 @@ import _m0 from "protobufjs/minimal";export const protobufPackage = "google.protobuf";+/** The full set of known editions. */+export enum Edition {+ /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */+ EDITION_UNKNOWN = 0,+ /**+ * EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like+ * distinct editions. These can't be used to specify the edition of proto+ * files, but feature definitions must supply proto2/proto3 defaults for+ * backwards compatibility.+ */+ EDITION_PROTO2 = 998,+ EDITION_PROTO3 = 999,+ /**+ * EDITION_2023 - Editions that have been released. The specific values are arbitrary and+ * should not be depended on, but they will always be time-ordered for easy+ * comparison.+ */+ EDITION_2023 = 1000,+ /**+ * EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be+ * used or relyed on outside of tests.+ */+ EDITION_1_TEST_ONLY = 1,+ EDITION_2_TEST_ONLY = 2,+ EDITION_99997_TEST_ONLY = 99997,+ EDITION_99998_TEST_ONLY = 99998,+ EDITION_99999_TEST_ONLY = 99999,+ UNRECOGNIZED = -1,+}++export function editionFromJSON(object: any): Edition {+ switch (object) {+ case 0:+ case "EDITION_UNKNOWN":+ return Edition.EDITION_UNKNOWN;+ case 998:+ case "EDITION_PROTO2":+ return Edition.EDITION_PROTO2;+ case 999:+ case "EDITION_PROTO3":+ return Edition.EDITION_PROTO3;+ case 1000:+ case "EDITION_2023":+ return Edition.EDITION_2023;+ case 1:+ case "EDITION_1_TEST_ONLY":+ return Edition.EDITION_1_TEST_ONLY;+ case 2:+ case "EDITION_2_TEST_ONLY":+ return Edition.EDITION_2_TEST_ONLY;+ case 99997:+ case "EDITION_99997_TEST_ONLY":+ return Edition.EDITION_99997_TEST_ONLY;+ case 99998:+ case "EDITION_99998_TEST_ONLY":+ return Edition.EDITION_99998_TEST_ONLY;+ case 99999:+ case "EDITION_99999_TEST_ONLY":+ return Edition.EDITION_99999_TEST_ONLY;+ case -1:+ case "UNRECOGNIZED":+ default:+ return Edition.UNRECOGNIZED;+ }+}++export function editionToJSON(object: Edition): string {+ switch (object) {+ case Edition.EDITION_UNKNOWN:+ return "EDITION_UNKNOWN";+ case Edition.EDITION_PROTO2:+ return "EDITION_PROTO2";+ case Edition.EDITION_PROTO3:+ return "EDITION_PROTO3";+ case Edition.EDITION_2023:+ return "EDITION_2023";+ case Edition.EDITION_1_TEST_ONLY:+ return "EDITION_1_TEST_ONLY";+ case Edition.EDITION_2_TEST_ONLY:+ return "EDITION_2_TEST_ONLY";+ case Edition.EDITION_99997_TEST_ONLY:+ return "EDITION_99997_TEST_ONLY";+ case Edition.EDITION_99998_TEST_ONLY:+ return "EDITION_99998_TEST_ONLY";+ case Edition.EDITION_99999_TEST_ONLY:+ return "EDITION_99999_TEST_ONLY";+ case Edition.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}+/*** The protocol compiler can output a FileDescriptorSet containing the .proto* files it parses.@@ -51,8 +143,8 @@ export interface FileDescriptorProto {* If `edition` is present, this value must be "editions".*/syntax: string;- /** The edition of the proto file, which is an opaque string. */- edition: string;+ /** The edition of the proto file. */+ edition: Edition;}/** Describes a message type. */@@ -96,6 +188,84 @@ export interface DescriptorProto_ReservedRange {export interface ExtensionRangeOptions {/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];+ /**+ * For external users: DO NOT USE. We are in the process of open sourcing+ * extension declaration and executing internal cleanups before it can be+ * used externally.+ */+ declaration: ExtensionRangeOptions_Declaration[];+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;+ /**+ * The verification state of the range.+ * TODO: flip the default to DECLARATION once all empty ranges+ * are marked as UNVERIFIED.+ */+ verification: ExtensionRangeOptions_VerificationState;+}++/** The verification state of the extension range. */+export enum ExtensionRangeOptions_VerificationState {+ /** DECLARATION - All the extensions of the range must be declared. */+ DECLARATION = 0,+ UNVERIFIED = 1,+ UNRECOGNIZED = -1,+}++export function extensionRangeOptions_VerificationStateFromJSON(object: any): ExtensionRangeOptions_VerificationState {+ switch (object) {+ case 0:+ case "DECLARATION":+ return ExtensionRangeOptions_VerificationState.DECLARATION;+ case 1:+ case "UNVERIFIED":+ return ExtensionRangeOptions_VerificationState.UNVERIFIED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return ExtensionRangeOptions_VerificationState.UNRECOGNIZED;+ }+}++export function extensionRangeOptions_VerificationStateToJSON(object: ExtensionRangeOptions_VerificationState): string {+ switch (object) {+ case ExtensionRangeOptions_VerificationState.DECLARATION:+ return "DECLARATION";+ case ExtensionRangeOptions_VerificationState.UNVERIFIED:+ return "UNVERIFIED";+ case ExtensionRangeOptions_VerificationState.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export interface ExtensionRangeOptions_Declaration {+ /** The extension number declared within the extension range. */+ number: number;+ /**+ * The fully-qualified name of the extension field. There must be a leading+ * dot in front of the full name.+ */+ fullName: string;+ /**+ * The fully-qualified type name of the extension field. Unlike+ * Metadata.type, Declaration.type must have a leading dot for messages+ * and enums.+ */+ type: string;+ /**+ * If true, indicates that the number is reserved in the extension range,+ * and any extension field with the number will fail to compile. Set this+ * when a declared extension field is deleted.+ */+ reserved: boolean;+ /**+ * If true, indicates that the extension must be defined as repeated.+ * Otherwise the extension must be defined as optional.+ */+ repeated: boolean;}/** Describes a field within a message. */@@ -193,9 +363,10 @@ export enum FieldDescriptorProto_Type {TYPE_STRING = 9,/*** TYPE_GROUP - Tag-delimited aggregate.- * Group type is deprecated and not supported in proto3. However, Proto3+ * Group type is deprecated and not supported after google.protobuf. However, Proto3* implementations should still be able to parse the group wire format and- * treat group fields as unknown fields.+ * treat group fields as unknown fields. In Editions, the group wire format+ * can be enabled via the `message_encoding` feature.*/TYPE_GROUP = 10,/** TYPE_MESSAGE - Length-delimited aggregate. */@@ -323,8 +494,13 @@ export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Typexport enum FieldDescriptorProto_Label {/** LABEL_OPTIONAL - 0 is reserved for errors */LABEL_OPTIONAL = 1,- LABEL_REQUIRED = 2,LABEL_REPEATED = 3,+ /**+ * LABEL_REQUIRED - The required label is only allowed in google.protobuf. In proto3 and Editions+ * it's explicitly prohibited. In Editions, the `field_presence` feature+ * can be used to get this behavior.+ */+ LABEL_REQUIRED = 2,UNRECOGNIZED = -1,}@@ -333,12 +509,12 @@ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorcase 1:case "LABEL_OPTIONAL":return FieldDescriptorProto_Label.LABEL_OPTIONAL;- case 2:- case "LABEL_REQUIRED":- return FieldDescriptorProto_Label.LABEL_REQUIRED;case 3:case "LABEL_REPEATED":return FieldDescriptorProto_Label.LABEL_REPEATED;+ case 2:+ case "LABEL_REQUIRED":+ return FieldDescriptorProto_Label.LABEL_REQUIRED;case -1:case "UNRECOGNIZED":default:@@ -350,10 +526,10 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Laswitch (object) {case FieldDescriptorProto_Label.LABEL_OPTIONAL:return "LABEL_OPTIONAL";- case FieldDescriptorProto_Label.LABEL_REQUIRED:- return "LABEL_REQUIRED";case FieldDescriptorProto_Label.LABEL_REPEATED:return "LABEL_REPEATED";+ case FieldDescriptorProto_Label.LABEL_REQUIRED:+ return "LABEL_REQUIRED";case FieldDescriptorProto_Label.UNRECOGNIZED:default:return "UNRECOGNIZED";@@ -547,6 +723,10 @@ export interface FileOptions {* determining the ruby package.*/rubyPackage: string;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/*** The parser stores options it doesn't recognize here.* See the documentation for the "Options" section above.@@ -665,12 +845,16 @@ export interface MessageOptions {* This should only be used as a temporary measure against broken builds due* to the change in behavior for JSON field name conflicts.*- * TODO(b/261750190) This is legacy behavior we plan to remove once downstream+ * TODO This is legacy behavior we plan to remove once downstream* teams have had time to migrate.** @deprecated*/deprecatedLegacyJsonFieldConflicts: boolean;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -679,8 +863,10 @@ export interface FieldOptions {/*** The ctype option instructs the C++ code generator to use a different* representation of the field than it normally would. See the specific- * options below. This option is not yet implemented in the open source- * release -- sorry, we'll try to include it in a future version!+ * options below. This option is only implemented to support use of+ * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of+ * type "bytes" in the open source release -- sorry, we'll try to include+ * other types in a future version!*/ctype: FieldOptions_CType;/**@@ -688,7 +874,9 @@ export interface FieldOptions {* a more efficient representation on the wire. Rather than repeatedly* writing the tag and type for each element, the entire array is encoded as* a single length-delimited blob. In proto3, only explicit setting it to- * false will avoid using packed encoding.+ * false will avoid using packed encoding. This option is prohibited in+ * Editions, but the `repeated_field_encoding` feature can be used to control+ * the behavior.*/packed: boolean;/**@@ -759,7 +947,12 @@ export interface FieldOptions {*/debugRedact: boolean;retention: FieldOptions_OptionRetention;- target: FieldOptions_OptionTargetType;+ targets: FieldOptions_OptionTargetType[];+ editionDefaults: FieldOptions_EditionDefault[];+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -767,6 +960,14 @@ export interface FieldOptions {export enum FieldOptions_CType {/** STRING - Default mode. */STRING = 0,+ /**+ * CORD - The option [ctype=CORD] may be applied to a non-repeated field of type+ * "bytes". It indicates that in C++, the data should be stored in a Cord+ * instead of a string. For very large strings, this may reduce memory+ * fragmentation. It may also allow better performance when parsing from a+ * Cord, or when parsing with aliasing enabled, as the parsed Cord may then+ * alias the original buffer.+ */CORD = 1,STRING_PIECE = 2,UNRECOGNIZED = -1,@@ -977,7 +1178,17 @@ export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionT}}+export interface FieldOptions_EditionDefault {+ edition: Edition;+ /** Textproto value. */+ value: string;+}+export interface OneofOptions {+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1000,12 +1211,16 @@ export interface EnumOptions {* and strips underscored from the fields before comparison in proto3 only.* The new behavior takes `json_name` into account and applies to proto2 as* well.- * TODO(b/261750190) Remove this legacy behavior once downstream teams have+ * TODO Remove this legacy behavior once downstream teams have* had time to migrate.** @deprecated*/deprecatedLegacyJsonFieldConflicts: boolean;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1018,11 +1233,25 @@ export interface EnumValueOptions {* this is a formalization for deprecating enum values.*/deprecated: boolean;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;+ /**+ * Indicate that fields annotated with this enum value should not be printed+ * out when using debug formats, e.g. when the field contains sensitive+ * credentials.+ */+ debugRedact: boolean;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}export interface ServiceOptions {+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/*** Is this service deprecated?* Depending on the target platform, this can emit Deprecated annotations@@ -1043,6 +1272,10 @@ export interface MethodOptions {*/deprecated: boolean;idempotencyLevel: MethodOptions_IdempotencyLevel;+ /** Any features defined in the specific edition. */+ features:+ | FeatureSet+ | undefined;/** The parser stores options it doesn't recognize here. See above. */uninterpretedOption: UninterpretedOption[];}@@ -1127,6 +1360,294 @@ export interface UninterpretedOption_NamePart {isExtension: boolean;}+/**+ * TODO Enums in C++ gencode (and potentially other languages) are+ * not well scoped. This means that each of the feature enums below can clash+ * with each other. The short names we've chosen maximize call-site+ * readability, but leave us very open to this scenario. A future feature will+ * be designed and implemented to handle this, hopefully before we ever hit a+ * conflict here.+ */+export interface FeatureSet {+ fieldPresence: FeatureSet_FieldPresence;+ enumType: FeatureSet_EnumType;+ repeatedFieldEncoding: FeatureSet_RepeatedFieldEncoding;+ utf8Validation: FeatureSet_Utf8Validation;+ messageEncoding: FeatureSet_MessageEncoding;+ jsonFormat: FeatureSet_JsonFormat;+}++export enum FeatureSet_FieldPresence {+ FIELD_PRESENCE_UNKNOWN = 0,+ EXPLICIT = 1,+ IMPLICIT = 2,+ LEGACY_REQUIRED = 3,+ UNRECOGNIZED = -1,+}++export function featureSet_FieldPresenceFromJSON(object: any): FeatureSet_FieldPresence {+ switch (object) {+ case 0:+ case "FIELD_PRESENCE_UNKNOWN":+ return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN;+ case 1:+ case "EXPLICIT":+ return FeatureSet_FieldPresence.EXPLICIT;+ case 2:+ case "IMPLICIT":+ return FeatureSet_FieldPresence.IMPLICIT;+ case 3:+ case "LEGACY_REQUIRED":+ return FeatureSet_FieldPresence.LEGACY_REQUIRED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_FieldPresence.UNRECOGNIZED;+ }+}++export function featureSet_FieldPresenceToJSON(object: FeatureSet_FieldPresence): string {+ switch (object) {+ case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN:+ return "FIELD_PRESENCE_UNKNOWN";+ case FeatureSet_FieldPresence.EXPLICIT:+ return "EXPLICIT";+ case FeatureSet_FieldPresence.IMPLICIT:+ return "IMPLICIT";+ case FeatureSet_FieldPresence.LEGACY_REQUIRED:+ return "LEGACY_REQUIRED";+ case FeatureSet_FieldPresence.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_EnumType {+ ENUM_TYPE_UNKNOWN = 0,+ OPEN = 1,+ CLOSED = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_EnumTypeFromJSON(object: any): FeatureSet_EnumType {+ switch (object) {+ case 0:+ case "ENUM_TYPE_UNKNOWN":+ return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN;+ case 1:+ case "OPEN":+ return FeatureSet_EnumType.OPEN;+ case 2:+ case "CLOSED":+ return FeatureSet_EnumType.CLOSED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_EnumType.UNRECOGNIZED;+ }+}++export function featureSet_EnumTypeToJSON(object: FeatureSet_EnumType): string {+ switch (object) {+ case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN:+ return "ENUM_TYPE_UNKNOWN";+ case FeatureSet_EnumType.OPEN:+ return "OPEN";+ case FeatureSet_EnumType.CLOSED:+ return "CLOSED";+ case FeatureSet_EnumType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_RepeatedFieldEncoding {+ REPEATED_FIELD_ENCODING_UNKNOWN = 0,+ PACKED = 1,+ EXPANDED = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_RepeatedFieldEncodingFromJSON(object: any): FeatureSet_RepeatedFieldEncoding {+ switch (object) {+ case 0:+ case "REPEATED_FIELD_ENCODING_UNKNOWN":+ return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN;+ case 1:+ case "PACKED":+ return FeatureSet_RepeatedFieldEncoding.PACKED;+ case 2:+ case "EXPANDED":+ return FeatureSet_RepeatedFieldEncoding.EXPANDED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED;+ }+}++export function featureSet_RepeatedFieldEncodingToJSON(object: FeatureSet_RepeatedFieldEncoding): string {+ switch (object) {+ case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN:+ return "REPEATED_FIELD_ENCODING_UNKNOWN";+ case FeatureSet_RepeatedFieldEncoding.PACKED:+ return "PACKED";+ case FeatureSet_RepeatedFieldEncoding.EXPANDED:+ return "EXPANDED";+ case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_Utf8Validation {+ UTF8_VALIDATION_UNKNOWN = 0,+ NONE = 1,+ VERIFY = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8Validation {+ switch (object) {+ case 0:+ case "UTF8_VALIDATION_UNKNOWN":+ return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;+ case 1:+ case "NONE":+ return FeatureSet_Utf8Validation.NONE;+ case 2:+ case "VERIFY":+ return FeatureSet_Utf8Validation.VERIFY;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_Utf8Validation.UNRECOGNIZED;+ }+}++export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validation): string {+ switch (object) {+ case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:+ return "UTF8_VALIDATION_UNKNOWN";+ case FeatureSet_Utf8Validation.NONE:+ return "NONE";+ case FeatureSet_Utf8Validation.VERIFY:+ return "VERIFY";+ case FeatureSet_Utf8Validation.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_MessageEncoding {+ MESSAGE_ENCODING_UNKNOWN = 0,+ LENGTH_PREFIXED = 1,+ DELIMITED = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_MessageEncodingFromJSON(object: any): FeatureSet_MessageEncoding {+ switch (object) {+ case 0:+ case "MESSAGE_ENCODING_UNKNOWN":+ return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN;+ case 1:+ case "LENGTH_PREFIXED":+ return FeatureSet_MessageEncoding.LENGTH_PREFIXED;+ case 2:+ case "DELIMITED":+ return FeatureSet_MessageEncoding.DELIMITED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_MessageEncoding.UNRECOGNIZED;+ }+}++export function featureSet_MessageEncodingToJSON(object: FeatureSet_MessageEncoding): string {+ switch (object) {+ case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN:+ return "MESSAGE_ENCODING_UNKNOWN";+ case FeatureSet_MessageEncoding.LENGTH_PREFIXED:+ return "LENGTH_PREFIXED";+ case FeatureSet_MessageEncoding.DELIMITED:+ return "DELIMITED";+ case FeatureSet_MessageEncoding.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum FeatureSet_JsonFormat {+ JSON_FORMAT_UNKNOWN = 0,+ ALLOW = 1,+ LEGACY_BEST_EFFORT = 2,+ UNRECOGNIZED = -1,+}++export function featureSet_JsonFormatFromJSON(object: any): FeatureSet_JsonFormat {+ switch (object) {+ case 0:+ case "JSON_FORMAT_UNKNOWN":+ return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN;+ case 1:+ case "ALLOW":+ return FeatureSet_JsonFormat.ALLOW;+ case 2:+ case "LEGACY_BEST_EFFORT":+ return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT;+ case -1:+ case "UNRECOGNIZED":+ default:+ return FeatureSet_JsonFormat.UNRECOGNIZED;+ }+}++export function featureSet_JsonFormatToJSON(object: FeatureSet_JsonFormat): string {+ switch (object) {+ case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN:+ return "JSON_FORMAT_UNKNOWN";+ case FeatureSet_JsonFormat.ALLOW:+ return "ALLOW";+ case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT:+ return "LEGACY_BEST_EFFORT";+ case FeatureSet_JsonFormat.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++/**+ * A compiled specification for the defaults of a set of features. These+ * messages are generated from FeatureSet extensions and can be used to seed+ * feature resolution. The resolution with this object becomes a simple search+ * for the closest matching edition, followed by proto merges.+ */+export interface FeatureSetDefaults {+ defaults: FeatureSetDefaults_FeatureSetEditionDefault[];+ /**+ * The minimum supported edition (inclusive) when this was constructed.+ * Editions before this will not have defaults.+ */+ minimumEdition: Edition;+ /**+ * The maximum known edition (inclusive) when this was constructed. Editions+ * after this will not have reliable defaults.+ */+ maximumEdition: Edition;+}++/**+ * A map from every known edition with a unique set of defaults to its+ * defaults. Not all editions may be contained here. For a given edition,+ * the defaults at the closest matching edition ordered at or before it should+ * be used. This field must be in strict ascending order by edition.+ */+export interface FeatureSetDefaults_FeatureSetEditionDefault {+ edition: Edition;+ features: FeatureSet | undefined;+}+/*** Encapsulates information about the original source file from which a* FileDescriptorProto was generated.@@ -1423,7 +1944,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {options: undefined,sourceCodeInfo: undefined,syntax: "",- edition: "",+ edition: 0,};}@@ -1469,8 +1990,8 @@ export const FileDescriptorProto = {if (message.syntax !== "") {writer.uint32(98).string(message.syntax);}- if (message.edition !== "") {- writer.uint32(106).string(message.edition);+ if (message.edition !== 0) {+ writer.uint32(112).int32(message.edition);}return writer;},@@ -1586,12 +2107,12 @@ export const FileDescriptorProto = {message.syntax = reader.string();continue;- case 13:- if (tag !== 106) {+ case 14:+ if (tag !== 112) {break;}- message.edition = reader.string();+ message.edition = reader.int32() as any;continue;}if ((tag & 7) === 4 || tag === 0) {@@ -1630,7 +2151,7 @@ export const FileDescriptorProto = {options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "",- edition: isSet(object.edition) ? globalThis.String(object.edition) : "",+ edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,};},@@ -1672,8 +2193,8 @@ export const FileDescriptorProto = {if (message.syntax !== "") {obj.syntax = message.syntax;}- if (message.edition !== "") {- obj.edition = message.edition;+ if (message.edition !== 0) {+ obj.edition = editionToJSON(message.edition);}return obj;},@@ -1699,7 +2220,7 @@ export const FileDescriptorProto = {? SourceCodeInfo.fromPartial(object.sourceCodeInfo): undefined;message.syntax = object.syntax ?? "";- message.edition = object.edition ?? "";+ message.edition = object.edition ?? 0;return message;},};@@ -2093,7 +2614,7 @@ export const DescriptorProto_ReservedRange = {};function createBaseExtensionRangeOptions(): ExtensionRangeOptions {- return { uninterpretedOption: [] };+ return { uninterpretedOption: [], declaration: [], features: undefined, verification: 0 };}export const ExtensionRangeOptions = {@@ -2101,6 +2622,15 @@ export const ExtensionRangeOptions = {for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}+ for (const v of message.declaration) {+ ExtensionRangeOptions_Declaration.encode(v!, writer.uint32(18).fork()).ldelim();+ }+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim();+ }+ if (message.verification !== 0) {+ writer.uint32(24).int32(message.verification);+ }return writer;},@@ -2118,6 +2648,27 @@ export const ExtensionRangeOptions = {message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.declaration.push(ExtensionRangeOptions_Declaration.decode(reader, reader.uint32()));+ continue;+ case 50:+ if (tag !== 402) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;+ case 3:+ if (tag !== 24) {+ break;+ }++ message.verification = reader.int32() as any;+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -2132,6 +2683,13 @@ export const ExtensionRangeOptions = {uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],+ declaration: globalThis.Array.isArray(object?.declaration)+ ? object.declaration.map((e: any) => ExtensionRangeOptions_Declaration.fromJSON(e))+ : [],+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,+ verification: isSet(object.verification)+ ? extensionRangeOptions_VerificationStateFromJSON(object.verification)+ : 0,};},@@ -2140,6 +2698,15 @@ export const ExtensionRangeOptions = {if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}+ if (message.declaration?.length) {+ obj.declaration = message.declaration.map((e) => ExtensionRangeOptions_Declaration.toJSON(e));+ }+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }+ if (message.verification !== 0) {+ obj.verification = extensionRangeOptions_VerificationStateToJSON(message.verification);+ }return obj;},@@ -2149,20 +2716,144 @@ export const ExtensionRangeOptions = {fromPartial(object: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions {const message = createBaseExtensionRangeOptions();message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];+ message.declaration = object.declaration?.map((e) => ExtensionRangeOptions_Declaration.fromPartial(e)) || [];+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;+ message.verification = object.verification ?? 0;return message;},};-function createBaseFieldDescriptorProto(): FieldDescriptorProto {- return {- name: "",- number: 0,- label: 1,- type: 1,- typeName: "",- extendee: "",- defaultValue: "",- oneofIndex: 0,+function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration {+ return { number: 0, fullName: "", type: "", reserved: false, repeated: false };+}++export const ExtensionRangeOptions_Declaration = {+ encode(message: ExtensionRangeOptions_Declaration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.number !== 0) {+ writer.uint32(8).int32(message.number);+ }+ if (message.fullName !== "") {+ writer.uint32(18).string(message.fullName);+ }+ if (message.type !== "") {+ writer.uint32(26).string(message.type);+ }+ if (message.reserved === true) {+ writer.uint32(40).bool(message.reserved);+ }+ if (message.repeated === true) {+ writer.uint32(48).bool(message.repeated);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions_Declaration {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseExtensionRangeOptions_Declaration();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.number = reader.int32();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.fullName = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.type = reader.string();+ continue;+ case 5:+ if (tag !== 40) {+ break;+ }++ message.reserved = reader.bool();+ continue;+ case 6:+ if (tag !== 48) {+ break;+ }++ message.repeated = reader.bool();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): ExtensionRangeOptions_Declaration {+ return {+ number: isSet(object.number) ? globalThis.Number(object.number) : 0,+ fullName: isSet(object.fullName) ? globalThis.String(object.fullName) : "",+ type: isSet(object.type) ? globalThis.String(object.type) : "",+ reserved: isSet(object.reserved) ? globalThis.Boolean(object.reserved) : false,+ repeated: isSet(object.repeated) ? globalThis.Boolean(object.repeated) : false,+ };+ },++ toJSON(message: ExtensionRangeOptions_Declaration): unknown {+ const obj: any = {};+ if (message.number !== 0) {+ obj.number = Math.round(message.number);+ }+ if (message.fullName !== "") {+ obj.fullName = message.fullName;+ }+ if (message.type !== "") {+ obj.type = message.type;+ }+ if (message.reserved === true) {+ obj.reserved = message.reserved;+ }+ if (message.repeated === true) {+ obj.repeated = message.repeated;+ }+ return obj;+ },++ create(base?: DeepPartial<ExtensionRangeOptions_Declaration>): ExtensionRangeOptions_Declaration {+ return ExtensionRangeOptions_Declaration.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<ExtensionRangeOptions_Declaration>): ExtensionRangeOptions_Declaration {+ const message = createBaseExtensionRangeOptions_Declaration();+ message.number = object.number ?? 0;+ message.fullName = object.fullName ?? "";+ message.type = object.type ?? "";+ message.reserved = object.reserved ?? false;+ message.repeated = object.repeated ?? false;+ return message;+ },+};++function createBaseFieldDescriptorProto(): FieldDescriptorProto {+ return {+ name: "",+ number: 0,+ label: 1,+ type: 1,+ typeName: "",+ extendee: "",+ defaultValue: "",+ oneofIndex: 0,jsonName: "",options: undefined,proto3Optional: false,@@ -3003,6 +3694,7 @@ function createBaseFileOptions(): FileOptions {phpNamespace: "",phpMetadataNamespace: "",rubyPackage: "",+ features: undefined,uninterpretedOption: [],};}@@ -3069,6 +3761,9 @@ export const FileOptions = {if (message.rubyPackage !== "") {writer.uint32(362).string(message.rubyPackage);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3222,6 +3917,13 @@ export const FileOptions = {message.rubyPackage = reader.string();continue;+ case 50:+ if (tag !== 402) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -3262,6 +3964,7 @@ export const FileOptions = {phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "",phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "",rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "",+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3330,6 +4033,9 @@ export const FileOptions = {if (message.rubyPackage !== "") {obj.rubyPackage = message.rubyPackage;}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3361,6 +4067,9 @@ export const FileOptions = {message.phpNamespace = object.phpNamespace ?? "";message.phpMetadataNamespace = object.phpMetadataNamespace ?? "";message.rubyPackage = object.rubyPackage ?? "";+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3373,6 +4082,7 @@ function createBaseMessageOptions(): MessageOptions {deprecated: false,mapEntry: false,deprecatedLegacyJsonFieldConflicts: false,+ features: undefined,uninterpretedOption: [],};}@@ -3394,6 +4104,9 @@ export const MessageOptions = {if (message.deprecatedLegacyJsonFieldConflicts === true) {writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(98).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3442,6 +4155,13 @@ export const MessageOptions = {message.deprecatedLegacyJsonFieldConflicts = reader.bool();continue;+ case 12:+ if (tag !== 98) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -3471,6 +4191,7 @@ export const MessageOptions = {deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts): false,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3494,6 +4215,9 @@ export const MessageOptions = {if (message.deprecatedLegacyJsonFieldConflicts === true) {obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3510,6 +4234,9 @@ export const MessageOptions = {message.deprecated = object.deprecated ?? false;message.mapEntry = object.mapEntry ?? false;message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -3526,7 +4253,9 @@ function createBaseFieldOptions(): FieldOptions {weak: false,debugRedact: false,retention: 0,- target: 0,+ targets: [],+ editionDefaults: [],+ features: undefined,uninterpretedOption: [],};}@@ -3560,8 +4289,16 @@ export const FieldOptions = {if (message.retention !== 0) {writer.uint32(136).int32(message.retention);}- if (message.target !== 0) {- writer.uint32(144).int32(message.target);+ writer.uint32(154).fork();+ for (const v of message.targets) {+ writer.int32(v);+ }+ writer.ldelim();+ for (const v of message.editionDefaults) {+ FieldOptions_EditionDefault.encode(v!, writer.uint32(162).fork()).ldelim();+ }+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(170).fork()).ldelim();}for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();@@ -3639,12 +4376,36 @@ export const FieldOptions = {message.retention = reader.int32() as any;continue;- case 18:- if (tag !== 144) {+ case 19:+ if (tag === 152) {+ message.targets.push(reader.int32() as any);++ continue;+ }++ if (tag === 154) {+ const end2 = reader.uint32() + reader.pos;+ while (reader.pos < end2) {+ message.targets.push(reader.int32() as any);+ }++ continue;+ }++ break;+ case 20:+ if (tag !== 162) {break;}- message.target = reader.int32() as any;+ message.editionDefaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32()));+ continue;+ case 21:+ if (tag !== 170) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());continue;case 999:if (tag !== 7994) {@@ -3673,7 +4434,13 @@ export const FieldOptions = {weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false,debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0,- target: isSet(object.target) ? fieldOptions_OptionTargetTypeFromJSON(object.target) : 0,+ targets: globalThis.Array.isArray(object?.targets)+ ? object.targets.map((e: any) => fieldOptions_OptionTargetTypeFromJSON(e))+ : [],+ editionDefaults: globalThis.Array.isArray(object?.editionDefaults)+ ? object.editionDefaults.map((e: any) => FieldOptions_EditionDefault.fromJSON(e))+ : [],+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3709,8 +4476,14 @@ export const FieldOptions = {if (message.retention !== 0) {obj.retention = fieldOptions_OptionRetentionToJSON(message.retention);}- if (message.target !== 0) {- obj.target = fieldOptions_OptionTargetTypeToJSON(message.target);+ if (message.targets?.length) {+ obj.targets = message.targets.map((e) => fieldOptions_OptionTargetTypeToJSON(e));+ }+ if (message.editionDefaults?.length) {+ obj.editionDefaults = message.editionDefaults.map((e) => FieldOptions_EditionDefault.toJSON(e));+ }+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);}if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));@@ -3732,18 +4505,99 @@ export const FieldOptions = {message.weak = object.weak ?? false;message.debugRedact = object.debugRedact ?? false;message.retention = object.retention ?? 0;- message.target = object.target ?? 0;+ message.targets = object.targets?.map((e) => e) || [];+ message.editionDefaults = object.editionDefaults?.map((e) => FieldOptions_EditionDefault.fromPartial(e)) || [];+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},};+function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault {+ return { edition: 0, value: "" };+}++export const FieldOptions_EditionDefault = {+ encode(message: FieldOptions_EditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.edition !== 0) {+ writer.uint32(24).int32(message.edition);+ }+ if (message.value !== "") {+ writer.uint32(18).string(message.value);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_EditionDefault {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseFieldOptions_EditionDefault();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 3:+ if (tag !== 24) {+ break;+ }++ message.edition = reader.int32() as any;+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.value = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): FieldOptions_EditionDefault {+ return {+ edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,+ value: isSet(object.value) ? globalThis.String(object.value) : "",+ };+ },++ toJSON(message: FieldOptions_EditionDefault): unknown {+ const obj: any = {};+ if (message.edition !== 0) {+ obj.edition = editionToJSON(message.edition);+ }+ if (message.value !== "") {+ obj.value = message.value;+ }+ return obj;+ },++ create(base?: DeepPartial<FieldOptions_EditionDefault>): FieldOptions_EditionDefault {+ return FieldOptions_EditionDefault.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<FieldOptions_EditionDefault>): FieldOptions_EditionDefault {+ const message = createBaseFieldOptions_EditionDefault();+ message.edition = object.edition ?? 0;+ message.value = object.value ?? "";+ return message;+ },+};+function createBaseOneofOptions(): OneofOptions {- return { uninterpretedOption: [] };+ return { features: undefined, uninterpretedOption: [] };}export const OneofOptions = {encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(10).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3757,6 +4611,13 @@ export const OneofOptions = {while (reader.pos < end) {const tag = reader.uint32();switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -3775,6 +4636,7 @@ export const OneofOptions = {fromJSON(object: any): OneofOptions {return {+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3783,6 +4645,9 @@ export const OneofOptions = {toJSON(message: OneofOptions): unknown {const obj: any = {};+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3794,13 +4659,22 @@ export const OneofOptions = {},fromPartial(object: DeepPartial<OneofOptions>): OneofOptions {const message = createBaseOneofOptions();+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},};function createBaseEnumOptions(): EnumOptions {- return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };+ return {+ allowAlias: false,+ deprecated: false,+ deprecatedLegacyJsonFieldConflicts: false,+ features: undefined,+ uninterpretedOption: [],+ };}export const EnumOptions = {@@ -3814,6 +4688,9 @@ export const EnumOptions = {if (message.deprecatedLegacyJsonFieldConflicts === true) {writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(58).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3848,6 +4725,13 @@ export const EnumOptions = {message.deprecatedLegacyJsonFieldConflicts = reader.bool();continue;+ case 7:+ if (tag !== 58) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -3871,6 +4755,7 @@ export const EnumOptions = {deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts): false,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3888,6 +4773,9 @@ export const EnumOptions = {if (message.deprecatedLegacyJsonFieldConflicts === true) {obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3902,13 +4790,16 @@ export const EnumOptions = {message.allowAlias = object.allowAlias ?? false;message.deprecated = object.deprecated ?? false;message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},};function createBaseEnumValueOptions(): EnumValueOptions {- return { deprecated: false, uninterpretedOption: [] };+ return { deprecated: false, features: undefined, debugRedact: false, uninterpretedOption: [] };}export const EnumValueOptions = {@@ -3916,6 +4807,12 @@ export const EnumValueOptions = {if (message.deprecated === true) {writer.uint32(8).bool(message.deprecated);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();+ }+ if (message.debugRedact === true) {+ writer.uint32(24).bool(message.debugRedact);+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -3936,6 +4833,20 @@ export const EnumValueOptions = {message.deprecated = reader.bool();continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;+ case 3:+ if (tag !== 24) {+ break;+ }++ message.debugRedact = reader.bool();+ continue;case 999:if (tag !== 7994) {break;@@ -3955,6 +4866,8 @@ export const EnumValueOptions = {fromJSON(object: any): EnumValueOptions {return {deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,+ debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -3966,6 +4879,12 @@ export const EnumValueOptions = {if (message.deprecated === true) {obj.deprecated = message.deprecated;}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }+ if (message.debugRedact === true) {+ obj.debugRedact = message.debugRedact;+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -3978,17 +4897,24 @@ export const EnumValueOptions = {fromPartial(object: DeepPartial<EnumValueOptions>): EnumValueOptions {const message = createBaseEnumValueOptions();message.deprecated = object.deprecated ?? false;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;+ message.debugRedact = object.debugRedact ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},};function createBaseServiceOptions(): ServiceOptions {- return { deprecated: false, uninterpretedOption: [] };+ return { features: undefined, deprecated: false, uninterpretedOption: [] };}export const ServiceOptions = {encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(274).fork()).ldelim();+ }if (message.deprecated === true) {writer.uint32(264).bool(message.deprecated);}@@ -4005,6 +4931,13 @@ export const ServiceOptions = {while (reader.pos < end) {const tag = reader.uint32();switch (tag >>> 3) {+ case 34:+ if (tag !== 274) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 33:if (tag !== 264) {break;@@ -4030,6 +4963,7 @@ export const ServiceOptions = {fromJSON(object: any): ServiceOptions {return {+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))@@ -4039,6 +4973,9 @@ export const ServiceOptions = {toJSON(message: ServiceOptions): unknown {const obj: any = {};+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.deprecated === true) {obj.deprecated = message.deprecated;}@@ -4053,6 +4990,9 @@ export const ServiceOptions = {},fromPartial(object: DeepPartial<ServiceOptions>): ServiceOptions {const message = createBaseServiceOptions();+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.deprecated = object.deprecated ?? false;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;@@ -4060,7 +5000,7 @@ export const ServiceOptions = {};function createBaseMethodOptions(): MethodOptions {- return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] };+ return { deprecated: false, idempotencyLevel: 0, features: undefined, uninterpretedOption: [] };}export const MethodOptions = {@@ -4071,6 +5011,9 @@ export const MethodOptions = {if (message.idempotencyLevel !== 0) {writer.uint32(272).int32(message.idempotencyLevel);}+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(282).fork()).ldelim();+ }for (const v of message.uninterpretedOption) {UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();}@@ -4098,6 +5041,13 @@ export const MethodOptions = {message.idempotencyLevel = reader.int32() as any;continue;+ case 35:+ if (tag !== 282) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;case 999:if (tag !== 7994) {break;@@ -4120,6 +5070,7 @@ export const MethodOptions = {idempotencyLevel: isSet(object.idempotencyLevel)? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel): 0,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)): [],@@ -4134,6 +5085,9 @@ export const MethodOptions = {if (message.idempotencyLevel !== 0) {obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel);}+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }if (message.uninterpretedOption?.length) {obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));}@@ -4147,6 +5101,9 @@ export const MethodOptions = {const message = createBaseMethodOptions();message.deprecated = object.deprecated ?? false;message.idempotencyLevel = object.idempotencyLevel ?? 0;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];return message;},@@ -4389,6 +5346,318 @@ export const UninterpretedOption_NamePart = {},};+function createBaseFeatureSet(): FeatureSet {+ return {+ fieldPresence: 0,+ enumType: 0,+ repeatedFieldEncoding: 0,+ utf8Validation: 0,+ messageEncoding: 0,+ jsonFormat: 0,+ };+}++export const FeatureSet = {+ encode(message: FeatureSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.fieldPresence !== 0) {+ writer.uint32(8).int32(message.fieldPresence);+ }+ if (message.enumType !== 0) {+ writer.uint32(16).int32(message.enumType);+ }+ if (message.repeatedFieldEncoding !== 0) {+ writer.uint32(24).int32(message.repeatedFieldEncoding);+ }+ if (message.utf8Validation !== 0) {+ writer.uint32(32).int32(message.utf8Validation);+ }+ if (message.messageEncoding !== 0) {+ writer.uint32(40).int32(message.messageEncoding);+ }+ if (message.jsonFormat !== 0) {+ writer.uint32(48).int32(message.jsonFormat);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSet {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseFeatureSet();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 8) {+ break;+ }++ message.fieldPresence = reader.int32() as any;+ continue;+ case 2:+ if (tag !== 16) {+ break;+ }++ message.enumType = reader.int32() as any;+ continue;+ case 3:+ if (tag !== 24) {+ break;+ }++ message.repeatedFieldEncoding = reader.int32() as any;+ continue;+ case 4:+ if (tag !== 32) {+ break;+ }++ message.utf8Validation = reader.int32() as any;+ continue;+ case 5:+ if (tag !== 40) {+ break;+ }++ message.messageEncoding = reader.int32() as any;+ continue;+ case 6:+ if (tag !== 48) {+ break;+ }++ message.jsonFormat = reader.int32() as any;+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): FeatureSet {+ return {+ fieldPresence: isSet(object.fieldPresence) ? featureSet_FieldPresenceFromJSON(object.fieldPresence) : 0,+ enumType: isSet(object.enumType) ? featureSet_EnumTypeFromJSON(object.enumType) : 0,+ repeatedFieldEncoding: isSet(object.repeatedFieldEncoding)+ ? featureSet_RepeatedFieldEncodingFromJSON(object.repeatedFieldEncoding)+ : 0,+ utf8Validation: isSet(object.utf8Validation) ? featureSet_Utf8ValidationFromJSON(object.utf8Validation) : 0,+ messageEncoding: isSet(object.messageEncoding) ? featureSet_MessageEncodingFromJSON(object.messageEncoding) : 0,+ jsonFormat: isSet(object.jsonFormat) ? featureSet_JsonFormatFromJSON(object.jsonFormat) : 0,+ };+ },++ toJSON(message: FeatureSet): unknown {+ const obj: any = {};+ if (message.fieldPresence !== 0) {+ obj.fieldPresence = featureSet_FieldPresenceToJSON(message.fieldPresence);+ }+ if (message.enumType !== 0) {+ obj.enumType = featureSet_EnumTypeToJSON(message.enumType);+ }+ if (message.repeatedFieldEncoding !== 0) {+ obj.repeatedFieldEncoding = featureSet_RepeatedFieldEncodingToJSON(message.repeatedFieldEncoding);+ }+ if (message.utf8Validation !== 0) {+ obj.utf8Validation = featureSet_Utf8ValidationToJSON(message.utf8Validation);+ }+ if (message.messageEncoding !== 0) {+ obj.messageEncoding = featureSet_MessageEncodingToJSON(message.messageEncoding);+ }+ if (message.jsonFormat !== 0) {+ obj.jsonFormat = featureSet_JsonFormatToJSON(message.jsonFormat);+ }+ return obj;+ },++ create(base?: DeepPartial<FeatureSet>): FeatureSet {+ return FeatureSet.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<FeatureSet>): FeatureSet {+ const message = createBaseFeatureSet();+ message.fieldPresence = object.fieldPresence ?? 0;+ message.enumType = object.enumType ?? 0;+ message.repeatedFieldEncoding = object.repeatedFieldEncoding ?? 0;+ message.utf8Validation = object.utf8Validation ?? 0;+ message.messageEncoding = object.messageEncoding ?? 0;+ message.jsonFormat = object.jsonFormat ?? 0;+ return message;+ },+};++function createBaseFeatureSetDefaults(): FeatureSetDefaults {+ return { defaults: [], minimumEdition: 0, maximumEdition: 0 };+}++export const FeatureSetDefaults = {+ encode(message: FeatureSetDefaults, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ for (const v of message.defaults) {+ FeatureSetDefaults_FeatureSetEditionDefault.encode(v!, writer.uint32(10).fork()).ldelim();+ }+ if (message.minimumEdition !== 0) {+ writer.uint32(32).int32(message.minimumEdition);+ }+ if (message.maximumEdition !== 0) {+ writer.uint32(40).int32(message.maximumEdition);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseFeatureSetDefaults();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.decode(reader, reader.uint32()));+ continue;+ case 4:+ if (tag !== 32) {+ break;+ }++ message.minimumEdition = reader.int32() as any;+ continue;+ case 5:+ if (tag !== 40) {+ break;+ }++ message.maximumEdition = reader.int32() as any;+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): FeatureSetDefaults {+ return {+ defaults: globalThis.Array.isArray(object?.defaults)+ ? object.defaults.map((e: any) => FeatureSetDefaults_FeatureSetEditionDefault.fromJSON(e))+ : [],+ minimumEdition: isSet(object.minimumEdition) ? editionFromJSON(object.minimumEdition) : 0,+ maximumEdition: isSet(object.maximumEdition) ? editionFromJSON(object.maximumEdition) : 0,+ };+ },++ toJSON(message: FeatureSetDefaults): unknown {+ const obj: any = {};+ if (message.defaults?.length) {+ obj.defaults = message.defaults.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e));+ }+ if (message.minimumEdition !== 0) {+ obj.minimumEdition = editionToJSON(message.minimumEdition);+ }+ if (message.maximumEdition !== 0) {+ obj.maximumEdition = editionToJSON(message.maximumEdition);+ }+ return obj;+ },++ create(base?: DeepPartial<FeatureSetDefaults>): FeatureSetDefaults {+ return FeatureSetDefaults.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<FeatureSetDefaults>): FeatureSetDefaults {+ const message = createBaseFeatureSetDefaults();+ message.defaults = object.defaults?.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(e)) || [];+ message.minimumEdition = object.minimumEdition ?? 0;+ message.maximumEdition = object.maximumEdition ?? 0;+ return message;+ },+};++function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault {+ return { edition: 0, features: undefined };+}++export const FeatureSetDefaults_FeatureSetEditionDefault = {+ encode(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.edition !== 0) {+ writer.uint32(24).int32(message.edition);+ }+ if (message.features !== undefined) {+ FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults_FeatureSetEditionDefault {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 3:+ if (tag !== 24) {+ break;+ }++ message.edition = reader.int32() as any;+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.features = FeatureSet.decode(reader, reader.uint32());+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): FeatureSetDefaults_FeatureSetEditionDefault {+ return {+ edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0,+ features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,+ };+ },++ toJSON(message: FeatureSetDefaults_FeatureSetEditionDefault): unknown {+ const obj: any = {};+ if (message.edition !== 0) {+ obj.edition = editionToJSON(message.edition);+ }+ if (message.features !== undefined) {+ obj.features = FeatureSet.toJSON(message.features);+ }+ return obj;+ },++ create(base?: DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>): FeatureSetDefaults_FeatureSetEditionDefault {+ return FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(base ?? {});+ },+ fromPartial(+ object: DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>,+ ): FeatureSetDefaults_FeatureSetEditionDefault {+ const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();+ message.edition = object.edition ?? 0;+ message.features = (object.features !== undefined && object.features !== null)+ ? FeatureSet.fromPartial(object.features)+ : undefined;+ return message;+ },+};+function createBaseSourceCodeInfo(): SourceCodeInfo {return { location: [] };}diff --git a/frontend/src/types/proto/google/protobuf/struct.ts b/frontend/src/types/proto/google/protobuf/struct.tsindex dbdf7a289a..b87dbf5bac 100644--- a/frontend/src/types/proto/google/protobuf/struct.ts+++ b/frontend/src/types/proto/google/protobuf/struct.ts@@ -8,7 +8,7 @@ export const protobufPackage = "google.protobuf";* `NullValue` is a singleton enumeration to represent the null value for the* `Value` type union.*- * The JSON representation for `NullValue` is JSON `null`.+ * The JSON representation for `NullValue` is JSON `null`.*/export enum NullValue {/** NULL_VALUE - Null value. */diff --git a/frontend/src/types/proto/google/protobuf/timestamp.ts b/frontend/src/types/proto/google/protobuf/timestamp.tsindex 51695e08d0..5781891bc0 100644--- a/frontend/src/types/proto/google/protobuf/timestamp.ts+++ b/frontend/src/types/proto/google/protobuf/timestamp.ts@@ -92,7 +92,7 @@ export const protobufPackage = "google.protobuf";* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use* the Joda Time's [`ISODateTimeFormat.dateTime()`](- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()* ) to obtain a formatter capable of generating timestamps in this format.*/export interface Timestamp {diff --git a/frontend/src/types/proto/store/data_source.ts b/frontend/src/types/proto/store/data_source.tsindex 1cc7f3920f..ac12785c16 100644--- a/frontend/src/types/proto/store/data_source.ts+++ b/frontend/src/types/proto/store/data_source.ts@@ -188,6 +188,46 @@ export interface DataSourceOptions {*/authenticationPrivateKeyObfuscated: string;externalSecret: DataSourceExternalSecret | undefined;+ authenticationType: DataSourceOptions_AuthenticationType;+}++export enum DataSourceOptions_AuthenticationType {+ AUTHENTICATION_UNSPECIFIED = 0,+ PASSWORD = 1,+ GOOGLE_CLOUD_SQL_IAM = 2,+ UNRECOGNIZED = -1,+}++export function dataSourceOptions_AuthenticationTypeFromJSON(object: any): DataSourceOptions_AuthenticationType {+ switch (object) {+ case 0:+ case "AUTHENTICATION_UNSPECIFIED":+ return DataSourceOptions_AuthenticationType.AUTHENTICATION_UNSPECIFIED;+ case 1:+ case "PASSWORD":+ return DataSourceOptions_AuthenticationType.PASSWORD;+ case 2:+ case "GOOGLE_CLOUD_SQL_IAM":+ return DataSourceOptions_AuthenticationType.GOOGLE_CLOUD_SQL_IAM;+ case -1:+ case "UNRECOGNIZED":+ default:+ return DataSourceOptions_AuthenticationType.UNRECOGNIZED;+ }+}++export function dataSourceOptions_AuthenticationTypeToJSON(object: DataSourceOptions_AuthenticationType): string {+ switch (object) {+ case DataSourceOptions_AuthenticationType.AUTHENTICATION_UNSPECIFIED:+ return "AUTHENTICATION_UNSPECIFIED";+ case DataSourceOptions_AuthenticationType.PASSWORD:+ return "PASSWORD";+ case DataSourceOptions_AuthenticationType.GOOGLE_CLOUD_SQL_IAM:+ return "GOOGLE_CLOUD_SQL_IAM";+ case DataSourceOptions_AuthenticationType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }}function createBaseDataSourceExternalSecret(): DataSourceExternalSecret {@@ -484,6 +524,7 @@ function createBaseDataSourceOptions(): DataSourceOptions {sshObfuscatedPrivateKey: "",authenticationPrivateKeyObfuscated: "",externalSecret: undefined,+ authenticationType: 0,};}@@ -522,6 +563,9 @@ export const DataSourceOptions = {if (message.externalSecret !== undefined) {DataSourceExternalSecret.encode(message.externalSecret, writer.uint32(90).fork()).ldelim();}+ if (message.authenticationType !== 0) {+ writer.uint32(96).int32(message.authenticationType);+ }return writer;},@@ -609,6 +653,13 @@ export const DataSourceOptions = {message.externalSecret = DataSourceExternalSecret.decode(reader, reader.uint32());continue;+ case 12:+ if (tag !== 96) {+ break;+ }++ message.authenticationType = reader.int32() as any;+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -639,6 +690,9 @@ export const DataSourceOptions = {externalSecret: isSet(object.externalSecret)? DataSourceExternalSecret.fromJSON(object.externalSecret): undefined,+ authenticationType: isSet(object.authenticationType)+ ? dataSourceOptions_AuthenticationTypeFromJSON(object.authenticationType)+ : 0,};},@@ -677,6 +731,9 @@ export const DataSourceOptions = {if (message.externalSecret !== undefined) {obj.externalSecret = DataSourceExternalSecret.toJSON(message.externalSecret);}+ if (message.authenticationType !== 0) {+ obj.authenticationType = dataSourceOptions_AuthenticationTypeToJSON(message.authenticationType);+ }return obj;},@@ -698,6 +755,7 @@ export const DataSourceOptions = {message.externalSecret = (object.externalSecret !== undefined && object.externalSecret !== null)? DataSourceExternalSecret.fromPartial(object.externalSecret): undefined;+ message.authenticationType = object.authenticationType ?? 0;return message;},};diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.tsindex d1728423a3..c4a1dc607d 100644--- a/frontend/src/types/proto/v1/instance_service.ts+++ b/frontend/src/types/proto/v1/instance_service.ts@@ -476,6 +476,46 @@ export interface DataSource {*/authenticationPrivateKey: string;externalSecret: DataSourceExternalSecret | undefined;+ authenticationType: DataSource_AuthenticationType;+}++export enum DataSource_AuthenticationType {+ AUTHENTICATION_UNSPECIFIED = 0,+ PASSWORD = 1,+ GOOGLE_CLOUD_SQL_IAM = 2,+ UNRECOGNIZED = -1,+}++export function dataSource_AuthenticationTypeFromJSON(object: any): DataSource_AuthenticationType {+ switch (object) {+ case 0:+ case "AUTHENTICATION_UNSPECIFIED":+ return DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED;+ case 1:+ case "PASSWORD":+ return DataSource_AuthenticationType.PASSWORD;+ case 2:+ case "GOOGLE_CLOUD_SQL_IAM":+ return DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM;+ case -1:+ case "UNRECOGNIZED":+ default:+ return DataSource_AuthenticationType.UNRECOGNIZED;+ }+}++export function dataSource_AuthenticationTypeToJSON(object: DataSource_AuthenticationType): string {+ switch (object) {+ case DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED:+ return "AUTHENTICATION_UNSPECIFIED";+ case DataSource_AuthenticationType.PASSWORD:+ return "PASSWORD";+ case DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM:+ return "GOOGLE_CLOUD_SQL_IAM";+ case DataSource_AuthenticationType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }}export interface InstanceResource {@@ -2310,6 +2350,7 @@ function createBaseDataSource(): DataSource {sshPrivateKey: "",authenticationPrivateKey: "",externalSecret: undefined,+ authenticationType: 0,};}@@ -2378,6 +2419,9 @@ export const DataSource = {if (message.externalSecret !== undefined) {DataSourceExternalSecret.encode(message.externalSecret, writer.uint32(170).fork()).ldelim();}+ if (message.authenticationType !== 0) {+ writer.uint32(176).int32(message.authenticationType);+ }return writer;},@@ -2535,6 +2579,13 @@ export const DataSource = {message.externalSecret = DataSourceExternalSecret.decode(reader, reader.uint32());continue;+ case 22:+ if (tag !== 176) {+ break;+ }++ message.authenticationType = reader.int32() as any;+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -2573,6 +2624,9 @@ export const DataSource = {externalSecret: isSet(object.externalSecret)? DataSourceExternalSecret.fromJSON(object.externalSecret): undefined,+ authenticationType: isSet(object.authenticationType)+ ? dataSource_AuthenticationTypeFromJSON(object.authenticationType)+ : 0,};},@@ -2641,6 +2695,9 @@ export const DataSource = {if (message.externalSecret !== undefined) {obj.externalSecret = DataSourceExternalSecret.toJSON(message.externalSecret);}+ if (message.authenticationType !== 0) {+ obj.authenticationType = dataSource_AuthenticationTypeToJSON(message.authenticationType);+ }return obj;},@@ -2672,6 +2729,7 @@ export const DataSource = {message.externalSecret = (object.externalSecret !== undefined && object.externalSecret !== null)? DataSourceExternalSecret.fromPartial(object.externalSecret): undefined;+ message.authenticationType = object.authenticationType ?? 0;return message;},};diff --git a/frontend/src/types/v1/dataSource.ts b/frontend/src/types/v1/dataSource.tsindex 84aa5132a5..32f52d8a1e 100644--- a/frontend/src/types/v1/dataSource.ts+++ b/frontend/src/types/v1/dataSource.ts@@ -1,10 +1,15 @@import { v4 as uuidv4 } from "uuid";-import { DataSource, DataSourceType } from "../proto/v1/instance_service";+import {+ DataSource,+ DataSourceType,+ DataSource_AuthenticationType,+} from "../proto/v1/instance_service";export const emptyDataSource = () => {- return DataSource.fromJSON({+ return DataSource.fromPartial({type: DataSourceType.ADMIN,id: uuidv4(),+ authenticationType: DataSource_AuthenticationType.PASSWORD,});};diff --git a/frontend/src/views/DatabaseDetail.vue b/frontend/src/views/DatabaseDetail.vueindex 0d9d1524ad..4270ab38d8 100644--- a/frontend/src/views/DatabaseDetail.vue+++ b/frontend/src/views/DatabaseDetail.vue@@ -78,21 +78,16 @@class="flex flex-row justify-start items-center flex-wrap shrink gap-x-2 gap-y-2"data-label="bb-database-detail-action-buttons-container">- <div- v-if="state.syncingSchema"- class="flex justify-center items-center space-x-2"- >- <BBSpin />- <span class="text-control text-sm">- {{ $t("instance.syncing") }}- </span>- </div><NButtonv-if="allowSyncDatabase"- :disabled="state.syncingSchema"+ :loading="state.syncingSchema"@click.prevent="syncDatabaseSchema">- {{ $t("common.sync-now") }}+ {{+ state.syncingSchema+ ? $t("instance.syncing")+ : $t("common.sync-now")+ }}</NButton><NButtonv-if="allowTransferDatabase"diff --git a/go.mod b/go.modindex d8dc6d275b..9f0ab1fc57 100644--- a/go.mod+++ b/go.mod@@ -3,6 +3,7 @@ module github.com/bytebase/bytebasego 1.21.6require (+ cloud.google.com/go/cloudsqlconn v1.9.0cloud.google.com/go/secretmanager v1.12.0cloud.google.com/go/spanner v1.60.0gitee.com/chunanyong/dm v1.8.14@@ -76,15 +77,15 @@ require (github.com/xuri/excelize/v2 v2.8.1go.mongodb.org/mongo-driver v1.14.0go.uber.org/multierr v1.11.0- golang.org/x/crypto v0.21.0+ golang.org/x/crypto v0.22.0golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8- golang.org/x/oauth2 v0.18.0+ golang.org/x/oauth2 v0.19.0golang.org/x/text v0.14.0google.golang.org/api v0.172.0google.golang.org/genproto v0.0.0-20240325203815-454cdb8f5daagoogle.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa- google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa- google.golang.org/grpc v1.62.1+ google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be+ google.golang.org/grpc v1.63.2google.golang.org/protobuf v1.33.0gopkg.in/yaml.v3 v3.0.1)@@ -179,8 +180,8 @@ require (go.opentelemetry.io/otel/metric v1.24.0 // indirectgo.uber.org/zap v1.27.0 // indirectgolang.org/x/mod v0.16.0 // indirect- golang.org/x/sys v0.18.0 // indirect- golang.org/x/term v0.18.0 // indirect+ golang.org/x/sys v0.19.0 // indirect+ golang.org/x/term v0.19.0 // indirect)require (@@ -210,7 +211,6 @@ require (github.com/bytebase/tsql-parser v0.0.0-20231019070007-fc13b1c3c56dgithub.com/census-instrumentation/opencensus-proto v0.4.1 // indirectgithub.com/cespare/xxhash/v2 v2.2.0 // indirect- github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirectgithub.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirectgithub.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirectgithub.com/danjacques/gofslock v0.0.0-20220131014315-6e321f4509c8 // indirect@@ -294,12 +294,11 @@ require (go.opentelemetry.io/otel v1.24.0 // indirectgo.opentelemetry.io/otel/trace v1.24.0 // indirectgo.uber.org/atomic v1.11.0 // indirect- golang.org/x/net v0.22.0 // indirect+ golang.org/x/net v0.24.0 // indirectgolang.org/x/sync v0.6.0 // indirectgolang.org/x/time v0.5.0 // indirectgolang.org/x/tools v0.19.0 // indirectgolang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect- google.golang.org/appengine v1.6.8 // indirectgopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirectgopkg.in/square/go-jose.v2 v2.6.0 // indirectnhooyr.io/websocket v1.8.10 // indirectdiff --git a/go.sum b/go.sumindex 73127c12b8..22c275941c 100644--- a/go.sum+++ b/go.sum@@ -2,6 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTcloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM=cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4=+cloud.google.com/go/cloudsqlconn v1.9.0 h1:8SD1uVFIlf14zRYR37nOuU1GNFACl+2DV4QqHvulqn0=+cloud.google.com/go/cloudsqlconn v1.9.0/go.mod h1:v/iXjBaIicYodtSXpXGkImPf/4lCL/IZ4E5KWg67AWw=cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU=cloud.google.com/go/compute v1.25.1/go.mod h1:oopOIR53ly6viBYxaDhBfJwzUAxf1zE//uf3IB011ls=cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=@@ -198,9 +200,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkgithub.com/cloudfoundry/gosigar v1.3.6 h1:gIc08FbB3QPb+nAQhINIK/qhf5REKkY0FTGgRGXkcVc=github.com/cloudfoundry/gosigar v1.3.6/go.mod h1:lNWstu5g5gw59O09Y+wsMNFzBSnU8a0u+Sfx4dq360E=github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=-github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk=-github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=-github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ=github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM=github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=@@ -424,7 +423,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDgithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=@@ -616,8 +614,9 @@ github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=-github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU=github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=+github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA=+github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=github.com/jackc/pgx/v5 v5.5.5 h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw=github.com/jackc/pgx/v5 v5.5.5/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=@@ -1212,8 +1211,8 @@ golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQfgolang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ=-golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=-golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=+golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=+golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=@@ -1277,12 +1276,12 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=-golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=-golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=+golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=+golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=-golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI=-golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=+golang.org/x/oauth2 v0.19.0 h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg=+golang.org/x/oauth2 v0.19.0/go.mod h1:vYi7skDa1x015PmRRYZ7+s1cWyPgrPiSYRe4rnsexc8=golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=@@ -1355,8 +1354,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=-golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=-golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=+golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=+golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=@@ -1366,8 +1365,8 @@ golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=-golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=-golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=+golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=+golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=@@ -1431,8 +1430,6 @@ google.golang.org/api v0.172.0/go.mod h1:+fJZq6QXWfa9pXhnIzsjx4yI22d4aI9ZpLb58gvgoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=-google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=-google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=google.golang.org/genproto v0.0.0-20181004005441-af9cb2a35e7f/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=@@ -1447,8 +1444,8 @@ google.golang.org/genproto v0.0.0-20240325203815-454cdb8f5daa h1:ePqxpG3LVx+feAUgoogle.golang.org/genproto v0.0.0-20240325203815-454cdb8f5daa/go.mod h1:CnZenrTdRJb7jc+jOm0Rkywq+9wh0QC4U8tyiRbEPPM=google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa h1:Jt1XW5PaLXF1/ePZrznsh/aAUvI7Adfc3LY1dAKlzRs=google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa/go.mod h1:K4kfzHtI0kqWA79gecJarFtDn/Mls+GxQcg3Zox91Ac=-google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa h1:RBgMaUMP+6soRkik4VoN8ojR2nex2TqZwjSSogic+eo=-google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=+google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A=+google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=google.golang.org/grpc v0.0.0-20180607172857-7a6a684ca69e/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=@@ -1465,8 +1462,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=-google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=-google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=+google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=+google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=@@ -1478,7 +1475,6 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADgoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex ceacf4e5fd..e301141e02 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -8846,6 +8846,9 @@ components:Used for authentication when connecting to the data source.externalSecret:$ref: '#/components/schemas/DataSourceExternalSecret'+ authenticationType:+ type: integer+ format: enumDataSourceExternalSecret:type: objectproperties:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex aa3554568c..d2c2811893 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -91,6 +91,7 @@- [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption-SecretType)- [DataSourceExternalSecret.AuthType](#bytebase-store-DataSourceExternalSecret-AuthType)- [DataSourceExternalSecret.SecretType](#bytebase-store-DataSourceExternalSecret-SecretType)+ - [DataSourceOptions.AuthenticationType](#bytebase-store-DataSourceOptions-AuthenticationType)- [store/export_archive.proto](#store_export_archive-proto)- [ExportArchivePayload](#bytebase-store-ExportArchivePayload)@@ -1495,6 +1496,7 @@ Used internally for obfuscating the page token.| ssh_obfuscated_private_key | [string](#string) | | The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK"). || authentication_private_key_obfuscated | [string](#string) | | PKCS#8 private key in PEM format. If it's empty string, no private key is required. Used for authentication when connecting to the data source. || external_secret | [DataSourceExternalSecret](#bytebase-store-DataSourceExternalSecret) | | |+| authentication_type | [DataSourceOptions.AuthenticationType](#bytebase-store-DataSourceOptions-AuthenticationType) | | |@@ -1542,6 +1544,19 @@ Used internally for obfuscating the page token.| GCP_SECRET_MANAGER | 3 | ref: https://cloud.google.com/secret-manager/docs |++<a name="bytebase-store-DataSourceOptions-AuthenticationType"></a>++### DataSourceOptions.AuthenticationType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| PASSWORD | 1 | |+| GOOGLE_CLOUD_SQL_IAM | 2 | |++diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 970058263c..744597b3c4 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -524,6 +524,10 @@<a href="#bytebase.store.DataSourceExternalSecret.SecretType"><span class="badge">E</span>DataSourceExternalSecret.SecretType</a></li>+ <li>+ <a href="#bytebase.store.DataSourceOptions.AuthenticationType"><span class="badge">E</span>DataSourceOptions.AuthenticationType</a>+ </li>+</ul>@@ -4214,6 +4218,13 @@ Used for authentication when connecting to the data source. </p></td><td><p> </p></td></tr>+ <tr>+ <td>authentication_type</td>+ <td><a href="#bytebase.store.DataSourceOptions.AuthenticationType">DataSourceOptions.AuthenticationType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+</tbody></table>@@ -4316,6 +4327,35 @@ Used for authentication when connecting to the data source. </p></td></tbody></table>+ <h3 id="bytebase.store.DataSourceOptions.AuthenticationType">DataSourceOptions.AuthenticationType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AUTHENTICATION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PASSWORD</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>GOOGLE_CLOUD_SQL_IAM</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex ae3d28ed3c..75d2139757 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -81,6 +81,7 @@- [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest)- [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest)+ - [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType)- [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType)- [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType)- [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType)@@ -1461,6 +1462,7 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. || ssh_private_key | [string](#string) | | The private key to login the server. If it's empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK"). || authentication_private_key | [string](#string) | | PKCS#8 private key in PEM format. If it's empty string, no private key is required. Used for authentication when connecting to the data source. || external_secret | [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret) | | |+| authentication_type | [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType) | | |@@ -1775,6 +1777,19 @@ The instance's `name` field is used to identify the instance to update. Form+<a name="bytebase-v1-DataSource-AuthenticationType"></a>++### DataSource.AuthenticationType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| PASSWORD | 1 | |+| GOOGLE_CLOUD_SQL_IAM | 2 | |+++<a name="bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>### DataSourceExternalSecret.AppRoleAuthOption.SecretTypediff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 7186eb903a..a553dfc8fe 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -475,6 +475,10 @@</li>+ <li>+ <a href="#bytebase.v1.DataSource.AuthenticationType"><span class="badge">E</span>DataSource.AuthenticationType</a>+ </li>+<li><a href="#bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType"><span class="badge">E</span>DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></li>@@ -4777,6 +4781,13 @@ Used for authentication when connecting to the data source. </p></td><td><p> </p></td></tr>+ <tr>+ <td>authentication_type</td>+ <td><a href="#bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+</tbody></table>@@ -5488,6 +5499,35 @@ Format: instances/{instance} </p></td>+ <h3 id="bytebase.v1.DataSource.AuthenticationType">DataSource.AuthenticationType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AUTHENTICATION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PASSWORD</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>GOOGLE_CLOUD_SQL_IAM</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+<h3 id="bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3><p></p><table class="enum-table">diff --git a/proto/generated-go/store/data_source.pb.go b/proto/generated-go/store/data_source.pb.goindex 83a0fdfa8f..bf22215bb7 100644--- a/proto/generated-go/store/data_source.pb.go+++ b/proto/generated-go/store/data_source.pb.go@@ -175,6 +175,55 @@ func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) EnumDescriptor() ([return file_store_data_source_proto_rawDescGZIP(), []int{0, 0, 0}}+type DataSourceOptions_AuthenticationType int32++const (+ DataSourceOptions_AUTHENTICATION_UNSPECIFIED DataSourceOptions_AuthenticationType = 0+ DataSourceOptions_PASSWORD DataSourceOptions_AuthenticationType = 1+ DataSourceOptions_GOOGLE_CLOUD_SQL_IAM DataSourceOptions_AuthenticationType = 2+)++// Enum value maps for DataSourceOptions_AuthenticationType.+var (+ DataSourceOptions_AuthenticationType_name = map[int32]string{+ 0: "AUTHENTICATION_UNSPECIFIED",+ 1: "PASSWORD",+ 2: "GOOGLE_CLOUD_SQL_IAM",+ }+ DataSourceOptions_AuthenticationType_value = map[string]int32{+ "AUTHENTICATION_UNSPECIFIED": 0,+ "PASSWORD": 1,+ "GOOGLE_CLOUD_SQL_IAM": 2,+ }+)++func (x DataSourceOptions_AuthenticationType) Enum() *DataSourceOptions_AuthenticationType {+ p := new(DataSourceOptions_AuthenticationType)+ *p = x+ return p+}++func (x DataSourceOptions_AuthenticationType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSourceOptions_AuthenticationType) Descriptor() protoreflect.EnumDescriptor {+ return file_store_data_source_proto_enumTypes[3].Descriptor()+}++func (DataSourceOptions_AuthenticationType) Type() protoreflect.EnumType {+ return &file_store_data_source_proto_enumTypes[3]+}++func (x DataSourceOptions_AuthenticationType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSourceOptions_AuthenticationType.Descriptor instead.+func (DataSourceOptions_AuthenticationType) EnumDescriptor() ([]byte, []int) {+ return file_store_data_source_proto_rawDescGZIP(), []int{1, 0}+}+type DataSourceExternalSecret struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -332,8 +381,9 @@ type DataSourceOptions struct {SshObfuscatedPrivateKey string `protobuf:"bytes,9,opt,name=ssh_obfuscated_private_key,json=sshObfuscatedPrivateKey,proto3" json:"ssh_obfuscated_private_key,omitempty"`// PKCS#8 private key in PEM format. If it's empty string, no private key is required.// Used for authentication when connecting to the data source.- AuthenticationPrivateKeyObfuscated string `protobuf:"bytes,10,opt,name=authentication_private_key_obfuscated,json=authenticationPrivateKeyObfuscated,proto3" json:"authentication_private_key_obfuscated,omitempty"`- ExternalSecret *DataSourceExternalSecret `protobuf:"bytes,11,opt,name=external_secret,json=externalSecret,proto3" json:"external_secret,omitempty"`+ AuthenticationPrivateKeyObfuscated string `protobuf:"bytes,10,opt,name=authentication_private_key_obfuscated,json=authenticationPrivateKeyObfuscated,proto3" json:"authentication_private_key_obfuscated,omitempty"`+ ExternalSecret *DataSourceExternalSecret `protobuf:"bytes,11,opt,name=external_secret,json=externalSecret,proto3" json:"external_secret,omitempty"`+ AuthenticationType DataSourceOptions_AuthenticationType `protobuf:"varint,12,opt,name=authentication_type,json=authenticationType,proto3,enum=bytebase.store.DataSourceOptions_AuthenticationType" json:"authentication_type,omitempty"`}func (x *DataSourceOptions) Reset() {@@ -445,6 +495,13 @@ func (x *DataSourceOptions) GetExternalSecret() *DataSourceExternalSecret {return nil}+func (x *DataSourceOptions) GetAuthenticationType() DataSourceOptions_AuthenticationType {+ if x != nil {+ return x.AuthenticationType+ }+ return DataSourceOptions_AUTHENTICATION_UNSPECIFIED+}+type DataSourceExternalSecret_AppRoleAuthOption struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -579,7 +636,7 @@ var file_store_data_source_proto_rawDesc = []byte{0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,0x09, 0x0a, 0x05, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x41,0x55, 0x4c, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x10, 0x02, 0x42, 0x0d,- 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xff, 0x03,+ 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc4, 0x05,0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69,0x6f, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,0x52, 0x03, 0x73, 0x72, 0x76, 0x12, 0x37, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74,@@ -611,9 +668,22 @@ var file_store_data_source_proto_rawDesc = []byte{0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,0x65, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52,- 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x42,- 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12,+ 0x65, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,+ 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x61,+ 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,+ 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79,+ 0x70, 0x65, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69,+ 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x5c, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e,+ 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a,+ 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55,+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,+ 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x4f,+ 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x49,+ 0x41, 0x4d, 0x10, 0x02, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,+ 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,+ 0x6f, 0x33,}var (@@ -628,27 +698,29 @@ func file_store_data_source_proto_rawDescGZIP() []byte {return file_store_data_source_proto_rawDescData}-var file_store_data_source_proto_enumTypes = make([]protoimpl.EnumInfo, 3)+var file_store_data_source_proto_enumTypes = make([]protoimpl.EnumInfo, 4)var file_store_data_source_proto_msgTypes = make([]protoimpl.MessageInfo, 3)var file_store_data_source_proto_goTypes = []interface{}{(DataSourceExternalSecret_SecretType)(0), // 0: bytebase.store.DataSourceExternalSecret.SecretType(DataSourceExternalSecret_AuthType)(0), // 1: bytebase.store.DataSourceExternalSecret.AuthType(DataSourceExternalSecret_AppRoleAuthOption_SecretType)(0), // 2: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType- (*DataSourceExternalSecret)(nil), // 3: bytebase.store.DataSourceExternalSecret- (*DataSourceOptions)(nil), // 4: bytebase.store.DataSourceOptions- (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 5: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption+ (DataSourceOptions_AuthenticationType)(0), // 3: bytebase.store.DataSourceOptions.AuthenticationType+ (*DataSourceExternalSecret)(nil), // 4: bytebase.store.DataSourceExternalSecret+ (*DataSourceOptions)(nil), // 5: bytebase.store.DataSourceOptions+ (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 6: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption}var file_store_data_source_proto_depIdxs = []int32{0, // 0: bytebase.store.DataSourceExternalSecret.secret_type:type_name -> bytebase.store.DataSourceExternalSecret.SecretType1, // 1: bytebase.store.DataSourceExternalSecret.auth_type:type_name -> bytebase.store.DataSourceExternalSecret.AuthType- 5, // 2: bytebase.store.DataSourceExternalSecret.app_role:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption- 3, // 3: bytebase.store.DataSourceOptions.external_secret:type_name -> bytebase.store.DataSourceExternalSecret- 2, // 4: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType- 5, // [5:5] is the sub-list for method output_type- 5, // [5:5] is the sub-list for method input_type- 5, // [5:5] is the sub-list for extension type_name- 5, // [5:5] is the sub-list for extension extendee- 0, // [0:5] is the sub-list for field type_name+ 6, // 2: bytebase.store.DataSourceExternalSecret.app_role:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption+ 4, // 3: bytebase.store.DataSourceOptions.external_secret:type_name -> bytebase.store.DataSourceExternalSecret+ 3, // 4: bytebase.store.DataSourceOptions.authentication_type:type_name -> bytebase.store.DataSourceOptions.AuthenticationType+ 2, // 5: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ 6, // [6:6] is the sub-list for method output_type+ 6, // [6:6] is the sub-list for method input_type+ 6, // [6:6] is the sub-list for extension type_name+ 6, // [6:6] is the sub-list for extension extendee+ 0, // [0:6] is the sub-list for field type_name}func init() { file_store_data_source_proto_init() }@@ -703,7 +775,7 @@ func file_store_data_source_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_store_data_source_proto_rawDesc,- NumEnums: 3,+ NumEnums: 4,NumMessages: 3,NumExtensions: 0,NumServices: 0,diff --git a/proto/generated-go/v1/instance_service.pb.go b/proto/generated-go/v1/instance_service.pb.goindex 93179e88e0..3dd092daf2 100644--- a/proto/generated-go/v1/instance_service.pb.go+++ b/proto/generated-go/v1/instance_service.pb.go@@ -228,6 +228,55 @@ func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) EnumDescriptor() ([return file_v1_instance_service_proto_rawDescGZIP(), []int{19, 0, 0}}+type DataSource_AuthenticationType int32++const (+ DataSource_AUTHENTICATION_UNSPECIFIED DataSource_AuthenticationType = 0+ DataSource_PASSWORD DataSource_AuthenticationType = 1+ DataSource_GOOGLE_CLOUD_SQL_IAM DataSource_AuthenticationType = 2+)++// Enum value maps for DataSource_AuthenticationType.+var (+ DataSource_AuthenticationType_name = map[int32]string{+ 0: "AUTHENTICATION_UNSPECIFIED",+ 1: "PASSWORD",+ 2: "GOOGLE_CLOUD_SQL_IAM",+ }+ DataSource_AuthenticationType_value = map[string]int32{+ "AUTHENTICATION_UNSPECIFIED": 0,+ "PASSWORD": 1,+ "GOOGLE_CLOUD_SQL_IAM": 2,+ }+)++func (x DataSource_AuthenticationType) Enum() *DataSource_AuthenticationType {+ p := new(DataSource_AuthenticationType)+ *p = x+ return p+}++func (x DataSource_AuthenticationType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSource_AuthenticationType) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_instance_service_proto_enumTypes[4].Descriptor()+}++func (DataSource_AuthenticationType) Type() protoreflect.EnumType {+ return &file_v1_instance_service_proto_enumTypes[4]+}++func (x DataSource_AuthenticationType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSource_AuthenticationType.Descriptor instead.+func (DataSource_AuthenticationType) EnumDescriptor() ([]byte, []int) {+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 0}+}+type GetInstanceRequest struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -1561,8 +1610,9 @@ type DataSource struct {SshPrivateKey string `protobuf:"bytes,19,opt,name=ssh_private_key,json=sshPrivateKey,proto3" json:"ssh_private_key,omitempty"`// PKCS#8 private key in PEM format. If it's empty string, no private key is required.// Used for authentication when connecting to the data source.- AuthenticationPrivateKey string `protobuf:"bytes,20,opt,name=authentication_private_key,json=authenticationPrivateKey,proto3" json:"authentication_private_key,omitempty"`- ExternalSecret *DataSourceExternalSecret `protobuf:"bytes,21,opt,name=external_secret,json=externalSecret,proto3" json:"external_secret,omitempty"`+ AuthenticationPrivateKey string `protobuf:"bytes,20,opt,name=authentication_private_key,json=authenticationPrivateKey,proto3" json:"authentication_private_key,omitempty"`+ ExternalSecret *DataSourceExternalSecret `protobuf:"bytes,21,opt,name=external_secret,json=externalSecret,proto3" json:"external_secret,omitempty"`+ AuthenticationType DataSource_AuthenticationType `protobuf:"varint,22,opt,name=authentication_type,json=authenticationType,proto3,enum=bytebase.v1.DataSource_AuthenticationType" json:"authentication_type,omitempty"`}func (x *DataSource) Reset() {@@ -1744,6 +1794,13 @@ func (x *DataSource) GetExternalSecret() *DataSourceExternalSecret {return nil}+func (x *DataSource) GetAuthenticationType() DataSource_AuthenticationType {+ if x != nil {+ return x.AuthenticationType+ }+ return DataSource_AUTHENTICATION_UNSPECIFIED+}+type InstanceResource struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -2111,7 +2168,7 @@ var file_v1_instance_service_proto_rawDesc = []byte{0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x41, 0x55, 0x4c, 0x54,0x5f, 0x41, 0x50, 0x50, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x10, 0x02, 0x42, 0x0d, 0x0a, 0x0b, 0x61,- 0x75, 0x74, 0x68, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe1, 0x05, 0x0a, 0x0a, 0x44,+ 0x75, 0x74, 0x68, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x07, 0x0a, 0x0a, 0x44,0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x79, 0x70,0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,@@ -2157,141 +2214,153 @@ var file_v1_instance_service_proto_rawDesc = []byte{0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x0e,- 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0xdd,- 0x01, 0x0a, 0x10, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,- 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67,- 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06,- 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65,- 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03,- 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,- 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,- 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,- 0x65, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1e,- 0x0a, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,- 0x28, 0x08, 0x52, 0x0a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x47,- 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,- 0x12, 0x1b, 0x0a, 0x17, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f,- 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a,- 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44,- 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x32, 0x94, 0x0e, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0b, 0x47,- 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,- 0x63, 0x65, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73,- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x4c, 0x69,- 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e,- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,- 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,- 0x73, 0x65, 0x22, 0x3d, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x5a, 0x23, 0x12,- 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f,- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,- 0x65, 0x73, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,- 0x73, 0x12, 0xa9, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x5b,+ 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f,+ 0x75, 0x72, 0x63, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,+ 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74,+ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x5c, 0x0a, 0x12, 0x41,+ 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,+ 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54,+ 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,+ 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12,+ 0x18, 0x0a, 0x14, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x5f,+ 0x53, 0x51, 0x4c, 0x5f, 0x49, 0x41, 0x4d, 0x10, 0x02, 0x22, 0xdd, 0x01, 0x0a, 0x10, 0x49, 0x6e,+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14,+ 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,+ 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e,+ 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73,+ 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d,+ 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a,+ 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20,+ 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x64, 0x61,+ 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x63, 0x74,+ 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61,+ 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x47, 0x0a, 0x0e, 0x44, 0x61, 0x74,+ 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x44,+ 0x41, 0x54, 0x41, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49,+ 0x4e, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59,+ 0x10, 0x02, 0x32, 0x94, 0x0e, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53,+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73,+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x25, 0xda,+ 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76,+ 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,+ 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73,+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,+ 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74,+ 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0xda,+ 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x5a, 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,+ 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x0d, 0x2f,+ 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0xa9, 0x01, 0x0a,+ 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,+ 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,+ 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,- 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49,- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,- 0x22, 0x4b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x5a, 0x2a, 0x12, 0x28, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,- 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,- 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73,- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x77, 0x0a,- 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12,- 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72,- 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x2a, 0xda, 0x41, 0x08, 0x69,- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x08, 0x69,- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73,- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74,- 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e,- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x22, 0x48, 0xda, 0x41, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,- 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x2b, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x32, 0x1f, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d,- 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x73,- 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,- 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71,- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0xda, 0x41,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x76, 0x31,+ 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0xda, 0x41, 0x00,+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x5a, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70,+ 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a,+ 0x7d, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72,+ 0x63, 0x68, 0x12, 0x14, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,+ 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x77, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61,+ 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49,+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73,+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x2a, 0xda, 0x41, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,+ 0x63, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,+ 0x63, 0x65, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,+ 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74,+ 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22,+ 0x48, 0xda, 0x41, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x75, 0x70, 0x64,+ 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x08,+ 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x32, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69,+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73,+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x73, 0x0a, 0x0e, 0x44, 0x65, 0x6c,+ 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,+ 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,+ 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,+ 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7b,+ 0x0a, 0x10, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,+ 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22,+ 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f,+ 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x7b, 0x0a, 0x0c, 0x53,+ 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x20, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e,+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63,+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31,0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,- 0x2f, 0x2a, 0x7d, 0x12, 0x7b, 0x0a, 0x10, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49,- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e,- 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22,- 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61,- 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,- 0x12, 0x7b, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,- 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,- 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a,- 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x86, 0x01,- 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61,- 0x6e, 0x63, 0x65, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61,- 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79,- 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,- 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f,- 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x62, 0x61, 0x74,- 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x7e, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74,- 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75,- 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74,- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,- 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x76,- 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61,- 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76,- 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,- 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30,- 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,- 0x63, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a,- 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,- 0x12, 0x87, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53,- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f,- 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,- 0x63, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x32, 0x2b, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3d, 0x69, 0x6e, 0x73,- 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,- 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0xb1, 0x01, 0x0a, 0x0f, 0x53,- 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x23,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e,- 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x61, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x5b, 0x3a, 0x01, 0x2a, 0x5a, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x76, 0x31,- 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,- 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65,- 0x72, 0x69, 0x65, 0x73, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e,- 0x74, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73,- 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x42, 0x11,- 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76,- 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74,+ 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74,+ 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x73,+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82,+ 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e,+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x79, 0x6e,+ 0x63, 0x12, 0x7e, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72,+ 0x63, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x41, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x33, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e,+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73,+ 0x2f, 0x2a, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,+ 0x65, 0x12, 0x87, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61,+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53,+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61,+ 0x6e, 0x63, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b,+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3d, 0x69, 0x6e,+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76,+ 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x10,+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,+ 0x12, 0x24, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x36, 0x82,+ 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x32, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69,+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,+ 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x53,+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0xb1, 0x01, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6c,+ 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77,+ 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,+ 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5b, 0x3a, 0x01,+ 0x2a, 0x5a, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72,+ 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x3a,+ 0x73, 0x79, 0x6e, 0x63, 0x53, 0x6c, 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x22,+ 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x69, 0x6e, 0x73,+ 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x73, 0x79, 0x6e, 0x63, 0x53, 0x6c,+ 0x6f, 0x77, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e,+ 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,+ 0x6f, 0x74, 0x6f, 0x33,}var (@@ -2306,97 +2375,99 @@ func file_v1_instance_service_proto_rawDescGZIP() []byte {return file_v1_instance_service_proto_rawDescData}-var file_v1_instance_service_proto_enumTypes = make([]protoimpl.EnumInfo, 4)+var file_v1_instance_service_proto_enumTypes = make([]protoimpl.EnumInfo, 5)var file_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 23)var file_v1_instance_service_proto_goTypes = []interface{}{(DataSourceType)(0), // 0: bytebase.v1.DataSourceType(DataSourceExternalSecret_SecretType)(0), // 1: bytebase.v1.DataSourceExternalSecret.SecretType(DataSourceExternalSecret_AuthType)(0), // 2: bytebase.v1.DataSourceExternalSecret.AuthType(DataSourceExternalSecret_AppRoleAuthOption_SecretType)(0), // 3: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType- (*GetInstanceRequest)(nil), // 4: bytebase.v1.GetInstanceRequest- (*ListInstancesRequest)(nil), // 5: bytebase.v1.ListInstancesRequest- (*ListInstancesResponse)(nil), // 6: bytebase.v1.ListInstancesResponse- (*SearchInstancesRequest)(nil), // 7: bytebase.v1.SearchInstancesRequest- (*SearchInstancesResponse)(nil), // 8: bytebase.v1.SearchInstancesResponse- (*CreateInstanceRequest)(nil), // 9: bytebase.v1.CreateInstanceRequest- (*UpdateInstanceRequest)(nil), // 10: bytebase.v1.UpdateInstanceRequest- (*DeleteInstanceRequest)(nil), // 11: bytebase.v1.DeleteInstanceRequest- (*UndeleteInstanceRequest)(nil), // 12: bytebase.v1.UndeleteInstanceRequest- (*SyncInstanceRequest)(nil), // 13: bytebase.v1.SyncInstanceRequest- (*SyncInstanceResponse)(nil), // 14: bytebase.v1.SyncInstanceResponse- (*BatchSyncInstanceRequest)(nil), // 15: bytebase.v1.BatchSyncInstanceRequest- (*BatchSyncInstanceResponse)(nil), // 16: bytebase.v1.BatchSyncInstanceResponse- (*AddDataSourceRequest)(nil), // 17: bytebase.v1.AddDataSourceRequest- (*RemoveDataSourceRequest)(nil), // 18: bytebase.v1.RemoveDataSourceRequest- (*UpdateDataSourceRequest)(nil), // 19: bytebase.v1.UpdateDataSourceRequest- (*SyncSlowQueriesRequest)(nil), // 20: bytebase.v1.SyncSlowQueriesRequest- (*InstanceOptions)(nil), // 21: bytebase.v1.InstanceOptions- (*Instance)(nil), // 22: bytebase.v1.Instance- (*DataSourceExternalSecret)(nil), // 23: bytebase.v1.DataSourceExternalSecret- (*DataSource)(nil), // 24: bytebase.v1.DataSource- (*InstanceResource)(nil), // 25: bytebase.v1.InstanceResource- (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 26: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption- (*fieldmaskpb.FieldMask)(nil), // 27: google.protobuf.FieldMask- (*durationpb.Duration)(nil), // 28: google.protobuf.Duration- (State)(0), // 29: bytebase.v1.State- (Engine)(0), // 30: bytebase.v1.Engine- (*emptypb.Empty)(nil), // 31: google.protobuf.Empty+ (DataSource_AuthenticationType)(0), // 4: bytebase.v1.DataSource.AuthenticationType+ (*GetInstanceRequest)(nil), // 5: bytebase.v1.GetInstanceRequest+ (*ListInstancesRequest)(nil), // 6: bytebase.v1.ListInstancesRequest+ (*ListInstancesResponse)(nil), // 7: bytebase.v1.ListInstancesResponse+ (*SearchInstancesRequest)(nil), // 8: bytebase.v1.SearchInstancesRequest+ (*SearchInstancesResponse)(nil), // 9: bytebase.v1.SearchInstancesResponse+ (*CreateInstanceRequest)(nil), // 10: bytebase.v1.CreateInstanceRequest+ (*UpdateInstanceRequest)(nil), // 11: bytebase.v1.UpdateInstanceRequest+ (*DeleteInstanceRequest)(nil), // 12: bytebase.v1.DeleteInstanceRequest+ (*UndeleteInstanceRequest)(nil), // 13: bytebase.v1.UndeleteInstanceRequest+ (*SyncInstanceRequest)(nil), // 14: bytebase.v1.SyncInstanceRequest+ (*SyncInstanceResponse)(nil), // 15: bytebase.v1.SyncInstanceResponse+ (*BatchSyncInstanceRequest)(nil), // 16: bytebase.v1.BatchSyncInstanceRequest+ (*BatchSyncInstanceResponse)(nil), // 17: bytebase.v1.BatchSyncInstanceResponse+ (*AddDataSourceRequest)(nil), // 18: bytebase.v1.AddDataSourceRequest+ (*RemoveDataSourceRequest)(nil), // 19: bytebase.v1.RemoveDataSourceRequest+ (*UpdateDataSourceRequest)(nil), // 20: bytebase.v1.UpdateDataSourceRequest+ (*SyncSlowQueriesRequest)(nil), // 21: bytebase.v1.SyncSlowQueriesRequest+ (*InstanceOptions)(nil), // 22: bytebase.v1.InstanceOptions+ (*Instance)(nil), // 23: bytebase.v1.Instance+ (*DataSourceExternalSecret)(nil), // 24: bytebase.v1.DataSourceExternalSecret+ (*DataSource)(nil), // 25: bytebase.v1.DataSource+ (*InstanceResource)(nil), // 26: bytebase.v1.InstanceResource+ (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 27: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption+ (*fieldmaskpb.FieldMask)(nil), // 28: google.protobuf.FieldMask+ (*durationpb.Duration)(nil), // 29: google.protobuf.Duration+ (State)(0), // 30: bytebase.v1.State+ (Engine)(0), // 31: bytebase.v1.Engine+ (*emptypb.Empty)(nil), // 32: google.protobuf.Empty}var file_v1_instance_service_proto_depIdxs = []int32{- 22, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance- 22, // 1: bytebase.v1.SearchInstancesResponse.instances:type_name -> bytebase.v1.Instance- 22, // 2: bytebase.v1.CreateInstanceRequest.instance:type_name -> bytebase.v1.Instance- 22, // 3: bytebase.v1.UpdateInstanceRequest.instance:type_name -> bytebase.v1.Instance- 27, // 4: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask- 13, // 5: bytebase.v1.BatchSyncInstanceRequest.requests:type_name -> bytebase.v1.SyncInstanceRequest- 24, // 6: bytebase.v1.AddDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 24, // 7: bytebase.v1.RemoveDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 24, // 8: bytebase.v1.UpdateDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 27, // 9: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask- 28, // 10: bytebase.v1.InstanceOptions.sync_interval:type_name -> google.protobuf.Duration- 29, // 11: bytebase.v1.Instance.state:type_name -> bytebase.v1.State- 30, // 12: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine- 24, // 13: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource- 21, // 14: bytebase.v1.Instance.options:type_name -> bytebase.v1.InstanceOptions+ 23, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance+ 23, // 1: bytebase.v1.SearchInstancesResponse.instances:type_name -> bytebase.v1.Instance+ 23, // 2: bytebase.v1.CreateInstanceRequest.instance:type_name -> bytebase.v1.Instance+ 23, // 3: bytebase.v1.UpdateInstanceRequest.instance:type_name -> bytebase.v1.Instance+ 28, // 4: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask+ 14, // 5: bytebase.v1.BatchSyncInstanceRequest.requests:type_name -> bytebase.v1.SyncInstanceRequest+ 25, // 6: bytebase.v1.AddDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 25, // 7: bytebase.v1.RemoveDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 25, // 8: bytebase.v1.UpdateDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 28, // 9: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask+ 29, // 10: bytebase.v1.InstanceOptions.sync_interval:type_name -> google.protobuf.Duration+ 30, // 11: bytebase.v1.Instance.state:type_name -> bytebase.v1.State+ 31, // 12: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine+ 25, // 13: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource+ 22, // 14: bytebase.v1.Instance.options:type_name -> bytebase.v1.InstanceOptions1, // 15: bytebase.v1.DataSourceExternalSecret.secret_type:type_name -> bytebase.v1.DataSourceExternalSecret.SecretType2, // 16: bytebase.v1.DataSourceExternalSecret.auth_type:type_name -> bytebase.v1.DataSourceExternalSecret.AuthType- 26, // 17: bytebase.v1.DataSourceExternalSecret.app_role:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption+ 27, // 17: bytebase.v1.DataSourceExternalSecret.app_role:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption0, // 18: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType- 23, // 19: bytebase.v1.DataSource.external_secret:type_name -> bytebase.v1.DataSourceExternalSecret- 30, // 20: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine- 24, // 21: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource- 3, // 22: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType- 4, // 23: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest- 5, // 24: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest- 7, // 25: bytebase.v1.InstanceService.SearchInstances:input_type -> bytebase.v1.SearchInstancesRequest- 9, // 26: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest- 10, // 27: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest- 11, // 28: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest- 12, // 29: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest- 13, // 30: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest- 15, // 31: bytebase.v1.InstanceService.BatchSyncInstance:input_type -> bytebase.v1.BatchSyncInstanceRequest- 17, // 32: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest- 18, // 33: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest- 19, // 34: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest- 20, // 35: bytebase.v1.InstanceService.SyncSlowQueries:input_type -> bytebase.v1.SyncSlowQueriesRequest- 22, // 36: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance- 6, // 37: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse- 8, // 38: bytebase.v1.InstanceService.SearchInstances:output_type -> bytebase.v1.SearchInstancesResponse- 22, // 39: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance- 22, // 40: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance- 31, // 41: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty- 22, // 42: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance- 14, // 43: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse- 16, // 44: bytebase.v1.InstanceService.BatchSyncInstance:output_type -> bytebase.v1.BatchSyncInstanceResponse- 22, // 45: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance- 22, // 46: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance- 22, // 47: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance- 31, // 48: bytebase.v1.InstanceService.SyncSlowQueries:output_type -> google.protobuf.Empty- 36, // [36:49] is the sub-list for method output_type- 23, // [23:36] is the sub-list for method input_type- 23, // [23:23] is the sub-list for extension type_name- 23, // [23:23] is the sub-list for extension extendee- 0, // [0:23] is the sub-list for field type_name+ 24, // 19: bytebase.v1.DataSource.external_secret:type_name -> bytebase.v1.DataSourceExternalSecret+ 4, // 20: bytebase.v1.DataSource.authentication_type:type_name -> bytebase.v1.DataSource.AuthenticationType+ 31, // 21: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine+ 25, // 22: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource+ 3, // 23: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ 5, // 24: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest+ 6, // 25: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest+ 8, // 26: bytebase.v1.InstanceService.SearchInstances:input_type -> bytebase.v1.SearchInstancesRequest+ 10, // 27: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest+ 11, // 28: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest+ 12, // 29: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest+ 13, // 30: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest+ 14, // 31: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest+ 16, // 32: bytebase.v1.InstanceService.BatchSyncInstance:input_type -> bytebase.v1.BatchSyncInstanceRequest+ 18, // 33: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest+ 19, // 34: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest+ 20, // 35: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest+ 21, // 36: bytebase.v1.InstanceService.SyncSlowQueries:input_type -> bytebase.v1.SyncSlowQueriesRequest+ 23, // 37: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance+ 7, // 38: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse+ 9, // 39: bytebase.v1.InstanceService.SearchInstances:output_type -> bytebase.v1.SearchInstancesResponse+ 23, // 40: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance+ 23, // 41: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance+ 32, // 42: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty+ 23, // 43: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance+ 15, // 44: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse+ 17, // 45: bytebase.v1.InstanceService.BatchSyncInstance:output_type -> bytebase.v1.BatchSyncInstanceResponse+ 23, // 46: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance+ 23, // 47: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance+ 23, // 48: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance+ 32, // 49: bytebase.v1.InstanceService.SyncSlowQueries:output_type -> google.protobuf.Empty+ 37, // [37:50] is the sub-list for method output_type+ 24, // [24:37] is the sub-list for method input_type+ 24, // [24:24] is the sub-list for extension type_name+ 24, // [24:24] is the sub-list for extension extendee+ 0, // [0:24] is the sub-list for field type_name}func init() { file_v1_instance_service_proto_init() }@@ -2692,7 +2763,7 @@ func file_v1_instance_service_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_v1_instance_service_proto_rawDesc,- NumEnums: 4,+ NumEnums: 5,NumMessages: 23,NumExtensions: 0,NumServices: 1,diff --git a/proto/store/data_source.proto b/proto/store/data_source.protoindex ddee208f66..5b047dcaf3 100644--- a/proto/store/data_source.proto+++ b/proto/store/data_source.proto@@ -83,4 +83,12 @@ message DataSourceOptions {string authentication_private_key_obfuscated = 10;DataSourceExternalSecret external_secret = 11;++ enum AuthenticationType {+ AUTHENTICATION_UNSPECIFIED = 0;+ PASSWORD = 1;+ GOOGLE_CLOUD_SQL_IAM = 2;+ }++ AuthenticationType authentication_type = 12;}diff --git a/proto/v1/instance_service.proto b/proto/v1/instance_service.protoindex 5faa5691aa..428a0467d1 100644--- a/proto/v1/instance_service.proto+++ b/proto/v1/instance_service.proto@@ -396,6 +396,14 @@ message DataSource {string authentication_private_key = 20 [(google.api.field_behavior) = INPUT_ONLY];DataSourceExternalSecret external_secret = 21;++ enum AuthenticationType {+ AUTHENTICATION_UNSPECIFIED = 0;+ PASSWORD = 1;+ GOOGLE_CLOUD_SQL_IAM = 2;+ }++ AuthenticationType authentication_type = 22;}enum DataSourceType {