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: deprecate data source and move them to instance metadata (#15404)
Danny Xuf1441945e62f
diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.goindex 19ff2dc063..a9654169f6 100644--- a/backend/api/v1/database_service.go+++ b/backend/api/v1/database_service.go@@ -1212,7 +1212,7 @@ func (s *DatabaseService) convertToDatabase(ctx context.Context, database *storeif database.EffectiveEnvironmentID != "" {effectiveEnvironment = common.FormatEnvironment(database.EffectiveEnvironmentID)}- instanceResource, err := convertToInstanceResource(instance)+ instanceResource, err := convertInstanceMessageToInstanceResource(instance)if err != nil {return nil, err}diff --git a/backend/api/v1/instance_role_service.go b/backend/api/v1/instance_role_service.goindex 7266daced7..1ade9be1b1 100644--- a/backend/api/v1/instance_role_service.go+++ b/backend/api/v1/instance_role_service.go@@ -38,7 +38,7 @@ func (s *InstanceRoleService) ListInstanceRoles(ctx context.Context, request *v1if err != nil {return nil, status.Errorf(codes.Internal, "failed to get instance: %v", err)}- instanceRoles := convertToInstanceRoles(instance, instance.Metadata.GetRoles())+ instanceRoles := convertInstanceRoles(instance, instance.Metadata.GetRoles())return &v1pb.ListInstanceRolesResponse{Roles: instanceRoles,}, nildiff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.goindex 288c5fd897..03cda7558b 100644--- a/backend/api/v1/instance_service.go+++ b/backend/api/v1/instance_service.go@@ -64,7 +64,7 @@ func (s *InstanceService) GetInstance(ctx context.Context, request *v1pb.GetInstif err != nil {return nil, err}- return convertToInstance(instance)+ return convertInstanceMessage(instance)}// ListInstances lists all instances.@@ -78,7 +78,7 @@ func (s *InstanceService) ListInstances(ctx context.Context, request *v1pb.ListI}response := &v1pb.ListInstancesResponse{}for _, instance := range instances {- ins, err := convertToInstance(instance)+ ins, err := convertInstanceMessage(instance)if err != nil {return nil, err}@@ -97,7 +97,7 @@ func (s *InstanceService) ListInstanceDatabase(ctx context.Context, request *v1preturn nil, status.Error(codes.InvalidArgument, err.Error())}- if instanceMessage, err = s.convertToInstanceMessage(instanceID, request.Instance); err != nil {+ if instanceMessage, err = s.convertInstanceToInstanceMessage(instanceID, request.Instance); err != nil {return nil, status.Error(codes.InvalidArgument, err.Error())}} else {@@ -133,22 +133,22 @@ func (s *InstanceService) CreateInstance(ctx context.Context, request *v1pb.Creareturn nil, err}- instanceMessage, err := s.convertToInstanceMessage(request.InstanceId, request.Instance)+ instanceMessage, err := s.convertInstanceToInstanceMessage(request.InstanceId, request.Instance)if err != nil {return nil, status.Error(codes.InvalidArgument, err.Error())}// Test connection.if request.ValidateOnly {- for _, ds := range instanceMessage.DataSources {+ for _, ds := range instanceMessage.Metadata.GetDataSources() {err := func() error {- driver, err := s.dbFactory.GetDataSourceDriver(ctx, instanceMessage, ds, "", false /* datashare */, ds.Options.GetType() == storepb.DataSourceType_READ_ONLY, db.ConnectionContext{})+ driver, err := s.dbFactory.GetDataSourceDriver(ctx, instanceMessage, ds, "", false /* datashare */, ds.GetType() == storepb.DataSourceType_READ_ONLY, db.ConnectionContext{})if err != nil {return status.Errorf(codes.Internal, "failed to get database driver with error: %v", err.Error())}defer driver.Close(ctx)if err := driver.Ping(ctx); err != nil {- return status.Errorf(codes.InvalidArgument, "invalid datasource %s, error %s", ds.Options.GetType(), err)+ return status.Errorf(codes.InvalidArgument, "invalid datasource %s, error %s", ds.GetType(), err)}return nil}()@@ -157,7 +157,7 @@ func (s *InstanceService) CreateInstance(ctx context.Context, request *v1pb.Crea}}- return convertToInstance(instanceMessage)+ return convertInstanceMessage(instanceMessage)}instanceCountLimit := s.licenseService.GetInstanceLicenseCount(ctx)@@ -170,7 +170,7 @@ func (s *InstanceService) CreateInstance(ctx context.Context, request *v1pb.Crea}}- if err := s.checkInstanceDataSources(instanceMessage, instanceMessage.DataSources); err != nil {+ if err := s.checkInstanceDataSources(instanceMessage, instanceMessage.Metadata.GetDataSources()); err != nil {return nil, err}@@ -205,36 +205,36 @@ func (s *InstanceService) CreateInstance(ctx context.Context, request *v1pb.Crea},})- return convertToInstance(instance)+ return convertInstanceMessage(instance)}-func (s *InstanceService) checkInstanceDataSources(instance *store.InstanceMessage, dataSources []*store.DataSourceMessage) error {+func (s *InstanceService) checkInstanceDataSources(instance *store.InstanceMessage, dataSources []*storepb.DataSource) error {dsIDMap := map[string]bool{}for _, ds := range dataSources {if err := s.checkDataSource(instance, ds); err != nil {return err}- if dsIDMap[ds.Options.GetId()] {- return status.Errorf(codes.InvalidArgument, `duplicate data source id "%s"`, ds.Options.GetId())+ if dsIDMap[ds.GetId()] {+ return status.Errorf(codes.InvalidArgument, `duplicate data source id "%s"`, ds.GetId())}- dsIDMap[ds.Options.GetId()] = true+ dsIDMap[ds.GetId()] = true}return nil}-func (s *InstanceService) checkDataSource(instance *store.InstanceMessage, dataSource *store.DataSourceMessage) error {- if dataSource.Options.GetId() == "" {+func (s *InstanceService) checkDataSource(instance *store.InstanceMessage, dataSource *storepb.DataSource) error {+ if dataSource.GetId() == "" {return status.Errorf(codes.InvalidArgument, "data source id is required")}- password, err := common.Unobfuscate(dataSource.Options.GetObfuscatedPassword(), s.secret)+ password, err := common.Unobfuscate(dataSource.GetObfuscatedPassword(), s.secret)if err != nil {return status.Error(codes.Internal, err.Error())}if err := s.licenseService.IsFeatureEnabledForInstance(api.FeatureExternalSecretManager, instance); err != nil {missingFeatureError := status.Error(codes.PermissionDenied, err.Error())- if dataSource.Options.GetExternalSecret() != nil {+ if dataSource.GetExternalSecret() != nil {return missingFeatureError}if ok, _ := secret.GetExternalSecretURL(password); !ok {@@ -297,14 +297,14 @@ func (s *InstanceService) UpdateInstance(ctx context.Context, request *v1pb.Updacase "external_link":patch.ExternalLink = &request.Instance.ExternalLinkcase "data_sources":- datasources, err := s.convertToDataSourceMessages(request.Instance.DataSources)+ dataSources, err := s.convertV1DataSources(request.Instance.DataSources)if err != nil {return nil, status.Error(codes.InvalidArgument, err.Error())}- if err := s.checkInstanceDataSources(instance, datasources); err != nil {+ if err := s.checkInstanceDataSources(instance, dataSources); err != nil {return nil, err}- patch.DataSources = &datasources+ patch.Metadata.DataSources = dataSourcescase "activation":if request.Instance.Activation != instance.Activation {patch.Activation = &request.Instance.Activation@@ -343,7 +343,7 @@ func (s *InstanceService) UpdateInstance(ctx context.Context, request *v1pb.Updaif err != nil {return nil, status.Error(codes.Internal, err.Error())}- return convertToInstance(ins)+ return convertInstanceMessage(ins)}func (s *InstanceService) syncSlowQueriesForInstance(ctx context.Context, instanceName string) (*emptypb.Empty, error) {@@ -568,7 +568,7 @@ func (s *InstanceService) UndeleteInstance(ctx context.Context, request *v1pb.Unreturn nil, status.Error(codes.Internal, err.Error())}- return convertToInstance(ins)+ return convertInstanceMessage(ins)}// SyncInstance syncs the instance.@@ -635,7 +635,7 @@ func (s *InstanceService) AddDataSource(ctx context.Context, request *v1pb.AddDareturn nil, status.Errorf(codes.InvalidArgument, "only support adding read-only data source")}- dataSource, err := s.convertToDataSourceMessage(request.DataSource)+ dataSource, err := s.convertV1DataSource(request.DataSource)if err != nil {return nil, status.Errorf(codes.InvalidArgument, "failed to convert data source")}@@ -647,8 +647,8 @@ func (s *InstanceService) AddDataSource(ctx context.Context, request *v1pb.AddDaif instance.Deleted {return nil, status.Errorf(codes.NotFound, "instance %q has been deleted", request.Name)}- for _, ds := range instance.DataSources {- if ds.Options.GetId() == request.DataSource.Id {+ for _, ds := range instance.Metadata.GetDataSources() {+ if ds.GetId() == request.DataSource.Id {return nil, status.Errorf(codes.NotFound, "data source already exists with the same name")}}@@ -659,38 +659,40 @@ func (s *InstanceService) AddDataSource(ctx context.Context, request *v1pb.AddDa// Test connection.if request.ValidateOnly {err := func() error {- driver, err := s.dbFactory.GetDataSourceDriver(ctx, instance, dataSource, "", false /* datashare */, dataSource.Options.GetType() == storepb.DataSourceType_READ_ONLY, db.ConnectionContext{})+ driver, err := s.dbFactory.GetDataSourceDriver(ctx, instance, dataSource, "", false /* datashare */, dataSource.GetType() == storepb.DataSourceType_READ_ONLY, db.ConnectionContext{})if err != nil {return status.Errorf(codes.Internal, "failed to get database driver with error: %v", err.Error())}defer driver.Close(ctx)if err := driver.Ping(ctx); err != nil {- return status.Errorf(codes.InvalidArgument, "invalid datasource %s, error %s", dataSource.Options.GetType(), err)+ return status.Errorf(codes.InvalidArgument, "invalid datasource %s, error %s", dataSource.GetType(), err)}return nil}()if err != nil {return nil, err}- return convertToInstance(instance)+ return convertInstanceMessage(instance)}+ if dataSource.GetType() != storepb.DataSourceType_READ_ONLY {+ return nil, status.Error(codes.InvalidArgument, "only read-only data source can be added.")+ }if err := s.licenseService.IsFeatureEnabledForInstance(api.FeatureReadReplicaConnection, instance); err != nil {return nil, status.Error(codes.PermissionDenied, err.Error())}- if err := s.store.AddDataSourceToInstanceV2(ctx, instance.ResourceID, dataSource); err != nil {- return nil, status.Error(codes.Internal, err.Error())+ metadata, ok := proto.Clone(instance.Metadata).(*storepb.InstanceMetadata)+ if !ok {+ return nil, status.Error(codes.Internal, "failed to convert instance metadata type")}-- instance, err = s.store.GetInstanceV2(ctx, &store.FindInstanceMessage{- ResourceID: &instance.ResourceID,- })+ metadata.DataSources = append(metadata.DataSources, dataSource)+ instance, err = s.store.UpdateInstanceV2(ctx, &store.UpdateInstanceMessage{ResourceID: instance.ResourceID, Metadata: metadata}, -1)if err != nil {return nil, status.Error(codes.Internal, err.Error())}- return convertToInstance(instance)+ return convertInstanceMessage(instance)}// UpdateDataSource updates a data source of an instance.@@ -709,116 +711,107 @@ func (s *InstanceService) UpdateDataSource(ctx context.Context, request *v1pb.Upif instance.Deleted {return nil, status.Errorf(codes.NotFound, "instance %q has been deleted", request.Name)}- // We create a new variable dataSource to not modify existing data source in the memory.- var dataSource store.DataSourceMessage- found := false- for _, ds := range instance.DataSources {- if ds.Options.GetId() == request.DataSource.Id {- dataSource = *ds- found = true+ metadata, ok := proto.Clone(instance.Metadata).(*storepb.InstanceMetadata)+ if !ok {+ return nil, status.Error(codes.Internal, "failed to convert instance metadata type")+ }+ var dataSource *storepb.DataSource+ for _, ds := range metadata.GetDataSources() {+ if ds.GetId() == request.DataSource.Id {+ dataSource = dsbreak}}- if !found {+ if dataSource == nil {return nil, status.Errorf(codes.NotFound, `cannot found data source "%s"`, request.DataSource.Id)}- if dataSource.Options.GetType() == storepb.DataSourceType_READ_ONLY {+ if dataSource.GetType() == storepb.DataSourceType_READ_ONLY {if err := s.licenseService.IsFeatureEnabledForInstance(api.FeatureReadReplicaConnection, instance); err != nil {return nil, status.Error(codes.PermissionDenied, err.Error())}}- options, ok := proto.Clone(dataSource.Options).(*storepb.DataSourceOptions)- if !ok {- return nil, status.Errorf(codes.Internal, "failed to convert options type")- }- patch := &store.UpdateDataSourceMessage{- InstanceID: instance.ResourceID,- ID: request.DataSource.Id,- Options: options,- }-hasSSH := falsefor _, path := range request.UpdateMask.Paths {switch path {case "username":- patch.Options.Username = request.DataSource.Username+ dataSource.Username = request.DataSource.Usernamecase "password":- patch.Options.ObfuscatedPassword = common.Obfuscate(request.DataSource.Password, s.secret)+ dataSource.ObfuscatedPassword = common.Obfuscate(request.DataSource.Password, s.secret)case "ssl_ca":- patch.Options.ObfuscatedSslCa = common.Obfuscate(request.DataSource.SslCa, s.secret)+ dataSource.ObfuscatedSslCa = common.Obfuscate(request.DataSource.SslCa, s.secret)case "ssl_cert":- patch.Options.ObfuscatedSslCert = common.Obfuscate(request.DataSource.SslCert, s.secret)+ dataSource.ObfuscatedSslCert = common.Obfuscate(request.DataSource.SslCert, s.secret)case "ssl_key":- patch.Options.ObfuscatedSslKey = common.Obfuscate(request.DataSource.SslKey, s.secret)+ dataSource.ObfuscatedSslKey = common.Obfuscate(request.DataSource.SslKey, s.secret)case "host":- patch.Options.Host = request.DataSource.Host+ dataSource.Host = request.DataSource.Hostcase "port":- patch.Options.Port = request.DataSource.Port+ dataSource.Port = request.DataSource.Portcase "database":- patch.Options.Database = request.DataSource.Database+ dataSource.Database = request.DataSource.Databasecase "srv":- patch.Options.Srv = request.DataSource.Srv+ dataSource.Srv = request.DataSource.Srvcase "authentication_database":- patch.Options.AuthenticationDatabase = request.DataSource.AuthenticationDatabase+ dataSource.AuthenticationDatabase = request.DataSource.AuthenticationDatabasecase "sid":- patch.Options.Sid = request.DataSource.Sid+ dataSource.Sid = request.DataSource.Sidcase "service_name":- patch.Options.ServiceName = request.DataSource.ServiceName+ dataSource.ServiceName = request.DataSource.ServiceNamecase "ssh_host":- patch.Options.SshHost = request.DataSource.SshHost+ dataSource.SshHost = request.DataSource.SshHosthasSSH = truecase "ssh_port":- patch.Options.SshPort = request.DataSource.SshPort+ dataSource.SshPort = request.DataSource.SshPorthasSSH = truecase "ssh_user":- patch.Options.SshUser = request.DataSource.SshUser+ dataSource.SshUser = request.DataSource.SshUserhasSSH = truecase "ssh_password":- patch.Options.SshObfuscatedPassword = common.Obfuscate(request.DataSource.SshPassword, s.secret)+ dataSource.SshObfuscatedPassword = common.Obfuscate(request.DataSource.SshPassword, s.secret)hasSSH = truecase "ssh_private_key":- patch.Options.SshObfuscatedPrivateKey = common.Obfuscate(request.DataSource.SshPrivateKey, s.secret)+ dataSource.SshObfuscatedPrivateKey = common.Obfuscate(request.DataSource.SshPrivateKey, s.secret)hasSSH = truecase "authentication_private_key":- patch.Options.AuthenticationPrivateKeyObfuscated = common.Obfuscate(request.DataSource.AuthenticationPrivateKey, s.secret)+ dataSource.AuthenticationPrivateKeyObfuscated = common.Obfuscate(request.DataSource.AuthenticationPrivateKey, s.secret)case "external_secret":- externalSecret, err := convertToStoreDataSourceExternalSecret(request.DataSource.ExternalSecret)+ externalSecret, err := convertV1DataSourceExternalSecret(request.DataSource.ExternalSecret)if err != nil {return nil, err}- dataSource.Options.ExternalSecret = externalSecret+ dataSource.ExternalSecret = externalSecretcase "sasl_config":- patch.Options.SaslConfig = convertToStoreDataSourceSaslConfig(request.DataSource.SaslConfig)+ dataSource.SaslConfig = convertV1DataSourceSaslConfig(request.DataSource.SaslConfig)case "authentication_type":- dataSource.Options.AuthenticationType = convertToAuthenticationType(request.DataSource.AuthenticationType)+ dataSource.AuthenticationType = convertV1AuthenticationType(request.DataSource.AuthenticationType)case "additional_addresses":- dataSource.Options.AdditionalAddresses = convertToStoreAdditionalAddresses(request.DataSource.AdditionalAddresses)+ dataSource.AdditionalAddresses = convertAdditionalAddresses(request.DataSource.AdditionalAddresses)case "replica_set":- dataSource.Options.ReplicaSet = request.DataSource.ReplicaSet+ dataSource.ReplicaSet = request.DataSource.ReplicaSetcase "direct_connection":- dataSource.Options.DirectConnection = request.DataSource.DirectConnection+ dataSource.DirectConnection = request.DataSource.DirectConnectioncase "region":- dataSource.Options.Region = request.DataSource.Region+ dataSource.Region = request.DataSource.Regioncase "warehouse_id":- dataSource.Options.WarehouseId = request.DataSource.WarehouseId+ dataSource.WarehouseId = request.DataSource.WarehouseIdcase "use_ssl":- dataSource.Options.UseSsl = request.DataSource.UseSsl+ dataSource.UseSsl = request.DataSource.UseSslcase "redis_type":- dataSource.Options.RedisType = convertToStoreRedisType(request.DataSource.RedisType)+ dataSource.RedisType = convertV1RedisType(request.DataSource.RedisType)case "master_name":- dataSource.Options.MasterName = request.DataSource.MasterName+ dataSource.MasterName = request.DataSource.MasterNamecase "master_username":- dataSource.Options.MasterUsername = request.DataSource.MasterUsername+ dataSource.MasterUsername = request.DataSource.MasterUsernamecase "master_password":- dataSource.Options.MasterObfuscatedPassword = common.Obfuscate(request.DataSource.MasterPassword, s.secret)+ dataSource.MasterObfuscatedPassword = common.Obfuscate(request.DataSource.MasterPassword, s.secret)case "iam_extension":if v := request.DataSource.IamExtension; v != nil {switch v := v.(type) {case *v1pb.DataSource_ClientSecretCredential_:- patch.Options.IamExtension = &storepb.DataSourceOptions_ClientSecretCredential_{- ClientSecretCredential: convertToStoreClientSecretCredential(v.ClientSecretCredential),+ dataSource.IamExtension = &storepb.DataSource_ClientSecretCredential_{+ ClientSecretCredential: convertV1ClientSecretCredential(v.ClientSecretCredential),}default:}@@ -828,10 +821,9 @@ func (s *InstanceService) UpdateDataSource(ctx context.Context, request *v1pb.Up}}- if err := s.checkDataSource(instance, &dataSource); err != nil {+ if err := s.checkDataSource(instance, dataSource); err != nil {return nil, err}-if hasSSH {if err := s.licenseService.IsFeatureEnabledForInstance(api.FeatureInstanceSSHConnection, instance); err != nil {return nil, status.Error(codes.PermissionDenied, err.Error())@@ -841,34 +833,27 @@ func (s *InstanceService) UpdateDataSource(ctx context.Context, request *v1pb.Up// Test connection.if request.ValidateOnly {err := func() error {- driver, err := s.dbFactory.GetDataSourceDriver(ctx, instance, &dataSource, "", false /* datashare */, dataSource.Options.GetType() == storepb.DataSourceType_READ_ONLY, db.ConnectionContext{})+ driver, err := s.dbFactory.GetDataSourceDriver(ctx, instance, dataSource, "", false /* datashare */, dataSource.GetType() == storepb.DataSourceType_READ_ONLY, db.ConnectionContext{})if err != nil {return status.Errorf(codes.Internal, "failed to get database driver with error: %v", err.Error())}defer driver.Close(ctx)if err := driver.Ping(ctx); err != nil {- return status.Errorf(codes.InvalidArgument, "invalid datasource %s, error %s", dataSource.Options.GetType(), err)+ return status.Errorf(codes.InvalidArgument, "invalid datasource %s, error %s", dataSource.GetType(), err)}return nil}()if err != nil {return nil, err}- return convertToInstance(instance)+ return convertInstanceMessage(instance)}- if err := s.store.UpdateDataSourceV2(ctx, patch); err != nil {- return nil, status.Error(codes.Internal, err.Error())- }-- instance, err = s.store.GetInstanceV2(ctx, &store.FindInstanceMessage{- ResourceID: &instance.ResourceID,- })+ instance, err = s.store.UpdateInstanceV2(ctx, &store.UpdateInstanceMessage{ResourceID: instance.ResourceID, Metadata: metadata}, -1)if err != nil {return nil, status.Error(codes.Internal, err.Error())}-- return convertToInstance(instance)+ return convertInstanceMessage(instance)}// RemoveDataSource removes a data source to an instance.@@ -885,32 +870,30 @@ func (s *InstanceService) RemoveDataSource(ctx context.Context, request *v1pb.Rereturn nil, status.Errorf(codes.NotFound, "instance %q has been deleted", request.Name)}- // We create a new variable dataSource to not modify existing data source in the memory.- var dataSource store.DataSourceMessage- found := false- for _, ds := range instance.DataSources {- if ds.Options.GetId() == request.DataSource.Id {- dataSource = *ds- found = true- break+ metadata, ok := proto.Clone(instance.Metadata).(*storepb.InstanceMetadata)+ if !ok {+ return nil, status.Error(codes.Internal, "failed to convert instance metadata type")+ }+ var updatedDataSources []*storepb.DataSource+ var dataSource *storepb.DataSource+ for _, ds := range instance.Metadata.GetDataSources() {+ if ds.GetId() == request.DataSource.Id {+ dataSource = ds+ } else {+ updatedDataSources = append(updatedDataSources, ds)}}- if !found {+ if dataSource == nil {return nil, status.Errorf(codes.NotFound, "data source not found")}// We only support remove RO type datasource to instance now, see more details in instance_service.proto.- if dataSource.Options.GetType() != storepb.DataSourceType_READ_ONLY {+ if dataSource.GetType() != storepb.DataSourceType_READ_ONLY {return nil, status.Errorf(codes.InvalidArgument, "only support remove read-only data source")}- if err := s.store.RemoveDataSourceV2(ctx, instance.ResourceID, dataSource.Options.GetId()); err != nil {- return nil, status.Error(codes.Internal, err.Error())- }-- instance, err = s.store.GetInstanceV2(ctx, &store.FindInstanceMessage{- ResourceID: &instance.ResourceID,- })+ metadata.DataSources = updatedDataSources+ instance, err = s.store.UpdateInstanceV2(ctx, &store.UpdateInstanceMessage{ResourceID: instance.ResourceID, Metadata: metadata}, -1)if err != nil {return nil, status.Error(codes.Internal, err.Error())}@@ -922,7 +905,7 @@ func (s *InstanceService) RemoveDataSource(ctx context.Context, request *v1pb.Rereturn nil, status.Error(codes.Internal, err.Error())}- return convertToInstance(instance)+ return convertInstanceMessage(instance)}func (s *InstanceService) getProjectMessage(ctx context.Context, name string) (*store.ProjectMessage, error) {@@ -982,9 +965,9 @@ func buildEnvironmentName(environmentID string) string {return b.String()}-func convertToInstance(instance *store.InstanceMessage) (*v1pb.Instance, error) {+func convertInstanceMessage(instance *store.InstanceMessage) (*v1pb.Instance, error) {engine := convertToEngine(instance.Engine)- dataSourceList, err := convertToV1DataSources(instance.DataSources)+ dataSources, err := convertDataSources(instance.Metadata.GetDataSources())if err != nil {return nil, status.Errorf(codes.Internal, "failed to convert data source with error: %v", err.Error())}@@ -995,14 +978,14 @@ func convertToInstance(instance *store.InstanceMessage) (*v1pb.Instance, error)Engine: engine,EngineVersion: instance.EngineVersion,ExternalLink: instance.ExternalLink,- DataSources: dataSourceList,+ DataSources: dataSources,State: convertDeletedToState(instance.Deleted),Environment: buildEnvironmentName(instance.EnvironmentID),Activation: instance.Activation,SyncInterval: instance.Metadata.GetSyncInterval(),MaximumConnections: instance.Metadata.GetMaximumConnections(),SyncDatabases: instance.Metadata.GetSyncDatabases(),- Roles: convertToInstanceRoles(instance, instance.Metadata.GetRoles()),+ Roles: convertInstanceRoles(instance, instance.Metadata.GetRoles()),}, nil}@@ -1017,7 +1000,7 @@ func buildRoleName(b *strings.Builder, instanceID, roleName string) string {return b.String()}-func convertToInstanceRoles(instance *store.InstanceMessage, roles []*storepb.InstanceRole) []*v1pb.InstanceRole {+func convertInstanceRoles(instance *store.InstanceMessage, roles []*storepb.InstanceRole) []*v1pb.InstanceRole {var v1Roles []*v1pb.InstanceRolevar b strings.Builder@@ -1034,8 +1017,8 @@ func convertToInstanceRoles(instance *store.InstanceMessage, roles []*storepb.Inreturn v1Roles}-func (s *InstanceService) convertToInstanceMessage(instanceID string, instance *v1pb.Instance) (*store.InstanceMessage, error) {- datasources, err := s.convertToDataSourceMessages(instance.DataSources)+func (s *InstanceService) convertInstanceToInstanceMessage(instanceID string, instance *v1pb.Instance) (*store.InstanceMessage, error) {+ datasources, err := s.convertV1DataSources(instance.DataSources)if err != nil {return nil, err}@@ -1049,10 +1032,10 @@ func (s *InstanceService) convertToInstanceMessage(instanceID string, instance *Title: instance.Title,Engine: convertEngine(instance.Engine),ExternalLink: instance.ExternalLink,- DataSources: datasources,EnvironmentID: environmentID,Activation: instance.Activation,Metadata: &storepb.InstanceMetadata{+ DataSources: datasources,SyncInterval: instance.GetSyncInterval(),MaximumConnections: instance.GetMaximumConnections(),SyncDatabases: instance.GetSyncDatabases(),@@ -1060,8 +1043,8 @@ func (s *InstanceService) convertToInstanceMessage(instanceID string, instance *}, nil}-func convertToInstanceResource(instanceMessage *store.InstanceMessage) (*v1pb.InstanceResource, error) {- instance, err := convertToInstance(instanceMessage)+func convertInstanceMessageToInstanceResource(instanceMessage *store.InstanceMessage) (*v1pb.InstanceResource, error) {+ instance, err := convertInstanceMessage(instanceMessage)if err != nil {return nil, err}@@ -1076,20 +1059,20 @@ func convertToInstanceResource(instanceMessage *store.InstanceMessage) (*v1pb.In}, nil}-func (s *InstanceService) convertToDataSourceMessages(dataSources []*v1pb.DataSource) ([]*store.DataSourceMessage, error) {- var datasources []*store.DataSourceMessage+func (s *InstanceService) convertV1DataSources(dataSources []*v1pb.DataSource) ([]*storepb.DataSource, error) {+ var values []*storepb.DataSourcefor _, ds := range dataSources {- dataSource, err := s.convertToDataSourceMessage(ds)+ dataSource, err := s.convertV1DataSource(ds)if err != nil {return nil, err}- datasources = append(datasources, dataSource)+ values = append(values, dataSource)}- return datasources, nil+ return values, nil}-func convertToV1DataSourceExternalSecret(externalSecret *storepb.DataSourceExternalSecret) (*v1pb.DataSourceExternalSecret, error) {+func convertDataSourceExternalSecret(externalSecret *storepb.DataSourceExternalSecret) (*v1pb.DataSourceExternalSecret, error) {if externalSecret == nil {return nil, nil}@@ -1126,16 +1109,16 @@ func convertToV1DataSourceExternalSecret(externalSecret *storepb.DataSourceExterreturn resp, nil}-func convertToV1DataSources(dataSources []*store.DataSourceMessage) ([]*v1pb.DataSource, error) {- dataSourceList := []*v1pb.DataSource{}+func convertDataSources(dataSources []*storepb.DataSource) ([]*v1pb.DataSource, error) {+ var v1DataSources []*v1pb.DataSourcefor _, ds := range dataSources {- externalSecret, err := convertToV1DataSourceExternalSecret(ds.Options.GetExternalSecret())+ externalSecret, err := convertDataSourceExternalSecret(ds.GetExternalSecret())if err != nil {return nil, err}dataSourceType := v1pb.DataSourceType_DATA_SOURCE_UNSPECIFIED- switch ds.Options.GetType() {+ switch ds.GetType() {case storepb.DataSourceType_ADMIN:dataSourceType = v1pb.DataSourceType_ADMINcase storepb.DataSourceType_READ_ONLY:@@ -1143,55 +1126,55 @@ func convertToV1DataSources(dataSources []*store.DataSourceMessage) ([]*v1pb.Dat}authenticationType := v1pb.DataSource_AUTHENTICATION_UNSPECIFIED- switch ds.Options.GetAuthenticationType() {- case storepb.DataSourceOptions_AUTHENTICATION_UNSPECIFIED, storepb.DataSourceOptions_PASSWORD:+ switch ds.GetAuthenticationType() {+ case storepb.DataSource_AUTHENTICATION_UNSPECIFIED, storepb.DataSource_PASSWORD:authenticationType = v1pb.DataSource_PASSWORD- case storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM:+ case storepb.DataSource_GOOGLE_CLOUD_SQL_IAM:authenticationType = v1pb.DataSource_GOOGLE_CLOUD_SQL_IAM- case storepb.DataSourceOptions_AWS_RDS_IAM:+ case storepb.DataSource_AWS_RDS_IAM:authenticationType = v1pb.DataSource_AWS_RDS_IAM- case storepb.DataSourceOptions_AZURE_IAM:+ case storepb.DataSource_AZURE_IAM:authenticationType = v1pb.DataSource_AZURE_IAM}dataSource := &v1pb.DataSource{- Id: ds.Options.GetId(),+ Id: ds.GetId(),Type: dataSourceType,- Username: ds.Options.GetUsername(),+ Username: ds.GetUsername(),// We don't return the password and SSLs on reads.- Host: ds.Options.GetHost(),- Port: ds.Options.GetPort(),- Database: ds.Options.GetDatabase(),- Srv: ds.Options.GetSrv(),- AuthenticationDatabase: ds.Options.GetAuthenticationDatabase(),- Sid: ds.Options.GetSid(),- ServiceName: ds.Options.GetServiceName(),+ Host: ds.GetHost(),+ Port: ds.GetPort(),+ Database: ds.GetDatabase(),+ Srv: ds.GetSrv(),+ AuthenticationDatabase: ds.GetAuthenticationDatabase(),+ Sid: ds.GetSid(),+ ServiceName: ds.GetServiceName(),ExternalSecret: externalSecret,AuthenticationType: authenticationType,- SaslConfig: convertToV1DataSourceSaslConfig(ds.Options.GetSaslConfig()),- AdditionalAddresses: convertToV1DataSourceAddresses(ds.Options.GetAdditionalAddresses()),- ReplicaSet: ds.Options.GetReplicaSet(),- DirectConnection: ds.Options.GetDirectConnection(),- Region: ds.Options.GetRegion(),- WarehouseId: ds.Options.GetWarehouseId(),- UseSsl: ds.Options.GetUseSsl(),- RedisType: convertToV1RedisType(ds.Options.GetRedisType()),- MasterName: ds.Options.GetMasterName(),- MasterUsername: ds.Options.GetMasterUsername(),+ SaslConfig: convertDataSourceSaslConfig(ds.GetSaslConfig()),+ AdditionalAddresses: convertDataSourceAddresses(ds.GetAdditionalAddresses()),+ ReplicaSet: ds.GetReplicaSet(),+ DirectConnection: ds.GetDirectConnection(),+ Region: ds.GetRegion(),+ WarehouseId: ds.GetWarehouseId(),+ UseSsl: ds.GetUseSsl(),+ RedisType: convertRedisType(ds.GetRedisType()),+ MasterName: ds.GetMasterName(),+ MasterUsername: ds.GetMasterUsername(),}- if clientSecretCredential := convertToV1ClientSecretCredential(ds.Options.GetClientSecretCredential()); clientSecretCredential != nil {+ if clientSecretCredential := convertClientSecretCredential(ds.GetClientSecretCredential()); clientSecretCredential != nil {dataSource.IamExtension = &v1pb.DataSource_ClientSecretCredential_{ClientSecretCredential: clientSecretCredential,}}- dataSourceList = append(dataSourceList, dataSource)+ v1DataSources = append(v1DataSources, dataSource)}- return dataSourceList, nil+ return v1DataSources, nil}-func convertToV1ClientSecretCredential(clientSecretCredential *storepb.DataSourceOptions_ClientSecretCredential) *v1pb.DataSource_ClientSecretCredential {+func convertClientSecretCredential(clientSecretCredential *storepb.DataSource_ClientSecretCredential) *v1pb.DataSource_ClientSecretCredential {if clientSecretCredential == nil {return nil}@@ -1202,7 +1185,7 @@ func convertToV1ClientSecretCredential(clientSecretCredential *storepb.DataSourc}}-func convertToStoreDataSourceExternalSecret(externalSecret *v1pb.DataSourceExternalSecret) (*storepb.DataSourceExternalSecret, error) {+func convertV1DataSourceExternalSecret(externalSecret *v1pb.DataSourceExternalSecret) (*storepb.DataSourceExternalSecret, error) {if externalSecret == nil {return nil, nil}@@ -1245,7 +1228,7 @@ func convertToStoreDataSourceExternalSecret(externalSecret *v1pb.DataSourceExterreturn secret, nil}-func convertToStoreDataSourceSaslConfig(saslConfig *v1pb.SASLConfig) *storepb.SASLConfig {+func convertV1DataSourceSaslConfig(saslConfig *v1pb.SASLConfig) *storepb.SASLConfig {if saslConfig == nil {return nil}@@ -1269,7 +1252,7 @@ func convertToStoreDataSourceSaslConfig(saslConfig *v1pb.SASLConfig) *storepb.SAreturn storeSaslConfig}-func convertToV1DataSourceSaslConfig(saslConfig *storepb.SASLConfig) *v1pb.SASLConfig {+func convertDataSourceSaslConfig(saslConfig *storepb.SASLConfig) *v1pb.SASLConfig {if saslConfig == nil {return nil}@@ -1293,7 +1276,7 @@ func convertToV1DataSourceSaslConfig(saslConfig *storepb.SASLConfig) *v1pb.SASLCreturn storeSaslConfig}-func convertToV1DataSourceAddresses(addresses []*storepb.DataSourceOptions_Address) []*v1pb.DataSource_Address {+func convertDataSourceAddresses(addresses []*storepb.DataSource_Address) []*v1pb.DataSource_Address {res := make([]*v1pb.DataSource_Address, 0, len(addresses))for _, address := range addresses {res = append(res, &v1pb.DataSource_Address{@@ -1304,10 +1287,10 @@ func convertToV1DataSourceAddresses(addresses []*storepb.DataSourceOptions_Addrereturn res}-func convertToStoreAdditionalAddresses(addresses []*v1pb.DataSource_Address) []*storepb.DataSourceOptions_Address {- res := make([]*storepb.DataSourceOptions_Address, 0, len(addresses))+func convertAdditionalAddresses(addresses []*v1pb.DataSource_Address) []*storepb.DataSource_Address {+ res := make([]*storepb.DataSource_Address, 0, len(addresses))for _, address := range addresses {- res = append(res, &storepb.DataSourceOptions_Address{+ res = append(res, &storepb.DataSource_Address{Host: address.Host,Port: address.Port,})@@ -1315,110 +1298,119 @@ func convertToStoreAdditionalAddresses(addresses []*v1pb.DataSource_Address) []*return res}-func convertToAuthenticationType(authType v1pb.DataSource_AuthenticationType) storepb.DataSourceOptions_AuthenticationType {- authenticationType := storepb.DataSourceOptions_AUTHENTICATION_UNSPECIFIED+func convertV1AuthenticationType(authType v1pb.DataSource_AuthenticationType) storepb.DataSource_AuthenticationType {+ authenticationType := storepb.DataSource_AUTHENTICATION_UNSPECIFIEDswitch authType {case v1pb.DataSource_AUTHENTICATION_UNSPECIFIED, v1pb.DataSource_PASSWORD:- authenticationType = storepb.DataSourceOptions_PASSWORD+ authenticationType = storepb.DataSource_PASSWORDcase v1pb.DataSource_GOOGLE_CLOUD_SQL_IAM:- authenticationType = storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM+ authenticationType = storepb.DataSource_GOOGLE_CLOUD_SQL_IAMcase v1pb.DataSource_AWS_RDS_IAM:- authenticationType = storepb.DataSourceOptions_AWS_RDS_IAM+ authenticationType = storepb.DataSource_AWS_RDS_IAMcase v1pb.DataSource_AZURE_IAM:- authenticationType = storepb.DataSourceOptions_AZURE_IAM+ authenticationType = storepb.DataSource_AZURE_IAM}return authenticationType}-func convertToStoreRedisType(redisType v1pb.DataSource_RedisType) storepb.DataSourceOptions_RedisType {- authenticationType := storepb.DataSourceOptions_REDIS_TYPE_UNSPECIFIED+func convertV1RedisType(redisType v1pb.DataSource_RedisType) storepb.DataSource_RedisType {+ authenticationType := storepb.DataSource_REDIS_TYPE_UNSPECIFIEDswitch redisType {case v1pb.DataSource_STANDALONE:- authenticationType = storepb.DataSourceOptions_STANDALONE+ authenticationType = storepb.DataSource_STANDALONEcase v1pb.DataSource_SENTINEL:- authenticationType = storepb.DataSourceOptions_SENTINEL+ authenticationType = storepb.DataSource_SENTINELcase v1pb.DataSource_CLUSTER:- authenticationType = storepb.DataSourceOptions_CLUSTER+ authenticationType = storepb.DataSource_CLUSTER}return authenticationType}-func convertToV1RedisType(redisType storepb.DataSourceOptions_RedisType) v1pb.DataSource_RedisType {+func convertRedisType(redisType storepb.DataSource_RedisType) v1pb.DataSource_RedisType {authenticationType := v1pb.DataSource_STANDALONEswitch redisType {- case storepb.DataSourceOptions_STANDALONE:+ case storepb.DataSource_STANDALONE:authenticationType = v1pb.DataSource_STANDALONE- case storepb.DataSourceOptions_SENTINEL:+ case storepb.DataSource_SENTINEL:authenticationType = v1pb.DataSource_SENTINEL- case storepb.DataSourceOptions_CLUSTER:+ case storepb.DataSource_CLUSTER:authenticationType = v1pb.DataSource_CLUSTER}return authenticationType}-func (s *InstanceService) convertToDataSourceMessage(dataSource *v1pb.DataSource) (*store.DataSourceMessage, error) {- dsType, err := convertDataSourceTp(dataSource.Type)+func (s *InstanceService) convertV1DataSource(dataSource *v1pb.DataSource) (*storepb.DataSource, error) {+ dsType, err := convertV1DataSourceType(dataSource.Type)if err != nil {return nil, err}- externalSecret, err := convertToStoreDataSourceExternalSecret(dataSource.ExternalSecret)+ externalSecret, err := convertV1DataSourceExternalSecret(dataSource.ExternalSecret)if err != nil {return nil, err}- saslConfig := convertToStoreDataSourceSaslConfig(dataSource.SaslConfig)- clientSecretCredential := convertToStoreClientSecretCredential(dataSource.GetClientSecretCredential())-- return &store.DataSourceMessage{- Options: &storepb.DataSourceOptions{- Id: dataSource.Id,- Type: dsType,- Username: dataSource.Username,- ObfuscatedPassword: common.Obfuscate(dataSource.Password, s.secret),- ObfuscatedSslCa: common.Obfuscate(dataSource.SslCa, s.secret),- ObfuscatedSslCert: common.Obfuscate(dataSource.SslCert, s.secret),- ObfuscatedSslKey: common.Obfuscate(dataSource.SslKey, s.secret),- Host: dataSource.Host,- Port: dataSource.Port,- Database: dataSource.Database,- Srv: dataSource.Srv,- AuthenticationDatabase: dataSource.AuthenticationDatabase,- Sid: dataSource.Sid,- ServiceName: dataSource.ServiceName,- SshHost: dataSource.SshHost,- SshPort: dataSource.SshPort,- SshUser: dataSource.SshUser,- SshObfuscatedPassword: common.Obfuscate(dataSource.SshPassword, s.secret),- SshObfuscatedPrivateKey: common.Obfuscate(dataSource.SshPrivateKey, s.secret),- AuthenticationPrivateKeyObfuscated: common.Obfuscate(dataSource.AuthenticationPrivateKey, s.secret),- ExternalSecret: externalSecret,- SaslConfig: saslConfig,- AuthenticationType: convertToAuthenticationType(dataSource.AuthenticationType),- AdditionalAddresses: convertToStoreAdditionalAddresses(dataSource.AdditionalAddresses),- ReplicaSet: dataSource.ReplicaSet,- DirectConnection: dataSource.DirectConnection,- Region: dataSource.Region,- WarehouseId: dataSource.WarehouseId,- UseSsl: dataSource.UseSsl,- RedisType: convertToStoreRedisType(dataSource.RedisType),- MasterName: dataSource.MasterName,- MasterUsername: dataSource.MasterUsername,- MasterObfuscatedPassword: common.Obfuscate(dataSource.MasterPassword, s.secret),- IamExtension: &storepb.DataSourceOptions_ClientSecretCredential_{ClientSecretCredential: clientSecretCredential},- },+ saslConfig := convertV1DataSourceSaslConfig(dataSource.SaslConfig)+ clientSecretCredential := convertV1ClientSecretCredential(dataSource.GetClientSecretCredential())++ return &storepb.DataSource{+ Id: dataSource.Id,+ Type: dsType,+ Username: dataSource.Username,+ ObfuscatedPassword: common.Obfuscate(dataSource.Password, s.secret),+ ObfuscatedSslCa: common.Obfuscate(dataSource.SslCa, s.secret),+ ObfuscatedSslCert: common.Obfuscate(dataSource.SslCert, s.secret),+ ObfuscatedSslKey: common.Obfuscate(dataSource.SslKey, s.secret),+ Host: dataSource.Host,+ Port: dataSource.Port,+ Database: dataSource.Database,+ Srv: dataSource.Srv,+ AuthenticationDatabase: dataSource.AuthenticationDatabase,+ Sid: dataSource.Sid,+ ServiceName: dataSource.ServiceName,+ SshHost: dataSource.SshHost,+ SshPort: dataSource.SshPort,+ SshUser: dataSource.SshUser,+ SshObfuscatedPassword: common.Obfuscate(dataSource.SshPassword, s.secret),+ SshObfuscatedPrivateKey: common.Obfuscate(dataSource.SshPrivateKey, s.secret),+ AuthenticationPrivateKeyObfuscated: common.Obfuscate(dataSource.AuthenticationPrivateKey, s.secret),+ ExternalSecret: externalSecret,+ SaslConfig: saslConfig,+ AuthenticationType: convertV1AuthenticationType(dataSource.AuthenticationType),+ AdditionalAddresses: convertAdditionalAddresses(dataSource.AdditionalAddresses),+ ReplicaSet: dataSource.ReplicaSet,+ DirectConnection: dataSource.DirectConnection,+ Region: dataSource.Region,+ WarehouseId: dataSource.WarehouseId,+ UseSsl: dataSource.UseSsl,+ RedisType: convertV1RedisType(dataSource.RedisType),+ MasterName: dataSource.MasterName,+ MasterUsername: dataSource.MasterUsername,+ MasterObfuscatedPassword: common.Obfuscate(dataSource.MasterPassword, s.secret),+ IamExtension: &storepb.DataSource_ClientSecretCredential_{ClientSecretCredential: clientSecretCredential},}, nil}-func convertToStoreClientSecretCredential(credential *v1pb.DataSource_ClientSecretCredential) *storepb.DataSourceOptions_ClientSecretCredential {+func convertV1ClientSecretCredential(credential *v1pb.DataSource_ClientSecretCredential) *storepb.DataSource_ClientSecretCredential {if credential == nil {return nil}- return &storepb.DataSourceOptions_ClientSecretCredential{+ return &storepb.DataSource_ClientSecretCredential{TenantId: credential.TenantId,ClientId: credential.ClientId,ClientSecret: credential.ClientSecret,}}+func convertV1DataSourceType(tp v1pb.DataSourceType) (storepb.DataSourceType, error) {+ switch tp {+ case v1pb.DataSourceType_READ_ONLY:+ return storepb.DataSourceType_READ_ONLY, nil+ case v1pb.DataSourceType_ADMIN:+ return storepb.DataSourceType_ADMIN, nil+ default:+ return storepb.DataSourceType_DATA_SOURCE_UNSPECIFIED, errors.Errorf("invalid data source type %v", tp)+ }+}+func (s *InstanceService) instanceCountGuard(ctx context.Context) error {instanceLimit := s.licenseService.GetPlanLimitValue(ctx, enterprise.PlanLimitMaximumInstance)@@ -1432,14 +1424,3 @@ func (s *InstanceService) instanceCountGuard(ctx context.Context) error {return nil}--func convertDataSourceTp(tp v1pb.DataSourceType) (storepb.DataSourceType, error) {- switch tp {- case v1pb.DataSourceType_READ_ONLY:- return storepb.DataSourceType_READ_ONLY, nil- case v1pb.DataSourceType_ADMIN:- return storepb.DataSourceType_ADMIN, nil- default:- return storepb.DataSourceType_DATA_SOURCE_UNSPECIFIED, errors.Errorf("invalid data source type %v", tp)- }-}diff --git a/backend/api/v1/rollout_service_task.go b/backend/api/v1/rollout_service_task.goindex 590e6b3e8f..78f2f7d418 100644--- a/backend/api/v1/rollout_service_task.go+++ b/backend/api/v1/rollout_service_task.go@@ -220,7 +220,7 @@ func getTaskCreatesFromCreateDatabaseConfig(ctx context.Context, s *store.Store,}}- statement, err := getCreateDatabaseStatement(instance.Engine, c, databaseName, adminDataSource.Options.GetUsername())+ statement, err := getCreateDatabaseStatement(instance.Engine, c, databaseName, adminDataSource.GetUsername())if err != nil {return nil, err}diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.goindex 23a481ebc7..d26e1ec671 100644--- a/backend/api/v1/sql_service.go+++ b/backend/api/v1/sql_service.go@@ -193,7 +193,7 @@ func (s *SQLService) Query(ctx context.Context, request *v1pb.QueryRequest) (*v1if err != nil {return nil, err}- driver, err := s.dbFactory.GetDataSourceDriver(ctx, instance, dataSource, database.DatabaseName, database.Metadata.GetDatashare(), dataSource.Options.GetType() == storepb.DataSourceType_READ_ONLY, db.ConnectionContext{})+ driver, err := s.dbFactory.GetDataSourceDriver(ctx, instance, dataSource, database.DatabaseName, database.Metadata.GetDatashare(), dataSource.GetType() == storepb.DataSourceType_READ_ONLY, db.ConnectionContext{})if err != nil {return nil, status.Errorf(codes.Internal, "failed to get database driver: %v", err)}@@ -1081,13 +1081,13 @@ func BuildGetLinkedDatabaseMetadataFunc(storeInstance *store.Store, engine storereturn "", "", nil, err}for _, database := range databaseList {- instanceMeta, err := storeInstance.GetInstanceV2(ctx, &store.FindInstanceMessage{ResourceID: &database.InstanceID})+ instance, err := storeInstance.GetInstanceV2(ctx, &store.FindInstanceMessage{ResourceID: &database.InstanceID})if err != nil {return "", "", nil, err}- if instanceMeta != nil {- for _, dataSource := range instanceMeta.DataSources {- if strings.Contains(linkedMeta.GetHost(), dataSource.Options.GetHost()) {+ if instance != nil {+ for _, dataSource := range instance.Metadata.DataSources {+ if strings.Contains(linkedMeta.GetHost(), dataSource.GetHost()) {linkedDatabase = databasebreak}@@ -1862,48 +1862,44 @@ func getOffsetAndOriginTable(backupTable string) (int, string, error) {return offset, strings.Join(parts[3:], "_"), nil}-func checkAndGetDataSourceQueriable(ctx context.Context, storeInstance *store.Store, database *store.DatabaseMessage, dataSourceID string) (*store.DataSourceMessage, error) {- dataSource, serr := func() (*store.DataSourceMessage, *status.Status) {+func checkAndGetDataSourceQueriable(ctx context.Context, storeInstance *store.Store, database *store.DatabaseMessage, dataSourceID string) (*storepb.DataSource, error) {+ instance, err := storeInstance.GetInstanceV2(ctx, &store.FindInstanceMessage{ResourceID: &database.InstanceID})+ if err != nil {+ return nil, errors.Errorf("failed to get instance: %v", err)+ }+ if instance == nil {+ return nil, errors.Errorf("instance %q not found", database.InstanceID)+ }+ dataSource, serr := func() (*storepb.DataSource, *status.Status) {// dataSourceID unspecified, we find a readonly dataSource// first and fallback to admin dataSource.if dataSourceID == "" {- dataSources, err := storeInstance.ListDataSourcesV2(ctx, &store.FindDataSourceMessage{- InstanceID: &database.InstanceID,- })- if err != nil {- return nil, status.Newf(codes.Internal, "failed to list data sources: %v", err)- }- for _, ds := range dataSources {- if ds.Options.GetType() == storepb.DataSourceType_READ_ONLY {+ for _, ds := range instance.Metadata.GetDataSources() {+ if ds.GetType() == storepb.DataSourceType_READ_ONLY {return ds, nil}}- for _, ds := range dataSources {- if ds.Options.GetType() == storepb.DataSourceType_ADMIN {+ for _, ds := range instance.Metadata.GetDataSources() {+ if ds.GetType() == storepb.DataSourceType_ADMIN {return ds, nil}}return nil, status.Newf(codes.FailedPrecondition, "no data source found")}- dataSource, err := storeInstance.GetDataSource(ctx, &store.FindDataSourceMessage{- InstanceID: &database.InstanceID,- ID: &dataSourceID,- })- if err != nil {- return nil, status.Newf(codes.Internal, "failed to get data source: %v", err)- }- if dataSource == nil {- return nil, status.Newf(codes.NotFound, "data source %q not found", dataSourceID)+ for _, ds := range instance.Metadata.GetDataSources() {+ if ds.GetId() == dataSourceID {+ return ds, nil+ }}- return dataSource, nil+ return nil, status.Newf(codes.NotFound, "data source %q not found", dataSourceID)}()if serr != nil {return nil, serr.Err()}// Always allow non-admin data source.- if dataSource.Options.GetType() != storepb.DataSourceType_ADMIN {+ if dataSource.GetType() != storepb.DataSourceType_ADMIN {return dataSource, nil}@@ -1956,15 +1952,9 @@ func checkAndGetDataSourceQueriable(ctx context.Context, storeInstance *store.Stif envAdminDataSourceRestriction == v1pb.DataSourceQueryPolicy_DISALLOW || projectAdminDataSourceRestriction == v1pb.DataSourceQueryPolicy_DISALLOW {return nil, status.Errorf(codes.PermissionDenied, "data source %q is not queryable", dataSourceID)} else if envAdminDataSourceRestriction == v1pb.DataSourceQueryPolicy_FALLBACK || projectAdminDataSourceRestriction == v1pb.DataSourceQueryPolicy_FALLBACK {- dataSources, err := storeInstance.ListDataSourcesV2(ctx, &store.FindDataSourceMessage{- InstanceID: &database.InstanceID,- })- if err != nil {- return nil, errors.Wrapf(err, "failed to list read-only data sources")- }// If there is any read-only data source, then return false.- for _, ds := range dataSources {- if ds.Options.Type == storepb.DataSourceType_READ_ONLY {+ for _, ds := range instance.Metadata.GetDataSources() {+ if ds.Type == storepb.DataSourceType_READ_ONLY {return nil, status.Errorf(codes.PermissionDenied, "data source %q is not queryable", dataSourceID)}}diff --git a/backend/component/dbfactory/dbfactory.go b/backend/component/dbfactory/dbfactory.goindex ca973f91c9..a826002367 100644--- a/backend/component/dbfactory/dbfactory.go+++ b/backend/component/dbfactory/dbfactory.go@@ -53,7 +53,7 @@ func (d *DBFactory) GetAdminDatabaseDriver(ctx context.Context, instance *store.}// GetDataSourceDriver returns the database driver for a data source.-func (d *DBFactory) GetDataSourceDriver(ctx context.Context, instance *store.InstanceMessage, dataSource *store.DataSourceMessage, databaseName string, datashare, readOnly bool, connectionContext db.ConnectionContext) (db.Driver, error) {+func (d *DBFactory) GetDataSourceDriver(ctx context.Context, instance *store.InstanceMessage, dataSource *storepb.DataSource, databaseName string, datashare, readOnly bool, connectionContext db.ConnectionContext) (db.Driver, error) {dbBinDir := ""switch instance.Engine {case storepb.Engine_MYSQL, storepb.Engine_TIDB, storepb.Engine_MARIADB, storepb.Engine_OCEANBASE:@@ -66,55 +66,55 @@ func (d *DBFactory) GetDataSourceDriver(ctx context.Context, instance *store.Ins}if databaseName == "" {- databaseName = dataSource.Options.GetDatabase()+ databaseName = dataSource.GetDatabase()}- password, err := common.Unobfuscate(dataSource.Options.GetObfuscatedPassword(), d.secret)+ password, err := common.Unobfuscate(dataSource.GetObfuscatedPassword(), d.secret)if err != nil {return nil, err}- sslCA, err := common.Unobfuscate(dataSource.Options.GetObfuscatedSslCa(), d.secret)+ sslCA, err := common.Unobfuscate(dataSource.GetObfuscatedSslCa(), d.secret)if err != nil {return nil, err}- sslCert, err := common.Unobfuscate(dataSource.Options.GetObfuscatedSslCert(), d.secret)+ sslCert, err := common.Unobfuscate(dataSource.GetObfuscatedSslCert(), d.secret)if err != nil {return nil, err}- sslKey, err := common.Unobfuscate(dataSource.Options.GetObfuscatedSslKey(), d.secret)+ sslKey, err := common.Unobfuscate(dataSource.GetObfuscatedSslKey(), d.secret)if err != nil {return nil, err}- sshPassword, err := common.Unobfuscate(dataSource.Options.GetSshObfuscatedPassword(), d.secret)+ sshPassword, err := common.Unobfuscate(dataSource.GetSshObfuscatedPassword(), d.secret)if err != nil {return nil, err}- sshPrivateKey, err := common.Unobfuscate(dataSource.Options.GetSshObfuscatedPrivateKey(), d.secret)+ sshPrivateKey, err := common.Unobfuscate(dataSource.GetSshObfuscatedPrivateKey(), d.secret)if err != nil {return nil, err}- authenticationPrivateKey, err := common.Unobfuscate(dataSource.Options.GetAuthenticationPrivateKeyObfuscated(), d.secret)+ authenticationPrivateKey, err := common.Unobfuscate(dataSource.GetAuthenticationPrivateKeyObfuscated(), d.secret)if err != nil {return nil, err}- masterPassword, err := common.Unobfuscate(dataSource.Options.GetMasterObfuscatedPassword(), d.secret)+ masterPassword, err := common.Unobfuscate(dataSource.GetMasterObfuscatedPassword(), d.secret)if err != nil {return nil, err}- updatedPassword, err := secret.ReplaceExternalSecret(ctx, password, dataSource.Options.GetExternalSecret())+ updatedPassword, err := secret.ReplaceExternalSecret(ctx, password, dataSource.GetExternalSecret())if err != nil {return nil, err}password = updatedPasswordsshConfig := db.SSHConfig{- Host: dataSource.Options.GetSshHost(),- Port: dataSource.Options.GetSshPort(),- User: dataSource.Options.GetSshUser(),+ Host: dataSource.GetSshHost(),+ Port: dataSource.GetSshPort(),+ User: dataSource.GetSshUser(),Password: sshPassword,PrivateKey: sshPrivateKey,}var dbSaslConfig db.SASLConfig- switch t := dataSource.Options.GetSaslConfig().GetMechanism().(type) {+ switch t := dataSource.GetSaslConfig().GetMechanism().(type) {case *storepb.SASLConfig_KrbConfig:dbSaslConfig = &db.KerberosConfig{Primary: t.KrbConfig.Primary,@@ -141,40 +141,40 @@ func (d *DBFactory) GetDataSourceDriver(ctx context.Context, instance *store.InsDbBinDir: dbBinDir,},db.ConnectionConfig{- Username: dataSource.Options.GetUsername(),+ Username: dataSource.GetUsername(),Password: password,TLSConfig: db.TLSConfig{- UseSSL: dataSource.Options.GetUseSsl(),+ UseSSL: dataSource.GetUseSsl(),SslCA: sslCA,SslCert: sslCert,SslKey: sslKey,},- Host: dataSource.Options.GetHost(),- Port: dataSource.Options.GetPort(),+ Host: dataSource.GetHost(),+ Port: dataSource.GetPort(),Database: databaseName,DataShare: datashare,- SRV: dataSource.Options.GetSrv(),- AuthenticationDatabase: dataSource.Options.GetAuthenticationDatabase(),- SID: dataSource.Options.GetSid(),- ServiceName: dataSource.Options.ServiceName,+ SRV: dataSource.GetSrv(),+ AuthenticationDatabase: dataSource.GetAuthenticationDatabase(),+ SID: dataSource.GetSid(),+ ServiceName: dataSource.ServiceName,SSHConfig: sshConfig,ReadOnly: readOnly,ConnectionContext: connectionContext,AuthenticationPrivateKey: authenticationPrivateKey,- AuthenticationType: dataSource.Options.GetAuthenticationType(),+ AuthenticationType: dataSource.GetAuthenticationType(),SASLConfig: dbSaslConfig,- AdditionalAddresses: dataSource.Options.GetAdditionalAddresses(),- ReplicaSet: dataSource.Options.GetReplicaSet(),- DirectConnection: dataSource.Options.GetDirectConnection(),- Region: dataSource.Options.GetRegion(),- WarehouseID: dataSource.Options.GetWarehouseId(),- RedisType: dataSource.Options.GetRedisType(),- MasterName: dataSource.Options.GetMasterName(),- MasterUsername: dataSource.Options.GetMasterUsername(),+ AdditionalAddresses: dataSource.GetAdditionalAddresses(),+ ReplicaSet: dataSource.GetReplicaSet(),+ DirectConnection: dataSource.GetDirectConnection(),+ Region: dataSource.GetRegion(),+ WarehouseID: dataSource.GetWarehouseId(),+ RedisType: dataSource.GetRedisType(),+ MasterName: dataSource.GetMasterName(),+ MasterUsername: dataSource.GetMasterUsername(),MasterPassword: masterPassword,- ExtraConnectionParameters: dataSource.Options.GetExtraConnectionParameters(),+ ExtraConnectionParameters: dataSource.GetExtraConnectionParameters(),MaximumSQLResultSize: maximumSQLResultSize,- ClientSecretCredential: dataSource.Options.GetClientSecretCredential(),+ ClientSecretCredential: dataSource.GetClientSecretCredential(),},)if err != nil {diff --git a/backend/component/ghost/config.go b/backend/component/ghost/config.goindex c8900423a1..af57a7d71c 100644--- a/backend/component/ghost/config.go+++ b/backend/component/ghost/config.go@@ -10,6 +10,7 @@ import ("github.com/pkg/errors"secretcomp "github.com/bytebase/bytebase/backend/component/secret"+ storepb "github.com/bytebase/bytebase/proto/generated-go/store""github.com/bytebase/bytebase/backend/common""github.com/bytebase/bytebase/backend/store"@@ -192,12 +193,12 @@ func GetUserFlags(flags map[string]string) (*UserFlags, error) {}// NewMigrationContext is the context for gh-ost migration.-func NewMigrationContext(ctx context.Context, taskID int, database *store.DatabaseMessage, dataSource *store.DataSourceMessage, secret string, tableName string, tmpTableNameSuffix string, statement string, noop bool, flags map[string]string, serverIDOffset uint) (*base.MigrationContext, error) {- password, err := common.Unobfuscate(dataSource.Options.GetObfuscatedPassword(), secret)+func NewMigrationContext(ctx context.Context, taskID int, database *store.DatabaseMessage, dataSource *storepb.DataSource, secret string, tableName string, tmpTableNameSuffix string, statement string, noop bool, flags map[string]string, serverIDOffset uint) (*base.MigrationContext, error) {+ password, err := common.Unobfuscate(dataSource.GetObfuscatedPassword(), secret)if err != nil {return nil, errors.Wrapf(err, "failed to get password")}- updatedPassword, err := secretcomp.ReplaceExternalSecret(ctx, password, dataSource.Options.GetExternalSecret())+ updatedPassword, err := secretcomp.ReplaceExternalSecret(ctx, password, dataSource.GetExternalSecret())if err != nil {return nil, err}@@ -205,27 +206,27 @@ func NewMigrationContext(ctx context.Context, taskID int, database *store.DatabamigrationContext := base.NewMigrationContext()migrationContext.Log = newGhostLogger()- migrationContext.InspectorConnectionConfig.Key.Hostname = dataSource.Options.GetHost()+ migrationContext.InspectorConnectionConfig.Key.Hostname = dataSource.GetHost()port := 3306- if dataSource.Options.GetPort() != "" {- dsPort, err := strconv.Atoi(dataSource.Options.GetPort())+ if dataSource.GetPort() != "" {+ dsPort, err := strconv.Atoi(dataSource.GetPort())if err != nil {return nil, errors.Wrap(err, "failed to convert port from string to int")}port = dsPort}- if dataSource.Options.GetUseSsl() {- ca, err := common.Unobfuscate(dataSource.Options.GetObfuscatedSslCa(), secret)+ if dataSource.GetUseSsl() {+ ca, err := common.Unobfuscate(dataSource.GetObfuscatedSslCa(), secret)if err != nil {return nil, errors.Wrapf(err, "failed to get ssl ca")}- cert, err := common.Unobfuscate(dataSource.Options.GetObfuscatedSslCert(), secret)+ cert, err := common.Unobfuscate(dataSource.GetObfuscatedSslCert(), secret)if err != nil {return nil, errors.Wrapf(err, "failed to get ssl cert")}- key, err := common.Unobfuscate(dataSource.Options.GetObfuscatedSslKey(), secret)+ key, err := common.Unobfuscate(dataSource.GetObfuscatedSslKey(), secret)if err != nil {return nil, errors.Wrapf(err, "failed to get ssl key")}@@ -240,7 +241,7 @@ func NewMigrationContext(ctx context.Context, taskID int, database *store.Databa}}migrationContext.InspectorConnectionConfig.Key.Port = port- migrationContext.CliUser = dataSource.Options.GetUsername()+ migrationContext.CliUser = dataSource.GetUsername()migrationContext.CliPassword = password// GhostDatabaseName is our homemade parameter to allow creating temporary tables under another database.migrationContext.GhostDatabaseName = "bbdataarchive"diff --git a/backend/migrator/migration/3.5/0007##instance_data_source.sql b/backend/migrator/migration/3.5/0007##instance_data_source.sqlnew file mode 100644index 0000000000..47e5a73396--- /dev/null+++ b/backend/migrator/migration/3.5/0007##instance_data_source.sql@@ -0,0 +1,8 @@+UPDATE instance+SET metadata = metadata || jsonb_build_object(+ 'dataSources', (+ SELECT coalesce(jsonb_agg(data_source.options), '[]'::jsonb)+ FROM data_source+ WHERE data_source.instance = instance.resource_id+ )+);\ No newline at end of filediff --git a/backend/migrator/migration/LATEST.sql b/backend/migrator/migration/LATEST.sqlindex eb4d05219d..f2ad7d362b 100644--- a/backend/migrator/migration/LATEST.sql+++ b/backend/migrator/migration/LATEST.sql@@ -162,7 +162,7 @@ CREATE UNIQUE INDEX idx_db_schema_unique_instance_db_name ON db_schema(instance,ALTER SEQUENCE db_schema_id_seq RESTART WITH 101;--- data_source table stores the data source for a particular database+-- Deprecated. To be deleted later.CREATE TABLE data_source (id serial PRIMARY KEY,instance text NOT NULL REFERENCES instance(resource_id),diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex c18dd53ddd..8ad338f6c7 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -212,5 +212,5 @@ func TestMigrationCompatibility(t *testing.T) {func TestGetCutoffVersion(t *testing.T) {releaseVersion, err := getProdCutoffVersion()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.5.6"), releaseVersion)+ require.Equal(t, semver.MustParse("3.5.7"), releaseVersion)}diff --git a/backend/plugin/db/bigquery/bigquery.go b/backend/plugin/db/bigquery/bigquery.goindex 0506f82fd0..e4d89d6c2e 100644--- a/backend/plugin/db/bigquery/bigquery.go+++ b/backend/plugin/db/bigquery/bigquery.go@@ -56,7 +56,7 @@ func (d *Driver) Open(ctx context.Context, _ storepb.Engine, config db.Connectiod.databaseName = config.Databasevar o []option.ClientOption- if config.AuthenticationType != storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM {+ if config.AuthenticationType != storepb.DataSource_GOOGLE_CLOUD_SQL_IAM {o = append(o, option.WithCredentialsJSON([]byte(config.Password)))}client, err := bigquery.NewClient(ctx, config.Host, o...)diff --git a/backend/plugin/db/cockroachdb/cockroachdb.go b/backend/plugin/db/cockroachdb/cockroachdb.goindex f8cd330161..226e76b9ee 100644--- a/backend/plugin/db/cockroachdb/cockroachdb.go+++ b/backend/plugin/db/cockroachdb/cockroachdb.go@@ -72,9 +72,9 @@ func (driver *Driver) Open(ctx context.Context, _ storepb.Engine, config db.Connvar err errorswitch config.AuthenticationType {- case storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM:+ case storepb.DataSource_GOOGLE_CLOUD_SQL_IAM:pgxConnConfig, err = getCloudSQLConnectionConfig(ctx, config)- case storepb.DataSourceOptions_AWS_RDS_IAM:+ case storepb.DataSource_AWS_RDS_IAM:pgxConnConfig, err = getRDSConnectionConfig(ctx, config)default:pgxConnConfig, err = getCockroachConnectionConfig(config)diff --git a/backend/plugin/db/driver.go b/backend/plugin/db/driver.goindex 01fa8bc72e..888096c83f 100644--- a/backend/plugin/db/driver.go+++ b/backend/plugin/db/driver.go@@ -171,10 +171,10 @@ type ConnectionConfig struct {ConnectionContext ConnectionContext// AuthenticationType is for the database connection, we support normal username & password or Google IAM.- AuthenticationType storepb.DataSourceOptions_AuthenticationType+ AuthenticationType storepb.DataSource_AuthenticationType// AdditionalAddresses and ReplicaSet name are used for MongoDB.- AdditionalAddresses []*storepb.DataSourceOptions_Address+ AdditionalAddresses []*storepb.DataSource_AddressReplicaSet stringDirectConnection bool@@ -184,7 +184,7 @@ type ConnectionConfig struct {// WarehouseID is used by Databricks.WarehouseID string- RedisType storepb.DataSourceOptions_RedisType+ RedisType storepb.DataSource_RedisTypeMasterName stringMasterUsername stringMasterPassword string@@ -197,7 +197,7 @@ type ConnectionConfig struct {MaximumSQLResultSize int64// At most one of the following could be set.- ClientSecretCredential *storepb.DataSourceOptions_ClientSecretCredential+ ClientSecretCredential *storepb.DataSource_ClientSecretCredential}// SSHConfig is the configuration for connection over SSH.diff --git a/backend/plugin/db/mongodb/mongodb_test.go b/backend/plugin/db/mongodb/mongodb_test.goindex e8a4331021..b3a529b057 100644--- a/backend/plugin/db/mongodb/mongodb_test.go+++ b/backend/plugin/db/mongodb/mongodb_test.go@@ -96,7 +96,7 @@ func TestGetMongoDBConnectionURL(t *testing.T) {Database: "sampleDB",AuthenticationDatabase: "admin",SRV: false,- AdditionalAddresses: []*storepb.DataSourceOptions_Address{+ AdditionalAddresses: []*storepb.DataSource_Address{{Host: "node2.cluster0.sample.mongodb.net", Port: "27017"},{Host: "node3.cluster0.sample.mongodb.net", Port: "27017"},},diff --git a/backend/plugin/db/mssql/mssql.go b/backend/plugin/db/mssql/mssql.goindex 2c0a11a86e..f89885ed98 100644--- a/backend/plugin/db/mssql/mssql.go+++ b/backend/plugin/db/mssql/mssql.go@@ -104,7 +104,7 @@ func (driver *Driver) Open(_ context.Context, _ storepb.Engine, config db.ConnecdriverName := "sqlserver"password := config.Password- if config.AuthenticationType == storepb.DataSourceOptions_AZURE_IAM {+ if config.AuthenticationType == storepb.DataSource_AZURE_IAM {driverName = azuread.DriverNameif config.ClientSecretCredential != nil {query.Add("fedauth", azuread.ActiveDirectoryServicePrincipal)diff --git a/backend/plugin/db/mysql/mysql.go b/backend/plugin/db/mysql/mysql.goindex 17da6a6a70..e1c06e1552 100644--- a/backend/plugin/db/mysql/mysql.go+++ b/backend/plugin/db/mysql/mysql.go@@ -80,9 +80,9 @@ func (d *Driver) Open(ctx context.Context, dbType storepb.Engine, connCfg db.Convar dsn stringvar err errorswitch connCfg.AuthenticationType {- case storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM:+ case storepb.DataSource_GOOGLE_CLOUD_SQL_IAM:dsn, err = getCloudSQLConnection(ctx, connCfg)- case storepb.DataSourceOptions_AWS_RDS_IAM:+ case storepb.DataSource_AWS_RDS_IAM:dsn, err = getRDSConnection(ctx, connCfg)default:dsn, err = d.getMySQLConnection(connCfg)diff --git a/backend/plugin/db/pg/pg.go b/backend/plugin/db/pg/pg.goindex 74602fbebb..3f609c2c38 100644--- a/backend/plugin/db/pg/pg.go+++ b/backend/plugin/db/pg/pg.go@@ -73,9 +73,9 @@ func (driver *Driver) Open(ctx context.Context, _ storepb.Engine, config db.Connvar err errorswitch config.AuthenticationType {- case storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM:+ case storepb.DataSource_GOOGLE_CLOUD_SQL_IAM:pgxConnConfig, err = getCloudSQLConnectionConfig(ctx, config)- case storepb.DataSourceOptions_AWS_RDS_IAM:+ case storepb.DataSource_AWS_RDS_IAM:pgxConnConfig, err = getRDSConnectionConfig(ctx, config)default:pgxConnConfig, err = getPGConnectionConfig(config)diff --git a/backend/plugin/db/redis/redis.go b/backend/plugin/db/redis/redis.goindex bd9fdf0835..5838b4a9c8 100644--- a/backend/plugin/db/redis/redis.go+++ b/backend/plugin/db/redis/redis.go@@ -62,7 +62,7 @@ func (d *Driver) Open(_ context.Context, _ storepb.Engine, config db.ConnectionC}d.databaseName = fmt.Sprintf("%d", db)switch config.RedisType {- case storepb.DataSourceOptions_REDIS_TYPE_UNSPECIFIED, storepb.DataSourceOptions_STANDALONE:+ case storepb.DataSource_REDIS_TYPE_UNSPECIFIED, storepb.DataSource_STANDALONE:options := &redis.Options{Addr: fmt.Sprintf("%s:%s", config.Host, config.Port),Username: config.Username,@@ -88,7 +88,7 @@ func (d *Driver) Open(_ context.Context, _ storepb.Engine, config db.ConnectionCclient := redis.NewClient(options)d.databaseName = fmt.Sprintf("%d", db)d.rdb = client- case storepb.DataSourceOptions_SENTINEL:+ case storepb.DataSource_SENTINEL:sentinelAddrs := make([]string, 0, 1+len(config.AdditionalAddresses))sentinelAddrs = append(sentinelAddrs, fmt.Sprintf("%s:%s", config.Host, config.Port))for _, sentinelAddr := range config.AdditionalAddresses {@@ -122,7 +122,7 @@ func (d *Driver) Open(_ context.Context, _ storepb.Engine, config db.ConnectionCd.databaseName = fmt.Sprintf("%d", db)client := redis.NewFailoverClient(options)d.rdb = client- case storepb.DataSourceOptions_CLUSTER:+ case storepb.DataSource_CLUSTER:addrs := make([]string, 0, 1+len(config.AdditionalAddresses))addrs = append(addrs, fmt.Sprintf("%s:%s", config.Host, config.Port))for _, addr := range config.AdditionalAddresses {diff --git a/backend/plugin/db/spanner/spanner.go b/backend/plugin/db/spanner/spanner.goindex a19ba79ba9..923c6f71e2 100644--- a/backend/plugin/db/spanner/spanner.go+++ b/backend/plugin/db/spanner/spanner.go@@ -64,7 +64,7 @@ func (d *Driver) Open(ctx context.Context, _ storepb.Engine, config db.Connectiod.connCtx = config.ConnectionContextvar o []option.ClientOption- if config.AuthenticationType != storepb.DataSourceOptions_GOOGLE_CLOUD_SQL_IAM {+ if config.AuthenticationType != storepb.DataSource_GOOGLE_CLOUD_SQL_IAM {o = append(o, option.WithCredentialsJSON([]byte(config.Password)))}if config.Database != "" {diff --git a/backend/server/onboard.go b/backend/server/onboard.goindex 4570051ced..f5c7401323 100644--- a/backend/server/onboard.go+++ b/backend/server/onboard.go@@ -41,9 +41,9 @@ func (s *Server) generateOnboardingData(ctx context.Context, user *store.UserMesTitle: "Test Sample Instance",Engine: storepb.Engine_POSTGRES,ExternalLink: "",- DataSources: []*store.DataSourceMessage{- {- Options: &storepb.DataSourceOptions{+ Metadata: &storepb.InstanceMetadata{+ DataSources: []*storepb.DataSource{+ {Id: "admin",Type: storepb.DataSourceType_ADMIN,Username: postgres.SampleUser,@@ -102,9 +102,9 @@ func (s *Server) generateOnboardingData(ctx context.Context, user *store.UserMesTitle: "Prod Sample Instance",Engine: storepb.Engine_POSTGRES,ExternalLink: "",- DataSources: []*store.DataSourceMessage{- {- Options: &storepb.DataSourceOptions{+ Metadata: &storepb.InstanceMetadata{+ DataSources: []*storepb.DataSource{+ {Id: "admin",Type: storepb.DataSourceType_ADMIN,Username: postgres.SampleUser,diff --git a/backend/store/data_source.go b/backend/store/data_source.godeleted file mode 100644index 6402fb9cbc..0000000000--- a/backend/store/data_source.go+++ /dev/null@@ -1,212 +0,0 @@-package store--import (- "context"- "fmt"- "strings"-- "github.com/pkg/errors"-- "google.golang.org/protobuf/encoding/protojson"-- "github.com/bytebase/bytebase/backend/common"- storepb "github.com/bytebase/bytebase/proto/generated-go/store"-)--// DataSourceMessage is the message for data source.-type DataSourceMessage struct {- Options *storepb.DataSourceOptions-}--// FindDataSourceMessage is the message for finding a database.-type FindDataSourceMessage struct {- ID *string- InstanceID *string-}--// UpdateDataSourceMessage is the message for the data source.-type UpdateDataSourceMessage struct {- InstanceID string- ID string-- Options *storepb.DataSourceOptions-}--func (*Store) listInstanceDataSourceMap(ctx context.Context, tx *Tx, find *FindDataSourceMessage) (map[string][]*DataSourceMessage, error) {- where, args := []string{"TRUE"}, []any{}- if find.ID != nil {- where, args = append(where, fmt.Sprintf("options->>'id' = $%d", len(args)+1)), append(args, *find.ID)- }- if find.InstanceID != nil {- where, args = append(where, fmt.Sprintf("instance = $%d", len(args)+1)), append(args, *find.InstanceID)- }-- instanceDataSourcesMap := make(map[string][]*DataSourceMessage)- rows, err := tx.QueryContext(ctx, `- SELECT- instance,- options- FROM data_source- WHERE `+strings.Join(where, " AND "),- args...,- )- if err != nil {- return nil, err- }- defer rows.Close()- for rows.Next() {- var protoBytes []byte- var instanceID string- var dataSourceMessage DataSourceMessage- if err := rows.Scan(- &instanceID,- &protoBytes,- ); err != nil {- return nil, err- }- dataSourceOptions := &storepb.DataSourceOptions{}- if err := common.ProtojsonUnmarshaler.Unmarshal(protoBytes, dataSourceOptions); err != nil {- return nil, err- }- dataSourceMessage.Options = dataSourceOptions- instanceDataSourcesMap[instanceID] = append(instanceDataSourcesMap[instanceID], &dataSourceMessage)- }- if err := rows.Err(); err != nil {- return nil, err- }-- return instanceDataSourcesMap, nil-}--func (s *Store) ListDataSourcesV2(ctx context.Context, find *FindDataSourceMessage) ([]*DataSourceMessage, error) {- tx, err := s.db.BeginTx(ctx, nil)- if err != nil {- return nil, err- }- defer tx.Rollback()-- dataSourceMap, err := s.listInstanceDataSourceMap(ctx, tx, find)- if err != nil {- return nil, err- }- dataSources := []*DataSourceMessage{}- for _, list := range dataSourceMap {- dataSources = append(dataSources, list...)- }- return dataSources, nil-}--func (s *Store) GetDataSource(ctx context.Context, find *FindDataSourceMessage) (*DataSourceMessage, error) {- dataSources, err := s.ListDataSourcesV2(ctx, find)- if err != nil {- return nil, err- }- if len(dataSources) == 0 {- return nil, nil- }- if len(dataSources) > 1 {- return nil, errors.Errorf("found %d data sources, but expected 1", len(dataSources))- }- return dataSources[0], nil-}--// AddDataSourceToInstanceV2 adds a RO data source to an instance and return the instance where the data source is added.-func (s *Store) AddDataSourceToInstanceV2(ctx context.Context, instanceID string, dataSource *DataSourceMessage) error {- tx, err := s.db.BeginTx(ctx, nil)- if err != nil {- return err- }- defer tx.Rollback()-- if err := s.addDataSourceToInstanceImplV2(ctx, tx, instanceID, dataSource); err != nil {- return err- }-- if err := tx.Commit(); err != nil {- return err- }-- s.instanceCache.Remove(getInstanceCacheKey(instanceID))- return nil-}--// RemoveDataSourceV2 removes a RO data source from an instance.-func (s *Store) RemoveDataSourceV2(ctx context.Context, instanceID string, dataSourceID string) error {- tx, err := s.db.BeginTx(ctx, nil)- if err != nil {- return err- }- defer tx.Rollback()-- if _, err := tx.ExecContext(ctx, `- DELETE FROM data_source WHERE instance = $1 AND options->>'id' = $2;- `, instanceID, dataSourceID); err != nil {- return err- }-- if err := tx.Commit(); err != nil {- return err- }-- s.instanceCache.Remove(getInstanceCacheKey(instanceID))- return nil-}--// UpdateDataSourceV2 updates a data source and returns the instance.-func (s *Store) UpdateDataSourceV2(ctx context.Context, patch *UpdateDataSourceMessage) error {- set, args := []string{}, []any{}-- if v := patch.Options; v != nil {- o, err := protojson.Marshal(v)- if err != nil {- return err- }- set, args = append(set, fmt.Sprintf("options = $%d", len(args)+1)), append(args, o)- }-- tx, err := s.db.BeginTx(ctx, nil)- if err != nil {- return err- }- defer tx.Rollback()-- query := fmt.Sprintf(`UPDATE data_source SET %s WHERE instance = $%d AND options->>'id' = $%d`, strings.Join(set, ", "), len(args)+1, len(args)+2)- args = append(args, patch.InstanceID, patch.ID)- if _, err := tx.ExecContext(ctx, query, args...); err != nil {- return err- }-- if err := tx.Commit(); err != nil {- return err- }-- s.instanceCache.Remove(getInstanceCacheKey(patch.InstanceID))- return nil-}--func (*Store) addDataSourceToInstanceImplV2(ctx context.Context, tx *Tx, instanceID string, dataSource *DataSourceMessage) error {- protoBytes, err := protojson.Marshal(dataSource.Options)- if err != nil {- return err- }-- if _, err := tx.ExecContext(ctx, `- INSERT INTO data_source (- instance,- options- )- VALUES ($1, $2)- `, instanceID, protoBytes); err != nil {- return err- }-- return nil-}--// clearDataSourceImpl deletes dataSources by instance id and database id.-func (*Store) clearDataSourceImpl(ctx context.Context, tx *Tx, instanceID string) error {- if _, err := tx.ExecContext(ctx, `DELETE FROM data_source WHERE instance = $1`, instanceID); err != nil {- return err- }- return nil-}diff --git a/backend/store/instance.go b/backend/store/instance.goindex 3999050a70..b321742454 100644--- a/backend/store/instance.go+++ b/backend/store/instance.go@@ -22,7 +22,6 @@ type InstanceMessage struct {Title stringEngine storepb.EngineExternalLink string- DataSources []*DataSourceMessageActivation boolEnvironmentID stringDeleted bool@@ -37,7 +36,6 @@ type UpdateInstanceMessage struct {Title *stringExternalLink *stringDeleted *bool- DataSources *[]*DataSourceMessageEngineVersion *stringActivation *boolMetadata *storepb.InstanceMetadata@@ -61,13 +59,8 @@ func (s *Store) GetInstanceV2(ctx context.Context, find *FindInstanceMessage) (*// We will always return the resource regardless of its deleted state.find.ShowDeleted = true- tx, err := s.db.BeginTx(ctx, nil)- if err != nil {- return nil, err- }- defer tx.Rollback()- instances, err := s.listInstanceImplV2(ctx, tx, find)+ instances, err := s.ListInstancesV2(ctx, find)if err != nil {return nil, errors.Wrapf(err, "failed to list instances with find instance message %+v", find)}@@ -77,9 +70,6 @@ func (s *Store) GetInstanceV2(ctx context.Context, find *FindInstanceMessage) (*if len(instances) > 1 {return nil, errors.Errorf("find %d instances with find instance message %+v, expected 1", len(instances), find)}- if err := tx.Commit(); err != nil {- return nil, err- }instance := instances[0]s.instanceCache.Add(getInstanceCacheKey(instance.ResourceID), instance)@@ -94,7 +84,7 @@ func (s *Store) ListInstancesV2(ctx context.Context, find *FindInstanceMessage)}defer tx.Rollback()- instances, err := s.listInstanceImplV2(ctx, tx, find)+ instances, err := listInstanceImplV2(ctx, tx, find)if err != nil {return nil, err}@@ -111,7 +101,7 @@ func (s *Store) ListInstancesV2(ctx context.Context, find *FindInstanceMessage)// CreateInstanceV2 creates the instance.func (s *Store) CreateInstanceV2(ctx context.Context, instanceCreate *InstanceMessage, maximumActivation int) (*InstanceMessage, error) {- if err := validateDataSourceList(instanceCreate.DataSources); err != nil {+ if err := validateDataSources(instanceCreate.Metadata); err != nil {return nil, err}@@ -131,12 +121,11 @@ func (s *Store) CreateInstanceV2(ctx context.Context, instanceCreate *InstanceMereturn nil, err}- var instanceID intvar environment *stringif instanceCreate.EnvironmentID != "" {environment = &instanceCreate.EnvironmentID}- if err := tx.QueryRowContext(ctx, fmt.Sprintf(`+ if _, err := tx.ExecContext(ctx, fmt.Sprintf(`INSERT INTO instance (resource_id,environment,@@ -148,7 +137,6 @@ func (s *Store) CreateInstanceV2(ctx context.Context, instanceCreate *InstanceMe)SELECT $1, $2, $3, $4, $5, $6, $7%s- RETURNING id`, where),instanceCreate.ResourceID,environment,@@ -157,20 +145,7 @@ func (s *Store) CreateInstanceV2(ctx context.Context, instanceCreate *InstanceMeinstanceCreate.ExternalLink,instanceCreate.Activation,metadataBytes,- ).Scan(&instanceID); err != nil {- return nil, err- }-- for _, ds := range instanceCreate.DataSources {- if err := s.addDataSourceToInstanceImplV2(ctx, tx, instanceCreate.ResourceID, ds); err != nil {- return nil, err- }- }-- instanceDataSourcesMap, err := s.listInstanceDataSourceMap(ctx, tx, &FindDataSourceMessage{- InstanceID: &instanceCreate.ResourceID,- })- if err != nil {+ ); err != nil {return nil, err}@@ -184,7 +159,6 @@ func (s *Store) CreateInstanceV2(ctx context.Context, instanceCreate *InstanceMeTitle: instanceCreate.Title,Engine: instanceCreate.Engine,ExternalLink: instanceCreate.ExternalLink,- DataSources: instanceDataSourcesMap[instanceCreate.ResourceID],Activation: instanceCreate.Activation,Metadata: instanceCreate.Metadata,}@@ -194,12 +168,6 @@ func (s *Store) CreateInstanceV2(ctx context.Context, instanceCreate *InstanceMe// UpdateInstanceV2 updates an instance.func (s *Store) UpdateInstanceV2(ctx context.Context, patch *UpdateInstanceMessage, maximumActivation int) (*InstanceMessage, error) {- if patch.DataSources != nil {- if err := validateDataSourceList(*patch.DataSources); err != nil {- return nil, err- }- }-set, args, where := []string{}, []any{}, []string{}if v := patch.Title; v != nil {set, args = append(set, fmt.Sprintf("name = $%d", len(args)+1)), append(args, *v)@@ -301,26 +269,6 @@ func (s *Store) UpdateInstanceV2(ctx context.Context, patch *UpdateInstanceMessainstance = existedInstance}- if patch.DataSources != nil {- if err := s.clearDataSourceImpl(ctx, tx, instance.ResourceID); err != nil {- return nil, err- }-- for _, ds := range *patch.DataSources {- if err := s.addDataSourceToInstanceImplV2(ctx, tx, instance.ResourceID, ds); err != nil {- return nil, err- }- }- }-- instanceDataSourcesMap, err := s.listInstanceDataSourceMap(ctx, tx, &FindDataSourceMessage{- InstanceID: &patch.ResourceID,- })- if err != nil {- return nil, err- }- instance.DataSources = instanceDataSourcesMap[patch.ResourceID]-if err := tx.Commit(); err != nil {return nil, err}@@ -329,7 +277,7 @@ func (s *Store) UpdateInstanceV2(ctx context.Context, patch *UpdateInstanceMessareturn instance, nil}-func (s *Store) listInstanceImplV2(ctx context.Context, tx *Tx, find *FindInstanceMessage) ([]*InstanceMessage, error) {+func listInstanceImplV2(ctx context.Context, tx *Tx, find *FindInstanceMessage) ([]*InstanceMessage, error) {where, args := []string{"TRUE"}, []any{}if v := find.ResourceID; v != nil {where, args = append(where, fmt.Sprintf("instance.resource_id = $%d", len(args)+1)), append(args, *v)@@ -400,19 +348,6 @@ func (s *Store) listInstanceImplV2(ctx context.Context, tx *Tx, find *FindInstanreturn nil, err}- // Use a single query to list all data sources if there are more than one instance to look at.- dataSourceFind := &FindDataSourceMessage{}- if len(instanceMessages) == 1 {- dataSourceFind.InstanceID = &instanceMessages[0].ResourceID- }- instanceDataSourcesMap, err := s.listInstanceDataSourceMap(ctx, tx, dataSourceFind)- if err != nil {- return nil, err- }- for _, instanceMessage := range instanceMessages {- instanceMessage.DataSources = instanceDataSourcesMap[instanceMessage.ResourceID]- }-return instanceMessages, nil}@@ -431,15 +366,15 @@ func (s *Store) CheckActivationLimit(ctx context.Context, maximumActivation int)return nil}-func validateDataSourceList(dataSources []*DataSourceMessage) error {+func validateDataSources(metadata *storepb.InstanceMetadata) error {dataSourceMap := map[string]bool{}adminCount := 0- for _, dataSource := range dataSources {- if dataSourceMap[dataSource.Options.GetId()] {- return status.Errorf(codes.InvalidArgument, "duplicate data source ID %s", dataSource.Options.GetId())+ for _, dataSource := range metadata.GetDataSources() {+ if dataSourceMap[dataSource.GetId()] {+ return status.Errorf(codes.InvalidArgument, "duplicate data source ID %s", dataSource.GetId())}- dataSourceMap[dataSource.Options.GetId()] = true- if dataSource.Options.GetType() == storepb.DataSourceType_ADMIN {+ dataSourceMap[dataSource.GetId()] = true+ if dataSource.GetType() == storepb.DataSourceType_ADMIN {adminCount++}}diff --git a/backend/utils/utils.go b/backend/utils/utils.goindex 4b058c12ad..445ada116e 100644--- a/backend/utils/utils.go+++ b/backend/utils/utils.go@@ -31,9 +31,9 @@ import ()// DataSourceFromInstanceWithType gets a typed data source from an instance.-func DataSourceFromInstanceWithType(instance *store.InstanceMessage, dataSourceType storepb.DataSourceType) *store.DataSourceMessage {- for _, dataSource := range instance.DataSources {- if dataSource.Options.GetType() == dataSourceType {+func DataSourceFromInstanceWithType(instance *store.InstanceMessage, dataSourceType storepb.DataSourceType) *storepb.DataSource {+ for _, dataSource := range instance.Metadata.GetDataSources() {+ if dataSource.GetType() == dataSourceType {return dataSource}}diff --git a/frontend/src/types/proto/store/data_source.ts b/frontend/src/types/proto/store/data_source.tsindex 874f1ff92b..339c3e9245 100644--- a/frontend/src/types/proto/store/data_source.ts+++ b/frontend/src/types/proto/store/data_source.ts@@ -5,2021 +5,5 @@// source: store/data_source.proto/* eslint-disable */-import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";-import Long from "long";export const protobufPackage = "bytebase.store";--export enum DataSourceType {- DATA_SOURCE_UNSPECIFIED = "DATA_SOURCE_UNSPECIFIED",- ADMIN = "ADMIN",- READ_ONLY = "READ_ONLY",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function dataSourceTypeFromJSON(object: any): DataSourceType {- switch (object) {- case 0:- case "DATA_SOURCE_UNSPECIFIED":- return DataSourceType.DATA_SOURCE_UNSPECIFIED;- case 1:- case "ADMIN":- return DataSourceType.ADMIN;- case 2:- case "READ_ONLY":- return DataSourceType.READ_ONLY;- case -1:- case "UNRECOGNIZED":- default:- return DataSourceType.UNRECOGNIZED;- }-}--export function dataSourceTypeToJSON(object: DataSourceType): string {- switch (object) {- case DataSourceType.DATA_SOURCE_UNSPECIFIED:- return "DATA_SOURCE_UNSPECIFIED";- case DataSourceType.ADMIN:- return "ADMIN";- case DataSourceType.READ_ONLY:- return "READ_ONLY";- case DataSourceType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function dataSourceTypeToNumber(object: DataSourceType): number {- switch (object) {- case DataSourceType.DATA_SOURCE_UNSPECIFIED:- return 0;- case DataSourceType.ADMIN:- return 1;- case DataSourceType.READ_ONLY:- return 2;- case DataSourceType.UNRECOGNIZED:- default:- return -1;- }-}--export interface DataSourceOptions {- id: string;- type: DataSourceType;- host: string;- port: string;- username: string;- obfuscatedPassword: string;- database: string;- obfuscatedSslKey: string;- obfuscatedSslCert: string;- obfuscatedSslCa: string;- /** srv is a boolean flag that indicates whether the host is a DNS SRV record. */- srv: boolean;- /** authentication_database is the database name to authenticate against, which stores the user credentials. */- authenticationDatabase: string;- /** sid and service_name are used for Oracle. */- sid: string;- serviceName: string;- /**- * SSH related- * The hostname of the SSH server agent.- */- sshHost: string;- /** The port of the SSH server agent. It's 22 typically. */- sshPort: string;- /** The user to login the server. */- sshUser: string;- /** The password to login the server. If it's empty string, no password is required. */- sshObfuscatedPassword: 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"). */- sshObfuscatedPrivateKey: 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.- */- authenticationPrivateKeyObfuscated: string;- externalSecret: DataSourceExternalSecret | undefined;- authenticationType: DataSourceOptions_AuthenticationType;- clientSecretCredential?: DataSourceOptions_ClientSecretCredential | undefined;- saslConfig:- | SASLConfig- | undefined;- /** additional_addresses is used for MongoDB replica set. */- additionalAddresses: DataSourceOptions_Address[];- /** replica_set is used for MongoDB replica set. */- replicaSet: string;- /** direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. */- directConnection: boolean;- /** region is the location of where the DB is, works for AWS RDS. For example, us-east-1. */- region: string;- /** warehouse_id is used by Databricks. */- warehouseId: string;- /** master_name is the master name used by connecting redis-master via redis sentinel. */- masterName: string;- /** master_username and master_obfuscated_password are master credentials used by redis sentinel mode. */- masterUsername: string;- masterObfuscatedPassword: string;- redisType: DataSourceOptions_RedisType;- /** Use SSL to connect to the data source. By default, we use system default SSL configuration. */- useSsl: boolean;- /** Cluster is the cluster name for the data source. Used by CockroachDB. */- cluster: string;- /**- * Extra connection parameters for the database connection.- * For PostgreSQL HA, this can be used to set target_session_attrs=read-write- */- extraConnectionParameters: { [key: string]: string };-}--export enum DataSourceOptions_AuthenticationType {- AUTHENTICATION_UNSPECIFIED = "AUTHENTICATION_UNSPECIFIED",- PASSWORD = "PASSWORD",- GOOGLE_CLOUD_SQL_IAM = "GOOGLE_CLOUD_SQL_IAM",- AWS_RDS_IAM = "AWS_RDS_IAM",- AZURE_IAM = "AZURE_IAM",- UNRECOGNIZED = "UNRECOGNIZED",-}--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 3:- case "AWS_RDS_IAM":- return DataSourceOptions_AuthenticationType.AWS_RDS_IAM;- case 4:- case "AZURE_IAM":- return DataSourceOptions_AuthenticationType.AZURE_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.AWS_RDS_IAM:- return "AWS_RDS_IAM";- case DataSourceOptions_AuthenticationType.AZURE_IAM:- return "AZURE_IAM";- case DataSourceOptions_AuthenticationType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function dataSourceOptions_AuthenticationTypeToNumber(object: DataSourceOptions_AuthenticationType): number {- switch (object) {- case DataSourceOptions_AuthenticationType.AUTHENTICATION_UNSPECIFIED:- return 0;- case DataSourceOptions_AuthenticationType.PASSWORD:- return 1;- case DataSourceOptions_AuthenticationType.GOOGLE_CLOUD_SQL_IAM:- return 2;- case DataSourceOptions_AuthenticationType.AWS_RDS_IAM:- return 3;- case DataSourceOptions_AuthenticationType.AZURE_IAM:- return 4;- case DataSourceOptions_AuthenticationType.UNRECOGNIZED:- default:- return -1;- }-}--export enum DataSourceOptions_RedisType {- REDIS_TYPE_UNSPECIFIED = "REDIS_TYPE_UNSPECIFIED",- STANDALONE = "STANDALONE",- SENTINEL = "SENTINEL",- CLUSTER = "CLUSTER",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function dataSourceOptions_RedisTypeFromJSON(object: any): DataSourceOptions_RedisType {- switch (object) {- case 0:- case "REDIS_TYPE_UNSPECIFIED":- return DataSourceOptions_RedisType.REDIS_TYPE_UNSPECIFIED;- case 1:- case "STANDALONE":- return DataSourceOptions_RedisType.STANDALONE;- case 2:- case "SENTINEL":- return DataSourceOptions_RedisType.SENTINEL;- case 3:- case "CLUSTER":- return DataSourceOptions_RedisType.CLUSTER;- case -1:- case "UNRECOGNIZED":- default:- return DataSourceOptions_RedisType.UNRECOGNIZED;- }-}--export function dataSourceOptions_RedisTypeToJSON(object: DataSourceOptions_RedisType): string {- switch (object) {- case DataSourceOptions_RedisType.REDIS_TYPE_UNSPECIFIED:- return "REDIS_TYPE_UNSPECIFIED";- case DataSourceOptions_RedisType.STANDALONE:- return "STANDALONE";- case DataSourceOptions_RedisType.SENTINEL:- return "SENTINEL";- case DataSourceOptions_RedisType.CLUSTER:- return "CLUSTER";- case DataSourceOptions_RedisType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function dataSourceOptions_RedisTypeToNumber(object: DataSourceOptions_RedisType): number {- switch (object) {- case DataSourceOptions_RedisType.REDIS_TYPE_UNSPECIFIED:- return 0;- case DataSourceOptions_RedisType.STANDALONE:- return 1;- case DataSourceOptions_RedisType.SENTINEL:- return 2;- case DataSourceOptions_RedisType.CLUSTER:- return 3;- case DataSourceOptions_RedisType.UNRECOGNIZED:- default:- return -1;- }-}--export interface DataSourceOptions_ClientSecretCredential {- tenantId: string;- clientId: string;- clientSecret: string;-}--export interface DataSourceOptions_Address {- host: string;- port: string;-}--export interface DataSourceOptions_ExtraConnectionParametersEntry {- key: string;- value: string;-}--export interface SASLConfig {- krbConfig?: KerberosConfig | undefined;-}--export interface KerberosConfig {- primary: string;- instance: string;- realm: string;- keytab: Uint8Array;- kdcHost: string;- kdcPort: string;- kdcTransportProtocol: string;-}--export interface DataSourceExternalSecret {- secretType: DataSourceExternalSecret_SecretType;- url: string;- authType: DataSourceExternalSecret_AuthType;- appRole?: DataSourceExternalSecret_AppRoleAuthOption | undefined;- token?:- | string- | undefined;- /** engine name is the name for secret engine. */- engineName: string;- /** the secret name in the engine to store the password. */- secretName: string;- /** the key name for the password. */- passwordKeyName: string;-}--export enum DataSourceExternalSecret_SecretType {- SAECRET_TYPE_UNSPECIFIED = "SAECRET_TYPE_UNSPECIFIED",- /** VAULT_KV_V2 - ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 */- VAULT_KV_V2 = "VAULT_KV_V2",- /** AWS_SECRETS_MANAGER - ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html */- AWS_SECRETS_MANAGER = "AWS_SECRETS_MANAGER",- /** GCP_SECRET_MANAGER - ref: https://cloud.google.com/secret-manager/docs */- GCP_SECRET_MANAGER = "GCP_SECRET_MANAGER",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function dataSourceExternalSecret_SecretTypeFromJSON(object: any): DataSourceExternalSecret_SecretType {- switch (object) {- case 0:- case "SAECRET_TYPE_UNSPECIFIED":- return DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED;- case 1:- case "VAULT_KV_V2":- return DataSourceExternalSecret_SecretType.VAULT_KV_V2;- case 2:- case "AWS_SECRETS_MANAGER":- return DataSourceExternalSecret_SecretType.AWS_SECRETS_MANAGER;- case 3:- case "GCP_SECRET_MANAGER":- return DataSourceExternalSecret_SecretType.GCP_SECRET_MANAGER;- case -1:- case "UNRECOGNIZED":- default:- return DataSourceExternalSecret_SecretType.UNRECOGNIZED;- }-}--export function dataSourceExternalSecret_SecretTypeToJSON(object: DataSourceExternalSecret_SecretType): string {- switch (object) {- case DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED:- return "SAECRET_TYPE_UNSPECIFIED";- case DataSourceExternalSecret_SecretType.VAULT_KV_V2:- return "VAULT_KV_V2";- case DataSourceExternalSecret_SecretType.AWS_SECRETS_MANAGER:- return "AWS_SECRETS_MANAGER";- case DataSourceExternalSecret_SecretType.GCP_SECRET_MANAGER:- return "GCP_SECRET_MANAGER";- case DataSourceExternalSecret_SecretType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function dataSourceExternalSecret_SecretTypeToNumber(object: DataSourceExternalSecret_SecretType): number {- switch (object) {- case DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED:- return 0;- case DataSourceExternalSecret_SecretType.VAULT_KV_V2:- return 1;- case DataSourceExternalSecret_SecretType.AWS_SECRETS_MANAGER:- return 2;- case DataSourceExternalSecret_SecretType.GCP_SECRET_MANAGER:- return 3;- case DataSourceExternalSecret_SecretType.UNRECOGNIZED:- default:- return -1;- }-}--export enum DataSourceExternalSecret_AuthType {- AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",- /** TOKEN - ref: https://developer.hashicorp.com/vault/docs/auth/token */- TOKEN = "TOKEN",- /** VAULT_APP_ROLE - ref: https://developer.hashicorp.com/vault/docs/auth/approle */- VAULT_APP_ROLE = "VAULT_APP_ROLE",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function dataSourceExternalSecret_AuthTypeFromJSON(object: any): DataSourceExternalSecret_AuthType {- switch (object) {- case 0:- case "AUTH_TYPE_UNSPECIFIED":- return DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED;- case 1:- case "TOKEN":- return DataSourceExternalSecret_AuthType.TOKEN;- case 2:- case "VAULT_APP_ROLE":- return DataSourceExternalSecret_AuthType.VAULT_APP_ROLE;- case -1:- case "UNRECOGNIZED":- default:- return DataSourceExternalSecret_AuthType.UNRECOGNIZED;- }-}--export function dataSourceExternalSecret_AuthTypeToJSON(object: DataSourceExternalSecret_AuthType): string {- switch (object) {- case DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED:- return "AUTH_TYPE_UNSPECIFIED";- case DataSourceExternalSecret_AuthType.TOKEN:- return "TOKEN";- case DataSourceExternalSecret_AuthType.VAULT_APP_ROLE:- return "VAULT_APP_ROLE";- case DataSourceExternalSecret_AuthType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function dataSourceExternalSecret_AuthTypeToNumber(object: DataSourceExternalSecret_AuthType): number {- switch (object) {- case DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED:- return 0;- case DataSourceExternalSecret_AuthType.TOKEN:- return 1;- case DataSourceExternalSecret_AuthType.VAULT_APP_ROLE:- return 2;- case DataSourceExternalSecret_AuthType.UNRECOGNIZED:- default:- return -1;- }-}--export interface DataSourceExternalSecret_AppRoleAuthOption {- roleId: string;- /** the secret id for the role without ttl. */- secretId: string;- type: DataSourceExternalSecret_AppRoleAuthOption_SecretType;- /** The path where the approle auth method is mounted. */- mountPath: string;-}--export enum DataSourceExternalSecret_AppRoleAuthOption_SecretType {- SECRET_TYPE_UNSPECIFIED = "SECRET_TYPE_UNSPECIFIED",- PLAIN = "PLAIN",- ENVIRONMENT = "ENVIRONMENT",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function dataSourceExternalSecret_AppRoleAuthOption_SecretTypeFromJSON(- object: any,-): DataSourceExternalSecret_AppRoleAuthOption_SecretType {- switch (object) {- case 0:- case "SECRET_TYPE_UNSPECIFIED":- return DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED;- case 1:- case "PLAIN":- return DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN;- case 2:- case "ENVIRONMENT":- return DataSourceExternalSecret_AppRoleAuthOption_SecretType.ENVIRONMENT;- case -1:- case "UNRECOGNIZED":- default:- return DataSourceExternalSecret_AppRoleAuthOption_SecretType.UNRECOGNIZED;- }-}--export function dataSourceExternalSecret_AppRoleAuthOption_SecretTypeToJSON(- object: DataSourceExternalSecret_AppRoleAuthOption_SecretType,-): string {- switch (object) {- case DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED:- return "SECRET_TYPE_UNSPECIFIED";- case DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN:- return "PLAIN";- case DataSourceExternalSecret_AppRoleAuthOption_SecretType.ENVIRONMENT:- return "ENVIRONMENT";- case DataSourceExternalSecret_AppRoleAuthOption_SecretType.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function dataSourceExternalSecret_AppRoleAuthOption_SecretTypeToNumber(- object: DataSourceExternalSecret_AppRoleAuthOption_SecretType,-): number {- switch (object) {- case DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED:- return 0;- case DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN:- return 1;- case DataSourceExternalSecret_AppRoleAuthOption_SecretType.ENVIRONMENT:- return 2;- case DataSourceExternalSecret_AppRoleAuthOption_SecretType.UNRECOGNIZED:- default:- return -1;- }-}--function createBaseDataSourceOptions(): DataSourceOptions {- return {- id: "",- type: DataSourceType.DATA_SOURCE_UNSPECIFIED,- host: "",- port: "",- username: "",- obfuscatedPassword: "",- database: "",- obfuscatedSslKey: "",- obfuscatedSslCert: "",- obfuscatedSslCa: "",- srv: false,- authenticationDatabase: "",- sid: "",- serviceName: "",- sshHost: "",- sshPort: "",- sshUser: "",- sshObfuscatedPassword: "",- sshObfuscatedPrivateKey: "",- authenticationPrivateKeyObfuscated: "",- externalSecret: undefined,- authenticationType: DataSourceOptions_AuthenticationType.AUTHENTICATION_UNSPECIFIED,- clientSecretCredential: undefined,- saslConfig: undefined,- additionalAddresses: [],- replicaSet: "",- directConnection: false,- region: "",- warehouseId: "",- masterName: "",- masterUsername: "",- masterObfuscatedPassword: "",- redisType: DataSourceOptions_RedisType.REDIS_TYPE_UNSPECIFIED,- useSsl: false,- cluster: "",- extraConnectionParameters: {},- };-}--export const DataSourceOptions: MessageFns<DataSourceOptions> = {- encode(message: DataSourceOptions, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.id !== "") {- writer.uint32(10).string(message.id);- }- if (message.type !== DataSourceType.DATA_SOURCE_UNSPECIFIED) {- writer.uint32(16).int32(dataSourceTypeToNumber(message.type));- }- if (message.host !== "") {- writer.uint32(26).string(message.host);- }- if (message.port !== "") {- writer.uint32(34).string(message.port);- }- if (message.username !== "") {- writer.uint32(42).string(message.username);- }- if (message.obfuscatedPassword !== "") {- writer.uint32(50).string(message.obfuscatedPassword);- }- if (message.database !== "") {- writer.uint32(58).string(message.database);- }- if (message.obfuscatedSslKey !== "") {- writer.uint32(66).string(message.obfuscatedSslKey);- }- if (message.obfuscatedSslCert !== "") {- writer.uint32(74).string(message.obfuscatedSslCert);- }- if (message.obfuscatedSslCa !== "") {- writer.uint32(82).string(message.obfuscatedSslCa);- }- if (message.srv !== false) {- writer.uint32(88).bool(message.srv);- }- if (message.authenticationDatabase !== "") {- writer.uint32(98).string(message.authenticationDatabase);- }- if (message.sid !== "") {- writer.uint32(106).string(message.sid);- }- if (message.serviceName !== "") {- writer.uint32(114).string(message.serviceName);- }- if (message.sshHost !== "") {- writer.uint32(122).string(message.sshHost);- }- if (message.sshPort !== "") {- writer.uint32(130).string(message.sshPort);- }- if (message.sshUser !== "") {- writer.uint32(138).string(message.sshUser);- }- if (message.sshObfuscatedPassword !== "") {- writer.uint32(146).string(message.sshObfuscatedPassword);- }- if (message.sshObfuscatedPrivateKey !== "") {- writer.uint32(154).string(message.sshObfuscatedPrivateKey);- }- if (message.authenticationPrivateKeyObfuscated !== "") {- writer.uint32(162).string(message.authenticationPrivateKeyObfuscated);- }- if (message.externalSecret !== undefined) {- DataSourceExternalSecret.encode(message.externalSecret, writer.uint32(170).fork()).join();- }- if (message.authenticationType !== DataSourceOptions_AuthenticationType.AUTHENTICATION_UNSPECIFIED) {- writer.uint32(176).int32(dataSourceOptions_AuthenticationTypeToNumber(message.authenticationType));- }- if (message.clientSecretCredential !== undefined) {- DataSourceOptions_ClientSecretCredential.encode(message.clientSecretCredential, writer.uint32(186).fork()).join();- }- if (message.saslConfig !== undefined) {- SASLConfig.encode(message.saslConfig, writer.uint32(194).fork()).join();- }- for (const v of message.additionalAddresses) {- DataSourceOptions_Address.encode(v!, writer.uint32(202).fork()).join();- }- if (message.replicaSet !== "") {- writer.uint32(210).string(message.replicaSet);- }- if (message.directConnection !== false) {- writer.uint32(216).bool(message.directConnection);- }- if (message.region !== "") {- writer.uint32(226).string(message.region);- }- if (message.warehouseId !== "") {- writer.uint32(234).string(message.warehouseId);- }- if (message.masterName !== "") {- writer.uint32(242).string(message.masterName);- }- if (message.masterUsername !== "") {- writer.uint32(250).string(message.masterUsername);- }- if (message.masterObfuscatedPassword !== "") {- writer.uint32(258).string(message.masterObfuscatedPassword);- }- if (message.redisType !== DataSourceOptions_RedisType.REDIS_TYPE_UNSPECIFIED) {- writer.uint32(264).int32(dataSourceOptions_RedisTypeToNumber(message.redisType));- }- if (message.useSsl !== false) {- writer.uint32(272).bool(message.useSsl);- }- if (message.cluster !== "") {- writer.uint32(282).string(message.cluster);- }- Object.entries(message.extraConnectionParameters).forEach(([key, value]) => {- DataSourceOptions_ExtraConnectionParametersEntry.encode({ key: key as any, value }, writer.uint32(290).fork())- .join();- });- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): DataSourceOptions {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseDataSourceOptions();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.id = reader.string();- continue;- }- case 2: {- if (tag !== 16) {- break;- }-- message.type = dataSourceTypeFromJSON(reader.int32());- continue;- }- case 3: {- if (tag !== 26) {- break;- }-- message.host = reader.string();- continue;- }- case 4: {- if (tag !== 34) {- break;- }-- message.port = reader.string();- continue;- }- case 5: {- if (tag !== 42) {- break;- }-- message.username = reader.string();- continue;- }- case 6: {- if (tag !== 50) {- break;- }-- message.obfuscatedPassword = reader.string();- continue;- }- case 7: {- if (tag !== 58) {- break;- }-- message.database = reader.string();- continue;- }- case 8: {- if (tag !== 66) {- break;- }-- message.obfuscatedSslKey = reader.string();- continue;- }- case 9: {- if (tag !== 74) {- break;- }-- message.obfuscatedSslCert = reader.string();- continue;- }- case 10: {- if (tag !== 82) {- break;- }-- message.obfuscatedSslCa = reader.string();- continue;- }- case 11: {- if (tag !== 88) {- break;- }-- message.srv = reader.bool();- continue;- }- case 12: {- if (tag !== 98) {- break;- }-- message.authenticationDatabase = reader.string();- continue;- }- case 13: {- if (tag !== 106) {- break;- }-- message.sid = reader.string();- continue;- }- case 14: {- if (tag !== 114) {- break;- }-- message.serviceName = reader.string();- continue;- }- case 15: {- if (tag !== 122) {- break;- }-- message.sshHost = reader.string();- continue;- }- case 16: {- if (tag !== 130) {- break;- }-- message.sshPort = reader.string();- continue;- }- case 17: {- if (tag !== 138) {- break;- }-- message.sshUser = reader.string();- continue;- }- case 18: {- if (tag !== 146) {- break;- }-- message.sshObfuscatedPassword = reader.string();- continue;- }- case 19: {- if (tag !== 154) {- break;- }-- message.sshObfuscatedPrivateKey = reader.string();- continue;- }- case 20: {- if (tag !== 162) {- break;- }-- message.authenticationPrivateKeyObfuscated = reader.string();- continue;- }- case 21: {- if (tag !== 170) {- break;- }-- message.externalSecret = DataSourceExternalSecret.decode(reader, reader.uint32());- continue;- }- case 22: {- if (tag !== 176) {- break;- }-- message.authenticationType = dataSourceOptions_AuthenticationTypeFromJSON(reader.int32());- continue;- }- case 23: {- if (tag !== 186) {- break;- }-- message.clientSecretCredential = DataSourceOptions_ClientSecretCredential.decode(reader, reader.uint32());- continue;- }- case 24: {- if (tag !== 194) {- break;- }-- message.saslConfig = SASLConfig.decode(reader, reader.uint32());- continue;- }- case 25: {- if (tag !== 202) {- break;- }-- message.additionalAddresses.push(DataSourceOptions_Address.decode(reader, reader.uint32()));- continue;- }- case 26: {- if (tag !== 210) {- break;- }-- message.replicaSet = reader.string();- continue;- }- case 27: {- if (tag !== 216) {- break;- }-- message.directConnection = reader.bool();- continue;- }- case 28: {- if (tag !== 226) {- break;- }-- message.region = reader.string();- continue;- }- case 29: {- if (tag !== 234) {- break;- }-- message.warehouseId = reader.string();- continue;- }- case 30: {- if (tag !== 242) {- break;- }-- message.masterName = reader.string();- continue;- }- case 31: {- if (tag !== 250) {- break;- }-- message.masterUsername = reader.string();- continue;- }- case 32: {- if (tag !== 258) {- break;- }-- message.masterObfuscatedPassword = reader.string();- continue;- }- case 33: {- if (tag !== 264) {- break;- }-- message.redisType = dataSourceOptions_RedisTypeFromJSON(reader.int32());- continue;- }- case 34: {- if (tag !== 272) {- break;- }-- message.useSsl = reader.bool();- continue;- }- case 35: {- if (tag !== 282) {- break;- }-- message.cluster = reader.string();- continue;- }- case 36: {- if (tag !== 290) {- break;- }-- const entry36 = DataSourceOptions_ExtraConnectionParametersEntry.decode(reader, reader.uint32());- if (entry36.value !== undefined) {- message.extraConnectionParameters[entry36.key] = entry36.value;- }- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- fromJSON(object: any): DataSourceOptions {- return {- id: isSet(object.id) ? globalThis.String(object.id) : "",- type: isSet(object.type) ? dataSourceTypeFromJSON(object.type) : DataSourceType.DATA_SOURCE_UNSPECIFIED,- host: isSet(object.host) ? globalThis.String(object.host) : "",- port: isSet(object.port) ? globalThis.String(object.port) : "",- username: isSet(object.username) ? globalThis.String(object.username) : "",- obfuscatedPassword: isSet(object.obfuscatedPassword) ? globalThis.String(object.obfuscatedPassword) : "",- database: isSet(object.database) ? globalThis.String(object.database) : "",- obfuscatedSslKey: isSet(object.obfuscatedSslKey) ? globalThis.String(object.obfuscatedSslKey) : "",- obfuscatedSslCert: isSet(object.obfuscatedSslCert) ? globalThis.String(object.obfuscatedSslCert) : "",- obfuscatedSslCa: isSet(object.obfuscatedSslCa) ? globalThis.String(object.obfuscatedSslCa) : "",- srv: isSet(object.srv) ? globalThis.Boolean(object.srv) : false,- authenticationDatabase: isSet(object.authenticationDatabase)- ? globalThis.String(object.authenticationDatabase)- : "",- sid: isSet(object.sid) ? globalThis.String(object.sid) : "",- serviceName: isSet(object.serviceName) ? globalThis.String(object.serviceName) : "",- sshHost: isSet(object.sshHost) ? globalThis.String(object.sshHost) : "",- sshPort: isSet(object.sshPort) ? globalThis.String(object.sshPort) : "",- sshUser: isSet(object.sshUser) ? globalThis.String(object.sshUser) : "",- sshObfuscatedPassword: isSet(object.sshObfuscatedPassword) ? globalThis.String(object.sshObfuscatedPassword) : "",- sshObfuscatedPrivateKey: isSet(object.sshObfuscatedPrivateKey)- ? globalThis.String(object.sshObfuscatedPrivateKey)- : "",- authenticationPrivateKeyObfuscated: isSet(object.authenticationPrivateKeyObfuscated)- ? globalThis.String(object.authenticationPrivateKeyObfuscated)- : "",- externalSecret: isSet(object.externalSecret)- ? DataSourceExternalSecret.fromJSON(object.externalSecret)- : undefined,- authenticationType: isSet(object.authenticationType)- ? dataSourceOptions_AuthenticationTypeFromJSON(object.authenticationType)- : DataSourceOptions_AuthenticationType.AUTHENTICATION_UNSPECIFIED,- clientSecretCredential: isSet(object.clientSecretCredential)- ? DataSourceOptions_ClientSecretCredential.fromJSON(object.clientSecretCredential)- : undefined,- saslConfig: isSet(object.saslConfig) ? SASLConfig.fromJSON(object.saslConfig) : undefined,- additionalAddresses: globalThis.Array.isArray(object?.additionalAddresses)- ? object.additionalAddresses.map((e: any) => DataSourceOptions_Address.fromJSON(e))- : [],- replicaSet: isSet(object.replicaSet) ? globalThis.String(object.replicaSet) : "",- directConnection: isSet(object.directConnection) ? globalThis.Boolean(object.directConnection) : false,- region: isSet(object.region) ? globalThis.String(object.region) : "",- warehouseId: isSet(object.warehouseId) ? globalThis.String(object.warehouseId) : "",- masterName: isSet(object.masterName) ? globalThis.String(object.masterName) : "",- masterUsername: isSet(object.masterUsername) ? globalThis.String(object.masterUsername) : "",- masterObfuscatedPassword: isSet(object.masterObfuscatedPassword)- ? globalThis.String(object.masterObfuscatedPassword)- : "",- redisType: isSet(object.redisType)- ? dataSourceOptions_RedisTypeFromJSON(object.redisType)- : DataSourceOptions_RedisType.REDIS_TYPE_UNSPECIFIED,- useSsl: isSet(object.useSsl) ? globalThis.Boolean(object.useSsl) : false,- cluster: isSet(object.cluster) ? globalThis.String(object.cluster) : "",- extraConnectionParameters: isObject(object.extraConnectionParameters)- ? Object.entries(object.extraConnectionParameters).reduce<{ [key: string]: string }>((acc, [key, value]) => {- acc[key] = String(value);- return acc;- }, {})- : {},- };- },-- toJSON(message: DataSourceOptions): unknown {- const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.type !== DataSourceType.DATA_SOURCE_UNSPECIFIED) {- obj.type = dataSourceTypeToJSON(message.type);- }- if (message.host !== "") {- obj.host = message.host;- }- if (message.port !== "") {- obj.port = message.port;- }- if (message.username !== "") {- obj.username = message.username;- }- if (message.obfuscatedPassword !== "") {- obj.obfuscatedPassword = message.obfuscatedPassword;- }- if (message.database !== "") {- obj.database = message.database;- }- if (message.obfuscatedSslKey !== "") {- obj.obfuscatedSslKey = message.obfuscatedSslKey;- }- if (message.obfuscatedSslCert !== "") {- obj.obfuscatedSslCert = message.obfuscatedSslCert;- }- if (message.obfuscatedSslCa !== "") {- obj.obfuscatedSslCa = message.obfuscatedSslCa;- }- if (message.srv !== false) {- obj.srv = message.srv;- }- if (message.authenticationDatabase !== "") {- obj.authenticationDatabase = message.authenticationDatabase;- }- if (message.sid !== "") {- obj.sid = message.sid;- }- if (message.serviceName !== "") {- obj.serviceName = message.serviceName;- }- if (message.sshHost !== "") {- obj.sshHost = message.sshHost;- }- if (message.sshPort !== "") {- obj.sshPort = message.sshPort;- }- if (message.sshUser !== "") {- obj.sshUser = message.sshUser;- }- if (message.sshObfuscatedPassword !== "") {- obj.sshObfuscatedPassword = message.sshObfuscatedPassword;- }- if (message.sshObfuscatedPrivateKey !== "") {- obj.sshObfuscatedPrivateKey = message.sshObfuscatedPrivateKey;- }- if (message.authenticationPrivateKeyObfuscated !== "") {- obj.authenticationPrivateKeyObfuscated = message.authenticationPrivateKeyObfuscated;- }- if (message.externalSecret !== undefined) {- obj.externalSecret = DataSourceExternalSecret.toJSON(message.externalSecret);- }- if (message.authenticationType !== DataSourceOptions_AuthenticationType.AUTHENTICATION_UNSPECIFIED) {- obj.authenticationType = dataSourceOptions_AuthenticationTypeToJSON(message.authenticationType);- }- if (message.clientSecretCredential !== undefined) {- obj.clientSecretCredential = DataSourceOptions_ClientSecretCredential.toJSON(message.clientSecretCredential);- }- if (message.saslConfig !== undefined) {- obj.saslConfig = SASLConfig.toJSON(message.saslConfig);- }- if (message.additionalAddresses?.length) {- obj.additionalAddresses = message.additionalAddresses.map((e) => DataSourceOptions_Address.toJSON(e));- }- if (message.replicaSet !== "") {- obj.replicaSet = message.replicaSet;- }- if (message.directConnection !== false) {- obj.directConnection = message.directConnection;- }- if (message.region !== "") {- obj.region = message.region;- }- if (message.warehouseId !== "") {- obj.warehouseId = message.warehouseId;- }- if (message.masterName !== "") {- obj.masterName = message.masterName;- }- if (message.masterUsername !== "") {- obj.masterUsername = message.masterUsername;- }- if (message.masterObfuscatedPassword !== "") {- obj.masterObfuscatedPassword = message.masterObfuscatedPassword;- }- if (message.redisType !== DataSourceOptions_RedisType.REDIS_TYPE_UNSPECIFIED) {- obj.redisType = dataSourceOptions_RedisTypeToJSON(message.redisType);- }- if (message.useSsl !== false) {- obj.useSsl = message.useSsl;- }- if (message.cluster !== "") {- obj.cluster = message.cluster;- }- if (message.extraConnectionParameters) {- const entries = Object.entries(message.extraConnectionParameters);- if (entries.length > 0) {- obj.extraConnectionParameters = {};- entries.forEach(([k, v]) => {- obj.extraConnectionParameters[k] = v;- });- }- }- return obj;- },-- create(base?: DeepPartial<DataSourceOptions>): DataSourceOptions {- return DataSourceOptions.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<DataSourceOptions>): DataSourceOptions {- const message = createBaseDataSourceOptions();- message.id = object.id ?? "";- message.type = object.type ?? DataSourceType.DATA_SOURCE_UNSPECIFIED;- message.host = object.host ?? "";- message.port = object.port ?? "";- message.username = object.username ?? "";- message.obfuscatedPassword = object.obfuscatedPassword ?? "";- message.database = object.database ?? "";- message.obfuscatedSslKey = object.obfuscatedSslKey ?? "";- message.obfuscatedSslCert = object.obfuscatedSslCert ?? "";- message.obfuscatedSslCa = object.obfuscatedSslCa ?? "";- message.srv = object.srv ?? false;- message.authenticationDatabase = object.authenticationDatabase ?? "";- message.sid = object.sid ?? "";- message.serviceName = object.serviceName ?? "";- message.sshHost = object.sshHost ?? "";- message.sshPort = object.sshPort ?? "";- message.sshUser = object.sshUser ?? "";- message.sshObfuscatedPassword = object.sshObfuscatedPassword ?? "";- message.sshObfuscatedPrivateKey = object.sshObfuscatedPrivateKey ?? "";- message.authenticationPrivateKeyObfuscated = object.authenticationPrivateKeyObfuscated ?? "";- message.externalSecret = (object.externalSecret !== undefined && object.externalSecret !== null)- ? DataSourceExternalSecret.fromPartial(object.externalSecret)- : undefined;- message.authenticationType = object.authenticationType ??- DataSourceOptions_AuthenticationType.AUTHENTICATION_UNSPECIFIED;- message.clientSecretCredential =- (object.clientSecretCredential !== undefined && object.clientSecretCredential !== null)- ? DataSourceOptions_ClientSecretCredential.fromPartial(object.clientSecretCredential)- : undefined;- message.saslConfig = (object.saslConfig !== undefined && object.saslConfig !== null)- ? SASLConfig.fromPartial(object.saslConfig)- : undefined;- message.additionalAddresses = object.additionalAddresses?.map((e) => DataSourceOptions_Address.fromPartial(e)) ||- [];- message.replicaSet = object.replicaSet ?? "";- message.directConnection = object.directConnection ?? false;- message.region = object.region ?? "";- message.warehouseId = object.warehouseId ?? "";- message.masterName = object.masterName ?? "";- message.masterUsername = object.masterUsername ?? "";- message.masterObfuscatedPassword = object.masterObfuscatedPassword ?? "";- message.redisType = object.redisType ?? DataSourceOptions_RedisType.REDIS_TYPE_UNSPECIFIED;- message.useSsl = object.useSsl ?? false;- message.cluster = object.cluster ?? "";- message.extraConnectionParameters = Object.entries(object.extraConnectionParameters ?? {}).reduce<- { [key: string]: string }- >((acc, [key, value]) => {- if (value !== undefined) {- acc[key] = globalThis.String(value);- }- return acc;- }, {});- return message;- },-};--function createBaseDataSourceOptions_ClientSecretCredential(): DataSourceOptions_ClientSecretCredential {- return { tenantId: "", clientId: "", clientSecret: "" };-}--export const DataSourceOptions_ClientSecretCredential: MessageFns<DataSourceOptions_ClientSecretCredential> = {- encode(message: DataSourceOptions_ClientSecretCredential, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.tenantId !== "") {- writer.uint32(10).string(message.tenantId);- }- if (message.clientId !== "") {- writer.uint32(18).string(message.clientId);- }- if (message.clientSecret !== "") {- writer.uint32(26).string(message.clientSecret);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): DataSourceOptions_ClientSecretCredential {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseDataSourceOptions_ClientSecretCredential();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.tenantId = reader.string();- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.clientId = reader.string();- continue;- }- case 3: {- if (tag !== 26) {- break;- }-- message.clientSecret = reader.string();- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- fromJSON(object: any): DataSourceOptions_ClientSecretCredential {- return {- tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",- clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",- clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",- };- },-- toJSON(message: DataSourceOptions_ClientSecretCredential): unknown {- const obj: any = {};- if (message.tenantId !== "") {- obj.tenantId = message.tenantId;- }- if (message.clientId !== "") {- obj.clientId = message.clientId;- }- if (message.clientSecret !== "") {- obj.clientSecret = message.clientSecret;- }- return obj;- },-- create(base?: DeepPartial<DataSourceOptions_ClientSecretCredential>): DataSourceOptions_ClientSecretCredential {- return DataSourceOptions_ClientSecretCredential.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<DataSourceOptions_ClientSecretCredential>): DataSourceOptions_ClientSecretCredential {- const message = createBaseDataSourceOptions_ClientSecretCredential();- message.tenantId = object.tenantId ?? "";- message.clientId = object.clientId ?? "";- message.clientSecret = object.clientSecret ?? "";- return message;- },-};--function createBaseDataSourceOptions_Address(): DataSourceOptions_Address {- return { host: "", port: "" };-}--export const DataSourceOptions_Address: MessageFns<DataSourceOptions_Address> = {- encode(message: DataSourceOptions_Address, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.host !== "") {- writer.uint32(10).string(message.host);- }- if (message.port !== "") {- writer.uint32(18).string(message.port);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): DataSourceOptions_Address {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseDataSourceOptions_Address();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.host = reader.string();- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.port = reader.string();- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- fromJSON(object: any): DataSourceOptions_Address {- return {- host: isSet(object.host) ? globalThis.String(object.host) : "",- port: isSet(object.port) ? globalThis.String(object.port) : "",- };- },-- toJSON(message: DataSourceOptions_Address): unknown {- const obj: any = {};- if (message.host !== "") {- obj.host = message.host;- }- if (message.port !== "") {- obj.port = message.port;- }- return obj;- },-- create(base?: DeepPartial<DataSourceOptions_Address>): DataSourceOptions_Address {- return DataSourceOptions_Address.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<DataSourceOptions_Address>): DataSourceOptions_Address {- const message = createBaseDataSourceOptions_Address();- message.host = object.host ?? "";- message.port = object.port ?? "";- return message;- },-};--function createBaseDataSourceOptions_ExtraConnectionParametersEntry(): DataSourceOptions_ExtraConnectionParametersEntry {- return { key: "", value: "" };-}--export const DataSourceOptions_ExtraConnectionParametersEntry: MessageFns<- DataSourceOptions_ExtraConnectionParametersEntry-> = {- encode(- message: DataSourceOptions_ExtraConnectionParametersEntry,- writer: BinaryWriter = new BinaryWriter(),- ): BinaryWriter {- if (message.key !== "") {- writer.uint32(10).string(message.key);- }- if (message.value !== "") {- writer.uint32(18).string(message.value);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): DataSourceOptions_ExtraConnectionParametersEntry {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseDataSourceOptions_ExtraConnectionParametersEntry();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.key = reader.string();- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.value = reader.string();- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- fromJSON(object: any): DataSourceOptions_ExtraConnectionParametersEntry {- return {- key: isSet(object.key) ? globalThis.String(object.key) : "",- value: isSet(object.value) ? globalThis.String(object.value) : "",- };- },-- toJSON(message: DataSourceOptions_ExtraConnectionParametersEntry): unknown {- const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }- return obj;- },-- create(- base?: DeepPartial<DataSourceOptions_ExtraConnectionParametersEntry>,- ): DataSourceOptions_ExtraConnectionParametersEntry {- return DataSourceOptions_ExtraConnectionParametersEntry.fromPartial(base ?? {});- },- fromPartial(- object: DeepPartial<DataSourceOptions_ExtraConnectionParametersEntry>,- ): DataSourceOptions_ExtraConnectionParametersEntry {- const message = createBaseDataSourceOptions_ExtraConnectionParametersEntry();- message.key = object.key ?? "";- message.value = object.value ?? "";- return message;- },-};--function createBaseSASLConfig(): SASLConfig {- return { krbConfig: undefined };-}--export const SASLConfig: MessageFns<SASLConfig> = {- encode(message: SASLConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.krbConfig !== undefined) {- KerberosConfig.encode(message.krbConfig, writer.uint32(10).fork()).join();- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): SASLConfig {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseSASLConfig();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.krbConfig = KerberosConfig.decode(reader, reader.uint32());- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- fromJSON(object: any): SASLConfig {- return { krbConfig: isSet(object.krbConfig) ? KerberosConfig.fromJSON(object.krbConfig) : undefined };- },-- toJSON(message: SASLConfig): unknown {- const obj: any = {};- if (message.krbConfig !== undefined) {- obj.krbConfig = KerberosConfig.toJSON(message.krbConfig);- }- return obj;- },-- create(base?: DeepPartial<SASLConfig>): SASLConfig {- return SASLConfig.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<SASLConfig>): SASLConfig {- const message = createBaseSASLConfig();- message.krbConfig = (object.krbConfig !== undefined && object.krbConfig !== null)- ? KerberosConfig.fromPartial(object.krbConfig)- : undefined;- return message;- },-};--function createBaseKerberosConfig(): KerberosConfig {- return {- primary: "",- instance: "",- realm: "",- keytab: new Uint8Array(0),- kdcHost: "",- kdcPort: "",- kdcTransportProtocol: "",- };-}--export const KerberosConfig: MessageFns<KerberosConfig> = {- encode(message: KerberosConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.primary !== "") {- writer.uint32(10).string(message.primary);- }- if (message.instance !== "") {- writer.uint32(18).string(message.instance);- }- if (message.realm !== "") {- writer.uint32(26).string(message.realm);- }- if (message.keytab.length !== 0) {- writer.uint32(34).bytes(message.keytab);- }- if (message.kdcHost !== "") {- writer.uint32(42).string(message.kdcHost);- }- if (message.kdcPort !== "") {- writer.uint32(50).string(message.kdcPort);- }- if (message.kdcTransportProtocol !== "") {- writer.uint32(58).string(message.kdcTransportProtocol);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): KerberosConfig {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseKerberosConfig();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.primary = reader.string();- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.instance = reader.string();- continue;- }- case 3: {- if (tag !== 26) {- break;- }-- message.realm = reader.string();- continue;- }- case 4: {- if (tag !== 34) {- break;- }-- message.keytab = reader.bytes();- continue;- }- case 5: {- if (tag !== 42) {- break;- }-- message.kdcHost = reader.string();- continue;- }- case 6: {- if (tag !== 50) {- break;- }-- message.kdcPort = reader.string();- continue;- }- case 7: {- if (tag !== 58) {- break;- }-- message.kdcTransportProtocol = reader.string();- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- fromJSON(object: any): KerberosConfig {- return {- primary: isSet(object.primary) ? globalThis.String(object.primary) : "",- instance: isSet(object.instance) ? globalThis.String(object.instance) : "",- realm: isSet(object.realm) ? globalThis.String(object.realm) : "",- keytab: isSet(object.keytab) ? bytesFromBase64(object.keytab) : new Uint8Array(0),- kdcHost: isSet(object.kdcHost) ? globalThis.String(object.kdcHost) : "",- kdcPort: isSet(object.kdcPort) ? globalThis.String(object.kdcPort) : "",- kdcTransportProtocol: isSet(object.kdcTransportProtocol) ? globalThis.String(object.kdcTransportProtocol) : "",- };- },-- toJSON(message: KerberosConfig): unknown {- const obj: any = {};- if (message.primary !== "") {- obj.primary = message.primary;- }- if (message.instance !== "") {- obj.instance = message.instance;- }- if (message.realm !== "") {- obj.realm = message.realm;- }- if (message.keytab.length !== 0) {- obj.keytab = base64FromBytes(message.keytab);- }- if (message.kdcHost !== "") {- obj.kdcHost = message.kdcHost;- }- if (message.kdcPort !== "") {- obj.kdcPort = message.kdcPort;- }- if (message.kdcTransportProtocol !== "") {- obj.kdcTransportProtocol = message.kdcTransportProtocol;- }- return obj;- },-- create(base?: DeepPartial<KerberosConfig>): KerberosConfig {- return KerberosConfig.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<KerberosConfig>): KerberosConfig {- const message = createBaseKerberosConfig();- message.primary = object.primary ?? "";- message.instance = object.instance ?? "";- message.realm = object.realm ?? "";- message.keytab = object.keytab ?? new Uint8Array(0);- message.kdcHost = object.kdcHost ?? "";- message.kdcPort = object.kdcPort ?? "";- message.kdcTransportProtocol = object.kdcTransportProtocol ?? "";- return message;- },-};--function createBaseDataSourceExternalSecret(): DataSourceExternalSecret {- return {- secretType: DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED,- url: "",- authType: DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED,- appRole: undefined,- token: undefined,- engineName: "",- secretName: "",- passwordKeyName: "",- };-}--export const DataSourceExternalSecret: MessageFns<DataSourceExternalSecret> = {- encode(message: DataSourceExternalSecret, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.secretType !== DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED) {- writer.uint32(8).int32(dataSourceExternalSecret_SecretTypeToNumber(message.secretType));- }- if (message.url !== "") {- writer.uint32(18).string(message.url);- }- if (message.authType !== DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED) {- writer.uint32(24).int32(dataSourceExternalSecret_AuthTypeToNumber(message.authType));- }- if (message.appRole !== undefined) {- DataSourceExternalSecret_AppRoleAuthOption.encode(message.appRole, writer.uint32(34).fork()).join();- }- if (message.token !== undefined) {- writer.uint32(42).string(message.token);- }- if (message.engineName !== "") {- writer.uint32(50).string(message.engineName);- }- if (message.secretName !== "") {- writer.uint32(58).string(message.secretName);- }- if (message.passwordKeyName !== "") {- writer.uint32(66).string(message.passwordKeyName);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): DataSourceExternalSecret {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseDataSourceExternalSecret();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 8) {- break;- }-- message.secretType = dataSourceExternalSecret_SecretTypeFromJSON(reader.int32());- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.url = reader.string();- continue;- }- case 3: {- if (tag !== 24) {- break;- }-- message.authType = dataSourceExternalSecret_AuthTypeFromJSON(reader.int32());- continue;- }- case 4: {- if (tag !== 34) {- break;- }-- message.appRole = DataSourceExternalSecret_AppRoleAuthOption.decode(reader, reader.uint32());- continue;- }- case 5: {- if (tag !== 42) {- break;- }-- message.token = reader.string();- continue;- }- case 6: {- if (tag !== 50) {- break;- }-- message.engineName = reader.string();- continue;- }- case 7: {- if (tag !== 58) {- break;- }-- message.secretName = reader.string();- continue;- }- case 8: {- if (tag !== 66) {- break;- }-- message.passwordKeyName = reader.string();- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- fromJSON(object: any): DataSourceExternalSecret {- return {- secretType: isSet(object.secretType)- ? dataSourceExternalSecret_SecretTypeFromJSON(object.secretType)- : DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED,- url: isSet(object.url) ? globalThis.String(object.url) : "",- authType: isSet(object.authType)- ? dataSourceExternalSecret_AuthTypeFromJSON(object.authType)- : DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED,- appRole: isSet(object.appRole) ? DataSourceExternalSecret_AppRoleAuthOption.fromJSON(object.appRole) : undefined,- token: isSet(object.token) ? globalThis.String(object.token) : undefined,- engineName: isSet(object.engineName) ? globalThis.String(object.engineName) : "",- secretName: isSet(object.secretName) ? globalThis.String(object.secretName) : "",- passwordKeyName: isSet(object.passwordKeyName) ? globalThis.String(object.passwordKeyName) : "",- };- },-- toJSON(message: DataSourceExternalSecret): unknown {- const obj: any = {};- if (message.secretType !== DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED) {- obj.secretType = dataSourceExternalSecret_SecretTypeToJSON(message.secretType);- }- if (message.url !== "") {- obj.url = message.url;- }- if (message.authType !== DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED) {- obj.authType = dataSourceExternalSecret_AuthTypeToJSON(message.authType);- }- if (message.appRole !== undefined) {- obj.appRole = DataSourceExternalSecret_AppRoleAuthOption.toJSON(message.appRole);- }- if (message.token !== undefined) {- obj.token = message.token;- }- if (message.engineName !== "") {- obj.engineName = message.engineName;- }- if (message.secretName !== "") {- obj.secretName = message.secretName;- }- if (message.passwordKeyName !== "") {- obj.passwordKeyName = message.passwordKeyName;- }- return obj;- },-- create(base?: DeepPartial<DataSourceExternalSecret>): DataSourceExternalSecret {- return DataSourceExternalSecret.fromPartial(base ?? {});- },- fromPartial(object: DeepPartial<DataSourceExternalSecret>): DataSourceExternalSecret {- const message = createBaseDataSourceExternalSecret();- message.secretType = object.secretType ?? DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED;- message.url = object.url ?? "";- message.authType = object.authType ?? DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED;- message.appRole = (object.appRole !== undefined && object.appRole !== null)- ? DataSourceExternalSecret_AppRoleAuthOption.fromPartial(object.appRole)- : undefined;- message.token = object.token ?? undefined;- message.engineName = object.engineName ?? "";- message.secretName = object.secretName ?? "";- message.passwordKeyName = object.passwordKeyName ?? "";- return message;- },-};--function createBaseDataSourceExternalSecret_AppRoleAuthOption(): DataSourceExternalSecret_AppRoleAuthOption {- return {- roleId: "",- secretId: "",- type: DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED,- mountPath: "",- };-}--export const DataSourceExternalSecret_AppRoleAuthOption: MessageFns<DataSourceExternalSecret_AppRoleAuthOption> = {- encode(message: DataSourceExternalSecret_AppRoleAuthOption, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {- if (message.roleId !== "") {- writer.uint32(10).string(message.roleId);- }- if (message.secretId !== "") {- writer.uint32(18).string(message.secretId);- }- if (message.type !== DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED) {- writer.uint32(24).int32(dataSourceExternalSecret_AppRoleAuthOption_SecretTypeToNumber(message.type));- }- if (message.mountPath !== "") {- writer.uint32(34).string(message.mountPath);- }- return writer;- },-- decode(input: BinaryReader | Uint8Array, length?: number): DataSourceExternalSecret_AppRoleAuthOption {- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);- let end = length === undefined ? reader.len : reader.pos + length;- const message = createBaseDataSourceExternalSecret_AppRoleAuthOption();- while (reader.pos < end) {- const tag = reader.uint32();- switch (tag >>> 3) {- case 1: {- if (tag !== 10) {- break;- }-- message.roleId = reader.string();- continue;- }- case 2: {- if (tag !== 18) {- break;- }-- message.secretId = reader.string();- continue;- }- case 3: {- if (tag !== 24) {- break;- }-- message.type = dataSourceExternalSecret_AppRoleAuthOption_SecretTypeFromJSON(reader.int32());- continue;- }- case 4: {- if (tag !== 34) {- break;- }-- message.mountPath = reader.string();- continue;- }- }- if ((tag & 7) === 4 || tag === 0) {- break;- }- reader.skip(tag & 7);- }- return message;- },-- fromJSON(object: any): DataSourceExternalSecret_AppRoleAuthOption {- return {- roleId: isSet(object.roleId) ? globalThis.String(object.roleId) : "",- secretId: isSet(object.secretId) ? globalThis.String(object.secretId) : "",- type: isSet(object.type)- ? dataSourceExternalSecret_AppRoleAuthOption_SecretTypeFromJSON(object.type)- : DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED,- mountPath: isSet(object.mountPath) ? globalThis.String(object.mountPath) : "",- };- },-- toJSON(message: DataSourceExternalSecret_AppRoleAuthOption): unknown {- const obj: any = {};- if (message.roleId !== "") {- obj.roleId = message.roleId;- }- if (message.secretId !== "") {- obj.secretId = message.secretId;- }- if (message.type !== DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED) {- obj.type = dataSourceExternalSecret_AppRoleAuthOption_SecretTypeToJSON(message.type);- }- if (message.mountPath !== "") {- obj.mountPath = message.mountPath;- }- return obj;- },-- create(base?: DeepPartial<DataSourceExternalSecret_AppRoleAuthOption>): DataSourceExternalSecret_AppRoleAuthOption {- return DataSourceExternalSecret_AppRoleAuthOption.fromPartial(base ?? {});- },- fromPartial(- object: DeepPartial<DataSourceExternalSecret_AppRoleAuthOption>,- ): DataSourceExternalSecret_AppRoleAuthOption {- const message = createBaseDataSourceExternalSecret_AppRoleAuthOption();- message.roleId = object.roleId ?? "";- message.secretId = object.secretId ?? "";- message.type = object.type ?? DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED;- message.mountPath = object.mountPath ?? "";- return message;- },-};--function bytesFromBase64(b64: string): Uint8Array {- const bin = globalThis.atob(b64);- const arr = new Uint8Array(bin.length);- for (let i = 0; i < bin.length; ++i) {- arr[i] = bin.charCodeAt(i);- }- return arr;-}--function base64FromBytes(arr: Uint8Array): string {- const bin: string[] = [];- arr.forEach((byte) => {- bin.push(globalThis.String.fromCharCode(byte));- });- return globalThis.btoa(bin.join(""));-}--type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;--export type DeepPartial<T> = T extends Builtin ? T- : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }- : Partial<T>;--function isObject(value: any): boolean {- return typeof value === "object" && value !== null;-}--function isSet(value: any): boolean {- return value !== null && value !== undefined;-}--export interface MessageFns<T> {- encode(message: T, writer?: BinaryWriter): BinaryWriter;- decode(input: BinaryReader | Uint8Array, length?: number): T;- fromJSON(object: any): T;- toJSON(message: T): unknown;- create(base?: DeepPartial<T>): T;- fromPartial(object: DeepPartial<T>): T;-}diff --git a/frontend/src/types/proto/store/instance.ts b/frontend/src/types/proto/store/instance.tsindex be30b3a032..882ee68152 100644--- a/frontend/src/types/proto/store/instance.ts+++ b/frontend/src/types/proto/store/instance.ts@@ -12,6 +12,59 @@ import { Timestamp } from "../google/protobuf/timestamp";export const protobufPackage = "bytebase.store";+export enum DataSourceType {+ DATA_SOURCE_UNSPECIFIED = "DATA_SOURCE_UNSPECIFIED",+ ADMIN = "ADMIN",+ READ_ONLY = "READ_ONLY",+ UNRECOGNIZED = "UNRECOGNIZED",+}++export function dataSourceTypeFromJSON(object: any): DataSourceType {+ switch (object) {+ case 0:+ case "DATA_SOURCE_UNSPECIFIED":+ return DataSourceType.DATA_SOURCE_UNSPECIFIED;+ case 1:+ case "ADMIN":+ return DataSourceType.ADMIN;+ case 2:+ case "READ_ONLY":+ return DataSourceType.READ_ONLY;+ case -1:+ case "UNRECOGNIZED":+ default:+ return DataSourceType.UNRECOGNIZED;+ }+}++export function dataSourceTypeToJSON(object: DataSourceType): string {+ switch (object) {+ case DataSourceType.DATA_SOURCE_UNSPECIFIED:+ return "DATA_SOURCE_UNSPECIFIED";+ case DataSourceType.ADMIN:+ return "ADMIN";+ case DataSourceType.READ_ONLY:+ return "READ_ONLY";+ case DataSourceType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export function dataSourceTypeToNumber(object: DataSourceType): number {+ switch (object) {+ case DataSourceType.DATA_SOURCE_UNSPECIFIED:+ return 0;+ case DataSourceType.ADMIN:+ return 1;+ case DataSourceType.READ_ONLY:+ return 2;+ case DataSourceType.UNRECOGNIZED:+ default:+ return -1;+ }+}+/** InstanceMetadata is the metadata for instances. */export interface InstanceMetadata {/**@@ -35,6 +88,7 @@ export interface InstanceMetadata {* Default empty, means sync all schemas & databases.*/syncDatabases: string[];+ dataSources: DataSource[];}/** InstanceRole is the API message for instance role. */@@ -57,6 +111,438 @@ export interface InstanceRole {attribute?: string | undefined;}+export interface DataSource {+ id: string;+ type: DataSourceType;+ host: string;+ port: string;+ username: string;+ obfuscatedPassword: string;+ database: string;+ obfuscatedSslKey: string;+ obfuscatedSslCert: string;+ obfuscatedSslCa: string;+ /** srv is a boolean flag that indicates whether the host is a DNS SRV record. */+ srv: boolean;+ /** authentication_database is the database name to authenticate against, which stores the user credentials. */+ authenticationDatabase: string;+ /** sid and service_name are used for Oracle. */+ sid: string;+ serviceName: string;+ /**+ * SSH related+ * The hostname of the SSH server agent.+ */+ sshHost: string;+ /** The port of the SSH server agent. It's 22 typically. */+ sshPort: string;+ /** The user to login the server. */+ sshUser: string;+ /** The password to login the server. If it's empty string, no password is required. */+ sshObfuscatedPassword: 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"). */+ sshObfuscatedPrivateKey: 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.+ */+ authenticationPrivateKeyObfuscated: string;+ externalSecret: DataSourceExternalSecret | undefined;+ authenticationType: DataSource_AuthenticationType;+ clientSecretCredential?: DataSource_ClientSecretCredential | undefined;+ saslConfig:+ | SASLConfig+ | undefined;+ /** additional_addresses is used for MongoDB replica set. */+ additionalAddresses: DataSource_Address[];+ /** replica_set is used for MongoDB replica set. */+ replicaSet: string;+ /** direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. */+ directConnection: boolean;+ /** region is the location of where the DB is, works for AWS RDS. For example, us-east-1. */+ region: string;+ /** warehouse_id is used by Databricks. */+ warehouseId: string;+ /** master_name is the master name used by connecting redis-master via redis sentinel. */+ masterName: string;+ /** master_username and master_obfuscated_password are master credentials used by redis sentinel mode. */+ masterUsername: string;+ masterObfuscatedPassword: string;+ redisType: DataSource_RedisType;+ /** Use SSL to connect to the data source. By default, we use system default SSL configuration. */+ useSsl: boolean;+ /** Cluster is the cluster name for the data source. Used by CockroachDB. */+ cluster: string;+ /**+ * Extra connection parameters for the database connection.+ * For PostgreSQL HA, this can be used to set target_session_attrs=read-write+ */+ extraConnectionParameters: { [key: string]: string };+}++export enum DataSource_AuthenticationType {+ AUTHENTICATION_UNSPECIFIED = "AUTHENTICATION_UNSPECIFIED",+ PASSWORD = "PASSWORD",+ GOOGLE_CLOUD_SQL_IAM = "GOOGLE_CLOUD_SQL_IAM",+ AWS_RDS_IAM = "AWS_RDS_IAM",+ AZURE_IAM = "AZURE_IAM",+ UNRECOGNIZED = "UNRECOGNIZED",+}++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 3:+ case "AWS_RDS_IAM":+ return DataSource_AuthenticationType.AWS_RDS_IAM;+ case 4:+ case "AZURE_IAM":+ return DataSource_AuthenticationType.AZURE_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.AWS_RDS_IAM:+ return "AWS_RDS_IAM";+ case DataSource_AuthenticationType.AZURE_IAM:+ return "AZURE_IAM";+ case DataSource_AuthenticationType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export function dataSource_AuthenticationTypeToNumber(object: DataSource_AuthenticationType): number {+ switch (object) {+ case DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED:+ return 0;+ case DataSource_AuthenticationType.PASSWORD:+ return 1;+ case DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM:+ return 2;+ case DataSource_AuthenticationType.AWS_RDS_IAM:+ return 3;+ case DataSource_AuthenticationType.AZURE_IAM:+ return 4;+ case DataSource_AuthenticationType.UNRECOGNIZED:+ default:+ return -1;+ }+}++export enum DataSource_RedisType {+ REDIS_TYPE_UNSPECIFIED = "REDIS_TYPE_UNSPECIFIED",+ STANDALONE = "STANDALONE",+ SENTINEL = "SENTINEL",+ CLUSTER = "CLUSTER",+ UNRECOGNIZED = "UNRECOGNIZED",+}++export function dataSource_RedisTypeFromJSON(object: any): DataSource_RedisType {+ switch (object) {+ case 0:+ case "REDIS_TYPE_UNSPECIFIED":+ return DataSource_RedisType.REDIS_TYPE_UNSPECIFIED;+ case 1:+ case "STANDALONE":+ return DataSource_RedisType.STANDALONE;+ case 2:+ case "SENTINEL":+ return DataSource_RedisType.SENTINEL;+ case 3:+ case "CLUSTER":+ return DataSource_RedisType.CLUSTER;+ case -1:+ case "UNRECOGNIZED":+ default:+ return DataSource_RedisType.UNRECOGNIZED;+ }+}++export function dataSource_RedisTypeToJSON(object: DataSource_RedisType): string {+ switch (object) {+ case DataSource_RedisType.REDIS_TYPE_UNSPECIFIED:+ return "REDIS_TYPE_UNSPECIFIED";+ case DataSource_RedisType.STANDALONE:+ return "STANDALONE";+ case DataSource_RedisType.SENTINEL:+ return "SENTINEL";+ case DataSource_RedisType.CLUSTER:+ return "CLUSTER";+ case DataSource_RedisType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export function dataSource_RedisTypeToNumber(object: DataSource_RedisType): number {+ switch (object) {+ case DataSource_RedisType.REDIS_TYPE_UNSPECIFIED:+ return 0;+ case DataSource_RedisType.STANDALONE:+ return 1;+ case DataSource_RedisType.SENTINEL:+ return 2;+ case DataSource_RedisType.CLUSTER:+ return 3;+ case DataSource_RedisType.UNRECOGNIZED:+ default:+ return -1;+ }+}++export interface DataSource_ClientSecretCredential {+ tenantId: string;+ clientId: string;+ clientSecret: string;+}++export interface DataSource_Address {+ host: string;+ port: string;+}++export interface DataSource_ExtraConnectionParametersEntry {+ key: string;+ value: string;+}++export interface SASLConfig {+ krbConfig?: KerberosConfig | undefined;+}++export interface KerberosConfig {+ primary: string;+ instance: string;+ realm: string;+ keytab: Uint8Array;+ kdcHost: string;+ kdcPort: string;+ kdcTransportProtocol: string;+}++export interface DataSourceExternalSecret {+ secretType: DataSourceExternalSecret_SecretType;+ url: string;+ authType: DataSourceExternalSecret_AuthType;+ appRole?: DataSourceExternalSecret_AppRoleAuthOption | undefined;+ token?:+ | string+ | undefined;+ /** engine name is the name for secret engine. */+ engineName: string;+ /** the secret name in the engine to store the password. */+ secretName: string;+ /** the key name for the password. */+ passwordKeyName: string;+}++export enum DataSourceExternalSecret_SecretType {+ SAECRET_TYPE_UNSPECIFIED = "SAECRET_TYPE_UNSPECIFIED",+ /** VAULT_KV_V2 - ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 */+ VAULT_KV_V2 = "VAULT_KV_V2",+ /** AWS_SECRETS_MANAGER - ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html */+ AWS_SECRETS_MANAGER = "AWS_SECRETS_MANAGER",+ /** GCP_SECRET_MANAGER - ref: https://cloud.google.com/secret-manager/docs */+ GCP_SECRET_MANAGER = "GCP_SECRET_MANAGER",+ UNRECOGNIZED = "UNRECOGNIZED",+}++export function dataSourceExternalSecret_SecretTypeFromJSON(object: any): DataSourceExternalSecret_SecretType {+ switch (object) {+ case 0:+ case "SAECRET_TYPE_UNSPECIFIED":+ return DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED;+ case 1:+ case "VAULT_KV_V2":+ return DataSourceExternalSecret_SecretType.VAULT_KV_V2;+ case 2:+ case "AWS_SECRETS_MANAGER":+ return DataSourceExternalSecret_SecretType.AWS_SECRETS_MANAGER;+ case 3:+ case "GCP_SECRET_MANAGER":+ return DataSourceExternalSecret_SecretType.GCP_SECRET_MANAGER;+ case -1:+ case "UNRECOGNIZED":+ default:+ return DataSourceExternalSecret_SecretType.UNRECOGNIZED;+ }+}++export function dataSourceExternalSecret_SecretTypeToJSON(object: DataSourceExternalSecret_SecretType): string {+ switch (object) {+ case DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED:+ return "SAECRET_TYPE_UNSPECIFIED";+ case DataSourceExternalSecret_SecretType.VAULT_KV_V2:+ return "VAULT_KV_V2";+ case DataSourceExternalSecret_SecretType.AWS_SECRETS_MANAGER:+ return "AWS_SECRETS_MANAGER";+ case DataSourceExternalSecret_SecretType.GCP_SECRET_MANAGER:+ return "GCP_SECRET_MANAGER";+ case DataSourceExternalSecret_SecretType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export function dataSourceExternalSecret_SecretTypeToNumber(object: DataSourceExternalSecret_SecretType): number {+ switch (object) {+ case DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED:+ return 0;+ case DataSourceExternalSecret_SecretType.VAULT_KV_V2:+ return 1;+ case DataSourceExternalSecret_SecretType.AWS_SECRETS_MANAGER:+ return 2;+ case DataSourceExternalSecret_SecretType.GCP_SECRET_MANAGER:+ return 3;+ case DataSourceExternalSecret_SecretType.UNRECOGNIZED:+ default:+ return -1;+ }+}++export enum DataSourceExternalSecret_AuthType {+ AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",+ /** TOKEN - ref: https://developer.hashicorp.com/vault/docs/auth/token */+ TOKEN = "TOKEN",+ /** VAULT_APP_ROLE - ref: https://developer.hashicorp.com/vault/docs/auth/approle */+ VAULT_APP_ROLE = "VAULT_APP_ROLE",+ UNRECOGNIZED = "UNRECOGNIZED",+}++export function dataSourceExternalSecret_AuthTypeFromJSON(object: any): DataSourceExternalSecret_AuthType {+ switch (object) {+ case 0:+ case "AUTH_TYPE_UNSPECIFIED":+ return DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED;+ case 1:+ case "TOKEN":+ return DataSourceExternalSecret_AuthType.TOKEN;+ case 2:+ case "VAULT_APP_ROLE":+ return DataSourceExternalSecret_AuthType.VAULT_APP_ROLE;+ case -1:+ case "UNRECOGNIZED":+ default:+ return DataSourceExternalSecret_AuthType.UNRECOGNIZED;+ }+}++export function dataSourceExternalSecret_AuthTypeToJSON(object: DataSourceExternalSecret_AuthType): string {+ switch (object) {+ case DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED:+ return "AUTH_TYPE_UNSPECIFIED";+ case DataSourceExternalSecret_AuthType.TOKEN:+ return "TOKEN";+ case DataSourceExternalSecret_AuthType.VAULT_APP_ROLE:+ return "VAULT_APP_ROLE";+ case DataSourceExternalSecret_AuthType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export function dataSourceExternalSecret_AuthTypeToNumber(object: DataSourceExternalSecret_AuthType): number {+ switch (object) {+ case DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED:+ return 0;+ case DataSourceExternalSecret_AuthType.TOKEN:+ return 1;+ case DataSourceExternalSecret_AuthType.VAULT_APP_ROLE:+ return 2;+ case DataSourceExternalSecret_AuthType.UNRECOGNIZED:+ default:+ return -1;+ }+}++export interface DataSourceExternalSecret_AppRoleAuthOption {+ roleId: string;+ /** the secret id for the role without ttl. */+ secretId: string;+ type: DataSourceExternalSecret_AppRoleAuthOption_SecretType;+ /** The path where the approle auth method is mounted. */+ mountPath: string;+}++export enum DataSourceExternalSecret_AppRoleAuthOption_SecretType {+ SECRET_TYPE_UNSPECIFIED = "SECRET_TYPE_UNSPECIFIED",+ PLAIN = "PLAIN",+ ENVIRONMENT = "ENVIRONMENT",+ UNRECOGNIZED = "UNRECOGNIZED",+}++export function dataSourceExternalSecret_AppRoleAuthOption_SecretTypeFromJSON(+ object: any,+): DataSourceExternalSecret_AppRoleAuthOption_SecretType {+ switch (object) {+ case 0:+ case "SECRET_TYPE_UNSPECIFIED":+ return DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED;+ case 1:+ case "PLAIN":+ return DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN;+ case 2:+ case "ENVIRONMENT":+ return DataSourceExternalSecret_AppRoleAuthOption_SecretType.ENVIRONMENT;+ case -1:+ case "UNRECOGNIZED":+ default:+ return DataSourceExternalSecret_AppRoleAuthOption_SecretType.UNRECOGNIZED;+ }+}++export function dataSourceExternalSecret_AppRoleAuthOption_SecretTypeToJSON(+ object: DataSourceExternalSecret_AppRoleAuthOption_SecretType,+): string {+ switch (object) {+ case DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED:+ return "SECRET_TYPE_UNSPECIFIED";+ case DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN:+ return "PLAIN";+ case DataSourceExternalSecret_AppRoleAuthOption_SecretType.ENVIRONMENT:+ return "ENVIRONMENT";+ case DataSourceExternalSecret_AppRoleAuthOption_SecretType.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export function dataSourceExternalSecret_AppRoleAuthOption_SecretTypeToNumber(+ object: DataSourceExternalSecret_AppRoleAuthOption_SecretType,+): number {+ switch (object) {+ case DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED:+ return 0;+ case DataSourceExternalSecret_AppRoleAuthOption_SecretType.PLAIN:+ return 1;+ case DataSourceExternalSecret_AppRoleAuthOption_SecretType.ENVIRONMENT:+ return 2;+ case DataSourceExternalSecret_AppRoleAuthOption_SecretType.UNRECOGNIZED:+ default:+ return -1;+ }+}+function createBaseInstanceMetadata(): InstanceMetadata {return {mysqlLowerCaseTableNames: 0,@@ -65,6 +551,7 @@ function createBaseInstanceMetadata(): InstanceMetadata {syncInterval: undefined,maximumConnections: 0,syncDatabases: [],+ dataSources: [],};}@@ -88,6 +575,9 @@ export const InstanceMetadata: MessageFns<InstanceMetadata> = {for (const v of message.syncDatabases) {writer.uint32(50).string(v!);}+ for (const v of message.dataSources) {+ DataSource.encode(v!, writer.uint32(58).fork()).join();+ }return writer;},@@ -146,6 +636,14 @@ export const InstanceMetadata: MessageFns<InstanceMetadata> = {message.syncDatabases.push(reader.string());continue;}+ case 7: {+ if (tag !== 58) {+ break;+ }++ message.dataSources.push(DataSource.decode(reader, reader.uint32()));+ continue;+ }}if ((tag & 7) === 4 || tag === 0) {break;@@ -167,6 +665,9 @@ export const InstanceMetadata: MessageFns<InstanceMetadata> = {syncDatabases: globalThis.Array.isArray(object?.syncDatabases)? object.syncDatabases.map((e: any) => globalThis.String(e)): [],+ dataSources: globalThis.Array.isArray(object?.dataSources)+ ? object.dataSources.map((e: any) => DataSource.fromJSON(e))+ : [],};},@@ -190,6 +691,9 @@ export const InstanceMetadata: MessageFns<InstanceMetadata> = {if (message.syncDatabases?.length) {obj.syncDatabases = message.syncDatabases;}+ if (message.dataSources?.length) {+ obj.dataSources = message.dataSources.map((e) => DataSource.toJSON(e));+ }return obj;},@@ -208,6 +712,7 @@ export const InstanceMetadata: MessageFns<InstanceMetadata> = {: undefined;message.maximumConnections = object.maximumConnections ?? 0;message.syncDatabases = object.syncDatabases?.map((e) => e) || [];+ message.dataSources = object.dataSources?.map((e) => DataSource.fromPartial(e)) || [];return message;},};@@ -320,38 +825,1536 @@ export const InstanceRole: MessageFns<InstanceRole> = {},};-type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;+function createBaseDataSource(): DataSource {+ return {+ id: "",+ type: DataSourceType.DATA_SOURCE_UNSPECIFIED,+ host: "",+ port: "",+ username: "",+ obfuscatedPassword: "",+ database: "",+ obfuscatedSslKey: "",+ obfuscatedSslCert: "",+ obfuscatedSslCa: "",+ srv: false,+ authenticationDatabase: "",+ sid: "",+ serviceName: "",+ sshHost: "",+ sshPort: "",+ sshUser: "",+ sshObfuscatedPassword: "",+ sshObfuscatedPrivateKey: "",+ authenticationPrivateKeyObfuscated: "",+ externalSecret: undefined,+ authenticationType: DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED,+ clientSecretCredential: undefined,+ saslConfig: undefined,+ additionalAddresses: [],+ replicaSet: "",+ directConnection: false,+ region: "",+ warehouseId: "",+ masterName: "",+ masterUsername: "",+ masterObfuscatedPassword: "",+ redisType: DataSource_RedisType.REDIS_TYPE_UNSPECIFIED,+ useSsl: false,+ cluster: "",+ extraConnectionParameters: {},+ };+}-export type DeepPartial<T> = T extends Builtin ? T- : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>- : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }- : Partial<T>;+export const DataSource: MessageFns<DataSource> = {+ encode(message: DataSource, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.id !== "") {+ writer.uint32(10).string(message.id);+ }+ if (message.type !== DataSourceType.DATA_SOURCE_UNSPECIFIED) {+ writer.uint32(16).int32(dataSourceTypeToNumber(message.type));+ }+ if (message.host !== "") {+ writer.uint32(26).string(message.host);+ }+ if (message.port !== "") {+ writer.uint32(34).string(message.port);+ }+ if (message.username !== "") {+ writer.uint32(42).string(message.username);+ }+ if (message.obfuscatedPassword !== "") {+ writer.uint32(50).string(message.obfuscatedPassword);+ }+ if (message.database !== "") {+ writer.uint32(58).string(message.database);+ }+ if (message.obfuscatedSslKey !== "") {+ writer.uint32(66).string(message.obfuscatedSslKey);+ }+ if (message.obfuscatedSslCert !== "") {+ writer.uint32(74).string(message.obfuscatedSslCert);+ }+ if (message.obfuscatedSslCa !== "") {+ writer.uint32(82).string(message.obfuscatedSslCa);+ }+ if (message.srv !== false) {+ writer.uint32(88).bool(message.srv);+ }+ if (message.authenticationDatabase !== "") {+ writer.uint32(98).string(message.authenticationDatabase);+ }+ if (message.sid !== "") {+ writer.uint32(106).string(message.sid);+ }+ if (message.serviceName !== "") {+ writer.uint32(114).string(message.serviceName);+ }+ if (message.sshHost !== "") {+ writer.uint32(122).string(message.sshHost);+ }+ if (message.sshPort !== "") {+ writer.uint32(130).string(message.sshPort);+ }+ if (message.sshUser !== "") {+ writer.uint32(138).string(message.sshUser);+ }+ if (message.sshObfuscatedPassword !== "") {+ writer.uint32(146).string(message.sshObfuscatedPassword);+ }+ if (message.sshObfuscatedPrivateKey !== "") {+ writer.uint32(154).string(message.sshObfuscatedPrivateKey);+ }+ if (message.authenticationPrivateKeyObfuscated !== "") {+ writer.uint32(162).string(message.authenticationPrivateKeyObfuscated);+ }+ if (message.externalSecret !== undefined) {+ DataSourceExternalSecret.encode(message.externalSecret, writer.uint32(170).fork()).join();+ }+ if (message.authenticationType !== DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED) {+ writer.uint32(176).int32(dataSource_AuthenticationTypeToNumber(message.authenticationType));+ }+ if (message.clientSecretCredential !== undefined) {+ DataSource_ClientSecretCredential.encode(message.clientSecretCredential, writer.uint32(186).fork()).join();+ }+ if (message.saslConfig !== undefined) {+ SASLConfig.encode(message.saslConfig, writer.uint32(194).fork()).join();+ }+ for (const v of message.additionalAddresses) {+ DataSource_Address.encode(v!, writer.uint32(202).fork()).join();+ }+ if (message.replicaSet !== "") {+ writer.uint32(210).string(message.replicaSet);+ }+ if (message.directConnection !== false) {+ writer.uint32(216).bool(message.directConnection);+ }+ if (message.region !== "") {+ writer.uint32(226).string(message.region);+ }+ if (message.warehouseId !== "") {+ writer.uint32(234).string(message.warehouseId);+ }+ if (message.masterName !== "") {+ writer.uint32(242).string(message.masterName);+ }+ if (message.masterUsername !== "") {+ writer.uint32(250).string(message.masterUsername);+ }+ if (message.masterObfuscatedPassword !== "") {+ writer.uint32(258).string(message.masterObfuscatedPassword);+ }+ if (message.redisType !== DataSource_RedisType.REDIS_TYPE_UNSPECIFIED) {+ writer.uint32(264).int32(dataSource_RedisTypeToNumber(message.redisType));+ }+ if (message.useSsl !== false) {+ writer.uint32(272).bool(message.useSsl);+ }+ if (message.cluster !== "") {+ writer.uint32(282).string(message.cluster);+ }+ Object.entries(message.extraConnectionParameters).forEach(([key, value]) => {+ DataSource_ExtraConnectionParametersEntry.encode({ key: key as any, value }, writer.uint32(290).fork()).join();+ });+ return writer;+ },-function toTimestamp(date: Date): Timestamp {- const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));- const nanos = (date.getTime() % 1_000) * 1_000_000;- return { seconds, nanos };-}+ decode(input: BinaryReader | Uint8Array, length?: number): DataSource {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDataSource();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }-function fromTimestamp(t: Timestamp): Date {- let millis = (t.seconds.toNumber() || 0) * 1_000;- millis += (t.nanos || 0) / 1_000_000;- return new globalThis.Date(millis);-}+ message.id = reader.string();+ continue;+ }+ case 2: {+ if (tag !== 16) {+ break;+ }-function fromJsonTimestamp(o: any): Timestamp {- if (o instanceof globalThis.Date) {- return toTimestamp(o);- } else if (typeof o === "string") {- return toTimestamp(new globalThis.Date(o));- } else {- return Timestamp.fromJSON(o);- }-}+ message.type = dataSourceTypeFromJSON(reader.int32());+ continue;+ }+ case 3: {+ if (tag !== 26) {+ break;+ }-function numberToLong(number: number) {- return Long.fromNumber(number);+ message.host = reader.string();+ continue;+ }+ case 4: {+ if (tag !== 34) {+ break;+ }++ message.port = reader.string();+ continue;+ }+ case 5: {+ if (tag !== 42) {+ break;+ }++ message.username = reader.string();+ continue;+ }+ case 6: {+ if (tag !== 50) {+ break;+ }++ message.obfuscatedPassword = reader.string();+ continue;+ }+ case 7: {+ if (tag !== 58) {+ break;+ }++ message.database = reader.string();+ continue;+ }+ case 8: {+ if (tag !== 66) {+ break;+ }++ message.obfuscatedSslKey = reader.string();+ continue;+ }+ case 9: {+ if (tag !== 74) {+ break;+ }++ message.obfuscatedSslCert = reader.string();+ continue;+ }+ case 10: {+ if (tag !== 82) {+ break;+ }++ message.obfuscatedSslCa = reader.string();+ continue;+ }+ case 11: {+ if (tag !== 88) {+ break;+ }++ message.srv = reader.bool();+ continue;+ }+ case 12: {+ if (tag !== 98) {+ break;+ }++ message.authenticationDatabase = reader.string();+ continue;+ }+ case 13: {+ if (tag !== 106) {+ break;+ }++ message.sid = reader.string();+ continue;+ }+ case 14: {+ if (tag !== 114) {+ break;+ }++ message.serviceName = reader.string();+ continue;+ }+ case 15: {+ if (tag !== 122) {+ break;+ }++ message.sshHost = reader.string();+ continue;+ }+ case 16: {+ if (tag !== 130) {+ break;+ }++ message.sshPort = reader.string();+ continue;+ }+ case 17: {+ if (tag !== 138) {+ break;+ }++ message.sshUser = reader.string();+ continue;+ }+ case 18: {+ if (tag !== 146) {+ break;+ }++ message.sshObfuscatedPassword = reader.string();+ continue;+ }+ case 19: {+ if (tag !== 154) {+ break;+ }++ message.sshObfuscatedPrivateKey = reader.string();+ continue;+ }+ case 20: {+ if (tag !== 162) {+ break;+ }++ message.authenticationPrivateKeyObfuscated = reader.string();+ continue;+ }+ case 21: {+ if (tag !== 170) {+ break;+ }++ message.externalSecret = DataSourceExternalSecret.decode(reader, reader.uint32());+ continue;+ }+ case 22: {+ if (tag !== 176) {+ break;+ }++ message.authenticationType = dataSource_AuthenticationTypeFromJSON(reader.int32());+ continue;+ }+ case 23: {+ if (tag !== 186) {+ break;+ }++ message.clientSecretCredential = DataSource_ClientSecretCredential.decode(reader, reader.uint32());+ continue;+ }+ case 24: {+ if (tag !== 194) {+ break;+ }++ message.saslConfig = SASLConfig.decode(reader, reader.uint32());+ continue;+ }+ case 25: {+ if (tag !== 202) {+ break;+ }++ message.additionalAddresses.push(DataSource_Address.decode(reader, reader.uint32()));+ continue;+ }+ case 26: {+ if (tag !== 210) {+ break;+ }++ message.replicaSet = reader.string();+ continue;+ }+ case 27: {+ if (tag !== 216) {+ break;+ }++ message.directConnection = reader.bool();+ continue;+ }+ case 28: {+ if (tag !== 226) {+ break;+ }++ message.region = reader.string();+ continue;+ }+ case 29: {+ if (tag !== 234) {+ break;+ }++ message.warehouseId = reader.string();+ continue;+ }+ case 30: {+ if (tag !== 242) {+ break;+ }++ message.masterName = reader.string();+ continue;+ }+ case 31: {+ if (tag !== 250) {+ break;+ }++ message.masterUsername = reader.string();+ continue;+ }+ case 32: {+ if (tag !== 258) {+ break;+ }++ message.masterObfuscatedPassword = reader.string();+ continue;+ }+ case 33: {+ if (tag !== 264) {+ break;+ }++ message.redisType = dataSource_RedisTypeFromJSON(reader.int32());+ continue;+ }+ case 34: {+ if (tag !== 272) {+ break;+ }++ message.useSsl = reader.bool();+ continue;+ }+ case 35: {+ if (tag !== 282) {+ break;+ }++ message.cluster = reader.string();+ continue;+ }+ case 36: {+ if (tag !== 290) {+ break;+ }++ const entry36 = DataSource_ExtraConnectionParametersEntry.decode(reader, reader.uint32());+ if (entry36.value !== undefined) {+ message.extraConnectionParameters[entry36.key] = entry36.value;+ }+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DataSource {+ return {+ id: isSet(object.id) ? globalThis.String(object.id) : "",+ type: isSet(object.type) ? dataSourceTypeFromJSON(object.type) : DataSourceType.DATA_SOURCE_UNSPECIFIED,+ host: isSet(object.host) ? globalThis.String(object.host) : "",+ port: isSet(object.port) ? globalThis.String(object.port) : "",+ username: isSet(object.username) ? globalThis.String(object.username) : "",+ obfuscatedPassword: isSet(object.obfuscatedPassword) ? globalThis.String(object.obfuscatedPassword) : "",+ database: isSet(object.database) ? globalThis.String(object.database) : "",+ obfuscatedSslKey: isSet(object.obfuscatedSslKey) ? globalThis.String(object.obfuscatedSslKey) : "",+ obfuscatedSslCert: isSet(object.obfuscatedSslCert) ? globalThis.String(object.obfuscatedSslCert) : "",+ obfuscatedSslCa: isSet(object.obfuscatedSslCa) ? globalThis.String(object.obfuscatedSslCa) : "",+ srv: isSet(object.srv) ? globalThis.Boolean(object.srv) : false,+ authenticationDatabase: isSet(object.authenticationDatabase)+ ? globalThis.String(object.authenticationDatabase)+ : "",+ sid: isSet(object.sid) ? globalThis.String(object.sid) : "",+ serviceName: isSet(object.serviceName) ? globalThis.String(object.serviceName) : "",+ sshHost: isSet(object.sshHost) ? globalThis.String(object.sshHost) : "",+ sshPort: isSet(object.sshPort) ? globalThis.String(object.sshPort) : "",+ sshUser: isSet(object.sshUser) ? globalThis.String(object.sshUser) : "",+ sshObfuscatedPassword: isSet(object.sshObfuscatedPassword) ? globalThis.String(object.sshObfuscatedPassword) : "",+ sshObfuscatedPrivateKey: isSet(object.sshObfuscatedPrivateKey)+ ? globalThis.String(object.sshObfuscatedPrivateKey)+ : "",+ authenticationPrivateKeyObfuscated: isSet(object.authenticationPrivateKeyObfuscated)+ ? globalThis.String(object.authenticationPrivateKeyObfuscated)+ : "",+ externalSecret: isSet(object.externalSecret)+ ? DataSourceExternalSecret.fromJSON(object.externalSecret)+ : undefined,+ authenticationType: isSet(object.authenticationType)+ ? dataSource_AuthenticationTypeFromJSON(object.authenticationType)+ : DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED,+ clientSecretCredential: isSet(object.clientSecretCredential)+ ? DataSource_ClientSecretCredential.fromJSON(object.clientSecretCredential)+ : undefined,+ saslConfig: isSet(object.saslConfig) ? SASLConfig.fromJSON(object.saslConfig) : undefined,+ additionalAddresses: globalThis.Array.isArray(object?.additionalAddresses)+ ? object.additionalAddresses.map((e: any) => DataSource_Address.fromJSON(e))+ : [],+ replicaSet: isSet(object.replicaSet) ? globalThis.String(object.replicaSet) : "",+ directConnection: isSet(object.directConnection) ? globalThis.Boolean(object.directConnection) : false,+ region: isSet(object.region) ? globalThis.String(object.region) : "",+ warehouseId: isSet(object.warehouseId) ? globalThis.String(object.warehouseId) : "",+ masterName: isSet(object.masterName) ? globalThis.String(object.masterName) : "",+ masterUsername: isSet(object.masterUsername) ? globalThis.String(object.masterUsername) : "",+ masterObfuscatedPassword: isSet(object.masterObfuscatedPassword)+ ? globalThis.String(object.masterObfuscatedPassword)+ : "",+ redisType: isSet(object.redisType)+ ? dataSource_RedisTypeFromJSON(object.redisType)+ : DataSource_RedisType.REDIS_TYPE_UNSPECIFIED,+ useSsl: isSet(object.useSsl) ? globalThis.Boolean(object.useSsl) : false,+ cluster: isSet(object.cluster) ? globalThis.String(object.cluster) : "",+ extraConnectionParameters: isObject(object.extraConnectionParameters)+ ? Object.entries(object.extraConnectionParameters).reduce<{ [key: string]: string }>((acc, [key, value]) => {+ acc[key] = String(value);+ return acc;+ }, {})+ : {},+ };+ },++ toJSON(message: DataSource): unknown {+ const obj: any = {};+ if (message.id !== "") {+ obj.id = message.id;+ }+ if (message.type !== DataSourceType.DATA_SOURCE_UNSPECIFIED) {+ obj.type = dataSourceTypeToJSON(message.type);+ }+ if (message.host !== "") {+ obj.host = message.host;+ }+ if (message.port !== "") {+ obj.port = message.port;+ }+ if (message.username !== "") {+ obj.username = message.username;+ }+ if (message.obfuscatedPassword !== "") {+ obj.obfuscatedPassword = message.obfuscatedPassword;+ }+ if (message.database !== "") {+ obj.database = message.database;+ }+ if (message.obfuscatedSslKey !== "") {+ obj.obfuscatedSslKey = message.obfuscatedSslKey;+ }+ if (message.obfuscatedSslCert !== "") {+ obj.obfuscatedSslCert = message.obfuscatedSslCert;+ }+ if (message.obfuscatedSslCa !== "") {+ obj.obfuscatedSslCa = message.obfuscatedSslCa;+ }+ if (message.srv !== false) {+ obj.srv = message.srv;+ }+ if (message.authenticationDatabase !== "") {+ obj.authenticationDatabase = message.authenticationDatabase;+ }+ if (message.sid !== "") {+ obj.sid = message.sid;+ }+ if (message.serviceName !== "") {+ obj.serviceName = message.serviceName;+ }+ if (message.sshHost !== "") {+ obj.sshHost = message.sshHost;+ }+ if (message.sshPort !== "") {+ obj.sshPort = message.sshPort;+ }+ if (message.sshUser !== "") {+ obj.sshUser = message.sshUser;+ }+ if (message.sshObfuscatedPassword !== "") {+ obj.sshObfuscatedPassword = message.sshObfuscatedPassword;+ }+ if (message.sshObfuscatedPrivateKey !== "") {+ obj.sshObfuscatedPrivateKey = message.sshObfuscatedPrivateKey;+ }+ if (message.authenticationPrivateKeyObfuscated !== "") {+ obj.authenticationPrivateKeyObfuscated = message.authenticationPrivateKeyObfuscated;+ }+ if (message.externalSecret !== undefined) {+ obj.externalSecret = DataSourceExternalSecret.toJSON(message.externalSecret);+ }+ if (message.authenticationType !== DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED) {+ obj.authenticationType = dataSource_AuthenticationTypeToJSON(message.authenticationType);+ }+ if (message.clientSecretCredential !== undefined) {+ obj.clientSecretCredential = DataSource_ClientSecretCredential.toJSON(message.clientSecretCredential);+ }+ if (message.saslConfig !== undefined) {+ obj.saslConfig = SASLConfig.toJSON(message.saslConfig);+ }+ if (message.additionalAddresses?.length) {+ obj.additionalAddresses = message.additionalAddresses.map((e) => DataSource_Address.toJSON(e));+ }+ if (message.replicaSet !== "") {+ obj.replicaSet = message.replicaSet;+ }+ if (message.directConnection !== false) {+ obj.directConnection = message.directConnection;+ }+ if (message.region !== "") {+ obj.region = message.region;+ }+ if (message.warehouseId !== "") {+ obj.warehouseId = message.warehouseId;+ }+ if (message.masterName !== "") {+ obj.masterName = message.masterName;+ }+ if (message.masterUsername !== "") {+ obj.masterUsername = message.masterUsername;+ }+ if (message.masterObfuscatedPassword !== "") {+ obj.masterObfuscatedPassword = message.masterObfuscatedPassword;+ }+ if (message.redisType !== DataSource_RedisType.REDIS_TYPE_UNSPECIFIED) {+ obj.redisType = dataSource_RedisTypeToJSON(message.redisType);+ }+ if (message.useSsl !== false) {+ obj.useSsl = message.useSsl;+ }+ if (message.cluster !== "") {+ obj.cluster = message.cluster;+ }+ if (message.extraConnectionParameters) {+ const entries = Object.entries(message.extraConnectionParameters);+ if (entries.length > 0) {+ obj.extraConnectionParameters = {};+ entries.forEach(([k, v]) => {+ obj.extraConnectionParameters[k] = v;+ });+ }+ }+ return obj;+ },++ create(base?: DeepPartial<DataSource>): DataSource {+ return DataSource.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<DataSource>): DataSource {+ const message = createBaseDataSource();+ message.id = object.id ?? "";+ message.type = object.type ?? DataSourceType.DATA_SOURCE_UNSPECIFIED;+ message.host = object.host ?? "";+ message.port = object.port ?? "";+ message.username = object.username ?? "";+ message.obfuscatedPassword = object.obfuscatedPassword ?? "";+ message.database = object.database ?? "";+ message.obfuscatedSslKey = object.obfuscatedSslKey ?? "";+ message.obfuscatedSslCert = object.obfuscatedSslCert ?? "";+ message.obfuscatedSslCa = object.obfuscatedSslCa ?? "";+ message.srv = object.srv ?? false;+ message.authenticationDatabase = object.authenticationDatabase ?? "";+ message.sid = object.sid ?? "";+ message.serviceName = object.serviceName ?? "";+ message.sshHost = object.sshHost ?? "";+ message.sshPort = object.sshPort ?? "";+ message.sshUser = object.sshUser ?? "";+ message.sshObfuscatedPassword = object.sshObfuscatedPassword ?? "";+ message.sshObfuscatedPrivateKey = object.sshObfuscatedPrivateKey ?? "";+ message.authenticationPrivateKeyObfuscated = object.authenticationPrivateKeyObfuscated ?? "";+ message.externalSecret = (object.externalSecret !== undefined && object.externalSecret !== null)+ ? DataSourceExternalSecret.fromPartial(object.externalSecret)+ : undefined;+ message.authenticationType = object.authenticationType ?? DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED;+ message.clientSecretCredential =+ (object.clientSecretCredential !== undefined && object.clientSecretCredential !== null)+ ? DataSource_ClientSecretCredential.fromPartial(object.clientSecretCredential)+ : undefined;+ message.saslConfig = (object.saslConfig !== undefined && object.saslConfig !== null)+ ? SASLConfig.fromPartial(object.saslConfig)+ : undefined;+ message.additionalAddresses = object.additionalAddresses?.map((e) => DataSource_Address.fromPartial(e)) || [];+ message.replicaSet = object.replicaSet ?? "";+ message.directConnection = object.directConnection ?? false;+ message.region = object.region ?? "";+ message.warehouseId = object.warehouseId ?? "";+ message.masterName = object.masterName ?? "";+ message.masterUsername = object.masterUsername ?? "";+ message.masterObfuscatedPassword = object.masterObfuscatedPassword ?? "";+ message.redisType = object.redisType ?? DataSource_RedisType.REDIS_TYPE_UNSPECIFIED;+ message.useSsl = object.useSsl ?? false;+ message.cluster = object.cluster ?? "";+ message.extraConnectionParameters = Object.entries(object.extraConnectionParameters ?? {}).reduce<+ { [key: string]: string }+ >((acc, [key, value]) => {+ if (value !== undefined) {+ acc[key] = globalThis.String(value);+ }+ return acc;+ }, {});+ return message;+ },+};++function createBaseDataSource_ClientSecretCredential(): DataSource_ClientSecretCredential {+ return { tenantId: "", clientId: "", clientSecret: "" };+}++export const DataSource_ClientSecretCredential: MessageFns<DataSource_ClientSecretCredential> = {+ encode(message: DataSource_ClientSecretCredential, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.tenantId !== "") {+ writer.uint32(10).string(message.tenantId);+ }+ if (message.clientId !== "") {+ writer.uint32(18).string(message.clientId);+ }+ if (message.clientSecret !== "") {+ writer.uint32(26).string(message.clientSecret);+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): DataSource_ClientSecretCredential {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDataSource_ClientSecretCredential();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.tenantId = reader.string();+ continue;+ }+ case 2: {+ if (tag !== 18) {+ break;+ }++ message.clientId = reader.string();+ continue;+ }+ case 3: {+ if (tag !== 26) {+ break;+ }++ message.clientSecret = reader.string();+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DataSource_ClientSecretCredential {+ return {+ tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",+ clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",+ clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",+ };+ },++ toJSON(message: DataSource_ClientSecretCredential): unknown {+ const obj: any = {};+ if (message.tenantId !== "") {+ obj.tenantId = message.tenantId;+ }+ if (message.clientId !== "") {+ obj.clientId = message.clientId;+ }+ if (message.clientSecret !== "") {+ obj.clientSecret = message.clientSecret;+ }+ return obj;+ },++ create(base?: DeepPartial<DataSource_ClientSecretCredential>): DataSource_ClientSecretCredential {+ return DataSource_ClientSecretCredential.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<DataSource_ClientSecretCredential>): DataSource_ClientSecretCredential {+ const message = createBaseDataSource_ClientSecretCredential();+ message.tenantId = object.tenantId ?? "";+ message.clientId = object.clientId ?? "";+ message.clientSecret = object.clientSecret ?? "";+ return message;+ },+};++function createBaseDataSource_Address(): DataSource_Address {+ return { host: "", port: "" };+}++export const DataSource_Address: MessageFns<DataSource_Address> = {+ encode(message: DataSource_Address, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.host !== "") {+ writer.uint32(10).string(message.host);+ }+ if (message.port !== "") {+ writer.uint32(18).string(message.port);+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): DataSource_Address {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDataSource_Address();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.host = reader.string();+ continue;+ }+ case 2: {+ if (tag !== 18) {+ break;+ }++ message.port = reader.string();+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DataSource_Address {+ return {+ host: isSet(object.host) ? globalThis.String(object.host) : "",+ port: isSet(object.port) ? globalThis.String(object.port) : "",+ };+ },++ toJSON(message: DataSource_Address): unknown {+ const obj: any = {};+ if (message.host !== "") {+ obj.host = message.host;+ }+ if (message.port !== "") {+ obj.port = message.port;+ }+ return obj;+ },++ create(base?: DeepPartial<DataSource_Address>): DataSource_Address {+ return DataSource_Address.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<DataSource_Address>): DataSource_Address {+ const message = createBaseDataSource_Address();+ message.host = object.host ?? "";+ message.port = object.port ?? "";+ return message;+ },+};++function createBaseDataSource_ExtraConnectionParametersEntry(): DataSource_ExtraConnectionParametersEntry {+ return { key: "", value: "" };+}++export const DataSource_ExtraConnectionParametersEntry: MessageFns<DataSource_ExtraConnectionParametersEntry> = {+ encode(message: DataSource_ExtraConnectionParametersEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.key !== "") {+ writer.uint32(10).string(message.key);+ }+ if (message.value !== "") {+ writer.uint32(18).string(message.value);+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): DataSource_ExtraConnectionParametersEntry {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDataSource_ExtraConnectionParametersEntry();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.key = reader.string();+ continue;+ }+ case 2: {+ if (tag !== 18) {+ break;+ }++ message.value = reader.string();+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DataSource_ExtraConnectionParametersEntry {+ return {+ key: isSet(object.key) ? globalThis.String(object.key) : "",+ value: isSet(object.value) ? globalThis.String(object.value) : "",+ };+ },++ toJSON(message: DataSource_ExtraConnectionParametersEntry): unknown {+ const obj: any = {};+ if (message.key !== "") {+ obj.key = message.key;+ }+ if (message.value !== "") {+ obj.value = message.value;+ }+ return obj;+ },++ create(base?: DeepPartial<DataSource_ExtraConnectionParametersEntry>): DataSource_ExtraConnectionParametersEntry {+ return DataSource_ExtraConnectionParametersEntry.fromPartial(base ?? {});+ },+ fromPartial(+ object: DeepPartial<DataSource_ExtraConnectionParametersEntry>,+ ): DataSource_ExtraConnectionParametersEntry {+ const message = createBaseDataSource_ExtraConnectionParametersEntry();+ message.key = object.key ?? "";+ message.value = object.value ?? "";+ return message;+ },+};++function createBaseSASLConfig(): SASLConfig {+ return { krbConfig: undefined };+}++export const SASLConfig: MessageFns<SASLConfig> = {+ encode(message: SASLConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.krbConfig !== undefined) {+ KerberosConfig.encode(message.krbConfig, writer.uint32(10).fork()).join();+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): SASLConfig {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseSASLConfig();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.krbConfig = KerberosConfig.decode(reader, reader.uint32());+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): SASLConfig {+ return { krbConfig: isSet(object.krbConfig) ? KerberosConfig.fromJSON(object.krbConfig) : undefined };+ },++ toJSON(message: SASLConfig): unknown {+ const obj: any = {};+ if (message.krbConfig !== undefined) {+ obj.krbConfig = KerberosConfig.toJSON(message.krbConfig);+ }+ return obj;+ },++ create(base?: DeepPartial<SASLConfig>): SASLConfig {+ return SASLConfig.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<SASLConfig>): SASLConfig {+ const message = createBaseSASLConfig();+ message.krbConfig = (object.krbConfig !== undefined && object.krbConfig !== null)+ ? KerberosConfig.fromPartial(object.krbConfig)+ : undefined;+ return message;+ },+};++function createBaseKerberosConfig(): KerberosConfig {+ return {+ primary: "",+ instance: "",+ realm: "",+ keytab: new Uint8Array(0),+ kdcHost: "",+ kdcPort: "",+ kdcTransportProtocol: "",+ };+}++export const KerberosConfig: MessageFns<KerberosConfig> = {+ encode(message: KerberosConfig, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.primary !== "") {+ writer.uint32(10).string(message.primary);+ }+ if (message.instance !== "") {+ writer.uint32(18).string(message.instance);+ }+ if (message.realm !== "") {+ writer.uint32(26).string(message.realm);+ }+ if (message.keytab.length !== 0) {+ writer.uint32(34).bytes(message.keytab);+ }+ if (message.kdcHost !== "") {+ writer.uint32(42).string(message.kdcHost);+ }+ if (message.kdcPort !== "") {+ writer.uint32(50).string(message.kdcPort);+ }+ if (message.kdcTransportProtocol !== "") {+ writer.uint32(58).string(message.kdcTransportProtocol);+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): KerberosConfig {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseKerberosConfig();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.primary = reader.string();+ continue;+ }+ case 2: {+ if (tag !== 18) {+ break;+ }++ message.instance = reader.string();+ continue;+ }+ case 3: {+ if (tag !== 26) {+ break;+ }++ message.realm = reader.string();+ continue;+ }+ case 4: {+ if (tag !== 34) {+ break;+ }++ message.keytab = reader.bytes();+ continue;+ }+ case 5: {+ if (tag !== 42) {+ break;+ }++ message.kdcHost = reader.string();+ continue;+ }+ case 6: {+ if (tag !== 50) {+ break;+ }++ message.kdcPort = reader.string();+ continue;+ }+ case 7: {+ if (tag !== 58) {+ break;+ }++ message.kdcTransportProtocol = reader.string();+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): KerberosConfig {+ return {+ primary: isSet(object.primary) ? globalThis.String(object.primary) : "",+ instance: isSet(object.instance) ? globalThis.String(object.instance) : "",+ realm: isSet(object.realm) ? globalThis.String(object.realm) : "",+ keytab: isSet(object.keytab) ? bytesFromBase64(object.keytab) : new Uint8Array(0),+ kdcHost: isSet(object.kdcHost) ? globalThis.String(object.kdcHost) : "",+ kdcPort: isSet(object.kdcPort) ? globalThis.String(object.kdcPort) : "",+ kdcTransportProtocol: isSet(object.kdcTransportProtocol) ? globalThis.String(object.kdcTransportProtocol) : "",+ };+ },++ toJSON(message: KerberosConfig): unknown {+ const obj: any = {};+ if (message.primary !== "") {+ obj.primary = message.primary;+ }+ if (message.instance !== "") {+ obj.instance = message.instance;+ }+ if (message.realm !== "") {+ obj.realm = message.realm;+ }+ if (message.keytab.length !== 0) {+ obj.keytab = base64FromBytes(message.keytab);+ }+ if (message.kdcHost !== "") {+ obj.kdcHost = message.kdcHost;+ }+ if (message.kdcPort !== "") {+ obj.kdcPort = message.kdcPort;+ }+ if (message.kdcTransportProtocol !== "") {+ obj.kdcTransportProtocol = message.kdcTransportProtocol;+ }+ return obj;+ },++ create(base?: DeepPartial<KerberosConfig>): KerberosConfig {+ return KerberosConfig.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<KerberosConfig>): KerberosConfig {+ const message = createBaseKerberosConfig();+ message.primary = object.primary ?? "";+ message.instance = object.instance ?? "";+ message.realm = object.realm ?? "";+ message.keytab = object.keytab ?? new Uint8Array(0);+ message.kdcHost = object.kdcHost ?? "";+ message.kdcPort = object.kdcPort ?? "";+ message.kdcTransportProtocol = object.kdcTransportProtocol ?? "";+ return message;+ },+};++function createBaseDataSourceExternalSecret(): DataSourceExternalSecret {+ return {+ secretType: DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED,+ url: "",+ authType: DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED,+ appRole: undefined,+ token: undefined,+ engineName: "",+ secretName: "",+ passwordKeyName: "",+ };+}++export const DataSourceExternalSecret: MessageFns<DataSourceExternalSecret> = {+ encode(message: DataSourceExternalSecret, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.secretType !== DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED) {+ writer.uint32(8).int32(dataSourceExternalSecret_SecretTypeToNumber(message.secretType));+ }+ if (message.url !== "") {+ writer.uint32(18).string(message.url);+ }+ if (message.authType !== DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED) {+ writer.uint32(24).int32(dataSourceExternalSecret_AuthTypeToNumber(message.authType));+ }+ if (message.appRole !== undefined) {+ DataSourceExternalSecret_AppRoleAuthOption.encode(message.appRole, writer.uint32(34).fork()).join();+ }+ if (message.token !== undefined) {+ writer.uint32(42).string(message.token);+ }+ if (message.engineName !== "") {+ writer.uint32(50).string(message.engineName);+ }+ if (message.secretName !== "") {+ writer.uint32(58).string(message.secretName);+ }+ if (message.passwordKeyName !== "") {+ writer.uint32(66).string(message.passwordKeyName);+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): DataSourceExternalSecret {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDataSourceExternalSecret();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 8) {+ break;+ }++ message.secretType = dataSourceExternalSecret_SecretTypeFromJSON(reader.int32());+ continue;+ }+ case 2: {+ if (tag !== 18) {+ break;+ }++ message.url = reader.string();+ continue;+ }+ case 3: {+ if (tag !== 24) {+ break;+ }++ message.authType = dataSourceExternalSecret_AuthTypeFromJSON(reader.int32());+ continue;+ }+ case 4: {+ if (tag !== 34) {+ break;+ }++ message.appRole = DataSourceExternalSecret_AppRoleAuthOption.decode(reader, reader.uint32());+ continue;+ }+ case 5: {+ if (tag !== 42) {+ break;+ }++ message.token = reader.string();+ continue;+ }+ case 6: {+ if (tag !== 50) {+ break;+ }++ message.engineName = reader.string();+ continue;+ }+ case 7: {+ if (tag !== 58) {+ break;+ }++ message.secretName = reader.string();+ continue;+ }+ case 8: {+ if (tag !== 66) {+ break;+ }++ message.passwordKeyName = reader.string();+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DataSourceExternalSecret {+ return {+ secretType: isSet(object.secretType)+ ? dataSourceExternalSecret_SecretTypeFromJSON(object.secretType)+ : DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED,+ url: isSet(object.url) ? globalThis.String(object.url) : "",+ authType: isSet(object.authType)+ ? dataSourceExternalSecret_AuthTypeFromJSON(object.authType)+ : DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED,+ appRole: isSet(object.appRole) ? DataSourceExternalSecret_AppRoleAuthOption.fromJSON(object.appRole) : undefined,+ token: isSet(object.token) ? globalThis.String(object.token) : undefined,+ engineName: isSet(object.engineName) ? globalThis.String(object.engineName) : "",+ secretName: isSet(object.secretName) ? globalThis.String(object.secretName) : "",+ passwordKeyName: isSet(object.passwordKeyName) ? globalThis.String(object.passwordKeyName) : "",+ };+ },++ toJSON(message: DataSourceExternalSecret): unknown {+ const obj: any = {};+ if (message.secretType !== DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED) {+ obj.secretType = dataSourceExternalSecret_SecretTypeToJSON(message.secretType);+ }+ if (message.url !== "") {+ obj.url = message.url;+ }+ if (message.authType !== DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED) {+ obj.authType = dataSourceExternalSecret_AuthTypeToJSON(message.authType);+ }+ if (message.appRole !== undefined) {+ obj.appRole = DataSourceExternalSecret_AppRoleAuthOption.toJSON(message.appRole);+ }+ if (message.token !== undefined) {+ obj.token = message.token;+ }+ if (message.engineName !== "") {+ obj.engineName = message.engineName;+ }+ if (message.secretName !== "") {+ obj.secretName = message.secretName;+ }+ if (message.passwordKeyName !== "") {+ obj.passwordKeyName = message.passwordKeyName;+ }+ return obj;+ },++ create(base?: DeepPartial<DataSourceExternalSecret>): DataSourceExternalSecret {+ return DataSourceExternalSecret.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<DataSourceExternalSecret>): DataSourceExternalSecret {+ const message = createBaseDataSourceExternalSecret();+ message.secretType = object.secretType ?? DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED;+ message.url = object.url ?? "";+ message.authType = object.authType ?? DataSourceExternalSecret_AuthType.AUTH_TYPE_UNSPECIFIED;+ message.appRole = (object.appRole !== undefined && object.appRole !== null)+ ? DataSourceExternalSecret_AppRoleAuthOption.fromPartial(object.appRole)+ : undefined;+ message.token = object.token ?? undefined;+ message.engineName = object.engineName ?? "";+ message.secretName = object.secretName ?? "";+ message.passwordKeyName = object.passwordKeyName ?? "";+ return message;+ },+};++function createBaseDataSourceExternalSecret_AppRoleAuthOption(): DataSourceExternalSecret_AppRoleAuthOption {+ return {+ roleId: "",+ secretId: "",+ type: DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED,+ mountPath: "",+ };+}++export const DataSourceExternalSecret_AppRoleAuthOption: MessageFns<DataSourceExternalSecret_AppRoleAuthOption> = {+ encode(message: DataSourceExternalSecret_AppRoleAuthOption, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ if (message.roleId !== "") {+ writer.uint32(10).string(message.roleId);+ }+ if (message.secretId !== "") {+ writer.uint32(18).string(message.secretId);+ }+ if (message.type !== DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED) {+ writer.uint32(24).int32(dataSourceExternalSecret_AppRoleAuthOption_SecretTypeToNumber(message.type));+ }+ if (message.mountPath !== "") {+ writer.uint32(34).string(message.mountPath);+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): DataSourceExternalSecret_AppRoleAuthOption {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDataSourceExternalSecret_AppRoleAuthOption();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.roleId = reader.string();+ continue;+ }+ case 2: {+ if (tag !== 18) {+ break;+ }++ message.secretId = reader.string();+ continue;+ }+ case 3: {+ if (tag !== 24) {+ break;+ }++ message.type = dataSourceExternalSecret_AppRoleAuthOption_SecretTypeFromJSON(reader.int32());+ continue;+ }+ case 4: {+ if (tag !== 34) {+ break;+ }++ message.mountPath = reader.string();+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DataSourceExternalSecret_AppRoleAuthOption {+ return {+ roleId: isSet(object.roleId) ? globalThis.String(object.roleId) : "",+ secretId: isSet(object.secretId) ? globalThis.String(object.secretId) : "",+ type: isSet(object.type)+ ? dataSourceExternalSecret_AppRoleAuthOption_SecretTypeFromJSON(object.type)+ : DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED,+ mountPath: isSet(object.mountPath) ? globalThis.String(object.mountPath) : "",+ };+ },++ toJSON(message: DataSourceExternalSecret_AppRoleAuthOption): unknown {+ const obj: any = {};+ if (message.roleId !== "") {+ obj.roleId = message.roleId;+ }+ if (message.secretId !== "") {+ obj.secretId = message.secretId;+ }+ if (message.type !== DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED) {+ obj.type = dataSourceExternalSecret_AppRoleAuthOption_SecretTypeToJSON(message.type);+ }+ if (message.mountPath !== "") {+ obj.mountPath = message.mountPath;+ }+ return obj;+ },++ create(base?: DeepPartial<DataSourceExternalSecret_AppRoleAuthOption>): DataSourceExternalSecret_AppRoleAuthOption {+ return DataSourceExternalSecret_AppRoleAuthOption.fromPartial(base ?? {});+ },+ fromPartial(+ object: DeepPartial<DataSourceExternalSecret_AppRoleAuthOption>,+ ): DataSourceExternalSecret_AppRoleAuthOption {+ const message = createBaseDataSourceExternalSecret_AppRoleAuthOption();+ message.roleId = object.roleId ?? "";+ message.secretId = object.secretId ?? "";+ message.type = object.type ?? DataSourceExternalSecret_AppRoleAuthOption_SecretType.SECRET_TYPE_UNSPECIFIED;+ message.mountPath = object.mountPath ?? "";+ return message;+ },+};++function bytesFromBase64(b64: string): Uint8Array {+ const bin = globalThis.atob(b64);+ const arr = new Uint8Array(bin.length);+ for (let i = 0; i < bin.length; ++i) {+ arr[i] = bin.charCodeAt(i);+ }+ return arr;+}++function base64FromBytes(arr: Uint8Array): string {+ const bin: string[] = [];+ arr.forEach((byte) => {+ bin.push(globalThis.String.fromCharCode(byte));+ });+ return globalThis.btoa(bin.join(""));+}++type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;++export type DeepPartial<T> = T extends Builtin ? T+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }+ : Partial<T>;++function toTimestamp(date: Date): Timestamp {+ const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));+ const nanos = (date.getTime() % 1_000) * 1_000_000;+ return { seconds, nanos };+}++function fromTimestamp(t: Timestamp): Date {+ let millis = (t.seconds.toNumber() || 0) * 1_000;+ millis += (t.nanos || 0) / 1_000_000;+ return new globalThis.Date(millis);+}++function fromJsonTimestamp(o: any): Timestamp {+ if (o instanceof globalThis.Date) {+ return toTimestamp(o);+ } else if (typeof o === "string") {+ return toTimestamp(new globalThis.Date(o));+ } else {+ return Timestamp.fromJSON(o);+ }+}++function numberToLong(number: number) {+ return Long.fromNumber(number);+}++function isObject(value: any): boolean {+ return typeof value === "object" && value !== null;}function isSet(value: any): boolean {diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex bad1bd9575..75dd5c2eb1 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -60,22 +60,6 @@- [ChangelogPayload.Type](#bytebase-store-ChangelogPayload-Type)- [store/data_source.proto](#store_data_source-proto)- - [DataSourceExternalSecret](#bytebase-store-DataSourceExternalSecret)- - [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption)- - [DataSourceOptions](#bytebase-store-DataSourceOptions)- - [DataSourceOptions.Address](#bytebase-store-DataSourceOptions-Address)- - [DataSourceOptions.ClientSecretCredential](#bytebase-store-DataSourceOptions-ClientSecretCredential)- - [DataSourceOptions.ExtraConnectionParametersEntry](#bytebase-store-DataSourceOptions-ExtraConnectionParametersEntry)- - [KerberosConfig](#bytebase-store-KerberosConfig)- - [SASLConfig](#bytebase-store-SASLConfig)-- - [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)- - [DataSourceOptions.RedisType](#bytebase-store-DataSourceOptions-RedisType)- - [DataSourceType](#bytebase-store-DataSourceType)-- [store/database.proto](#store_database-proto)- [CheckConstraintMetadata](#bytebase-store-CheckConstraintMetadata)- [ColumnCatalog](#bytebase-store-ColumnCatalog)@@ -162,8 +146,23 @@- [OAuth2AuthStyle](#bytebase-store-OAuth2AuthStyle)- [store/instance.proto](#store_instance-proto)+ - [DataSource](#bytebase-store-DataSource)+ - [DataSource.Address](#bytebase-store-DataSource-Address)+ - [DataSource.ClientSecretCredential](#bytebase-store-DataSource-ClientSecretCredential)+ - [DataSource.ExtraConnectionParametersEntry](#bytebase-store-DataSource-ExtraConnectionParametersEntry)+ - [DataSourceExternalSecret](#bytebase-store-DataSourceExternalSecret)+ - [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption)- [InstanceMetadata](#bytebase-store-InstanceMetadata)- [InstanceRole](#bytebase-store-InstanceRole)+ - [KerberosConfig](#bytebase-store-KerberosConfig)+ - [SASLConfig](#bytebase-store-SASLConfig)++ - [DataSource.AuthenticationType](#bytebase-store-DataSource-AuthenticationType)+ - [DataSource.RedisType](#bytebase-store-DataSource-RedisType)+ - [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption-SecretType)+ - [DataSourceExternalSecret.AuthType](#bytebase-store-DataSourceExternalSecret-AuthType)+ - [DataSourceExternalSecret.SecretType](#bytebase-store-DataSourceExternalSecret-SecretType)+ - [DataSourceType](#bytebase-store-DataSourceType)- [store/instance_change_history.proto](#store_instance_change_history-proto)- [InstanceChangeHistoryPayload](#bytebase-store-InstanceChangeHistoryPayload)@@ -1106,265 +1105,8 @@ Metadata about the request.## store/data_source.proto--<a name="bytebase-store-DataSourceExternalSecret"></a>--### DataSourceExternalSecret----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| secret_type | [DataSourceExternalSecret.SecretType](#bytebase-store-DataSourceExternalSecret-SecretType) | | |-| url | [string](#string) | | |-| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-store-DataSourceExternalSecret-AuthType) | | |-| app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption) | | |-| token | [string](#string) | | |-| engine_name | [string](#string) | | engine name is the name for secret engine. |-| secret_name | [string](#string) | | the secret name in the engine to store the password. |-| password_key_name | [string](#string) | | the key name for the password. |-------<a name="bytebase-store-DataSourceExternalSecret-AppRoleAuthOption"></a>--### DataSourceExternalSecret.AppRoleAuthOption----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| role_id | [string](#string) | | |-| secret_id | [string](#string) | | the secret id for the role without ttl. |-| type | [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption-SecretType) | | |-| mount_path | [string](#string) | | The path where the approle auth method is mounted. |-------<a name="bytebase-store-DataSourceOptions"></a>--### DataSourceOptions----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| id | [string](#string) | | |-| type | [DataSourceType](#bytebase-store-DataSourceType) | | |-| host | [string](#string) | | |-| port | [string](#string) | | |-| username | [string](#string) | | |-| obfuscated_password | [string](#string) | | |-| database | [string](#string) | | |-| obfuscated_ssl_key | [string](#string) | | |-| obfuscated_ssl_cert | [string](#string) | | |-| obfuscated_ssl_ca | [string](#string) | | |-| srv | [bool](#bool) | | srv is a boolean flag that indicates whether the host is a DNS SRV record. |-| authentication_database | [string](#string) | | authentication_database is the database name to authenticate against, which stores the user credentials. |-| sid | [string](#string) | | sid and service_name are used for Oracle. |-| service_name | [string](#string) | | |-| ssh_host | [string](#string) | | SSH related The hostname of the SSH server agent. |-| ssh_port | [string](#string) | | The port of the SSH server agent. It's 22 typically. |-| ssh_user | [string](#string) | | The user to login the server. |-| ssh_obfuscated_password | [string](#string) | | The password to login the server. If it's empty string, no password is required. |-| 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) | | |-| client_secret_credential | [DataSourceOptions.ClientSecretCredential](#bytebase-store-DataSourceOptions-ClientSecretCredential) | | |-| sasl_config | [SASLConfig](#bytebase-store-SASLConfig) | | |-| additional_addresses | [DataSourceOptions.Address](#bytebase-store-DataSourceOptions-Address) | repeated | additional_addresses is used for MongoDB replica set. |-| replica_set | [string](#string) | | replica_set is used for MongoDB replica set. |-| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |-| region | [string](#string) | | region is the location of where the DB is, works for AWS RDS. For example, us-east-1. |-| warehouse_id | [string](#string) | | warehouse_id is used by Databricks. |-| master_name | [string](#string) | | master_name is the master name used by connecting redis-master via redis sentinel. |-| master_username | [string](#string) | | master_username and master_obfuscated_password are master credentials used by redis sentinel mode. |-| master_obfuscated_password | [string](#string) | | |-| redis_type | [DataSourceOptions.RedisType](#bytebase-store-DataSourceOptions-RedisType) | | |-| use_ssl | [bool](#bool) | | Use SSL to connect to the data source. By default, we use system default SSL configuration. |-| cluster | [string](#string) | | Cluster is the cluster name for the data source. Used by CockroachDB. |-| extra_connection_parameters | [DataSourceOptions.ExtraConnectionParametersEntry](#bytebase-store-DataSourceOptions-ExtraConnectionParametersEntry) | repeated | Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write |-------<a name="bytebase-store-DataSourceOptions-Address"></a>--### DataSourceOptions.Address----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| host | [string](#string) | | |-| port | [string](#string) | | |-------<a name="bytebase-store-DataSourceOptions-ClientSecretCredential"></a>--### DataSourceOptions.ClientSecretCredential----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| tenant_id | [string](#string) | | |-| client_id | [string](#string) | | |-| client_secret | [string](#string) | | |-------<a name="bytebase-store-DataSourceOptions-ExtraConnectionParametersEntry"></a>--### DataSourceOptions.ExtraConnectionParametersEntry----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| key | [string](#string) | | |-| value | [string](#string) | | |-------<a name="bytebase-store-KerberosConfig"></a>--### KerberosConfig----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| primary | [string](#string) | | |-| instance | [string](#string) | | |-| realm | [string](#string) | | |-| keytab | [bytes](#bytes) | | |-| kdc_host | [string](#string) | | |-| kdc_port | [string](#string) | | |-| kdc_transport_protocol | [string](#string) | | |-------<a name="bytebase-store-SASLConfig"></a>--### SASLConfig----| Field | Type | Label | Description |-| ----- | ---- | ----- | ----------- |-| krb_config | [KerberosConfig](#bytebase-store-KerberosConfig) | | |-------<a name="bytebase-store-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>--### DataSourceExternalSecret.AppRoleAuthOption.SecretType---| Name | Number | Description |-| ---- | ------ | ----------- |-| SECRET_TYPE_UNSPECIFIED | 0 | |-| PLAIN | 1 | |-| ENVIRONMENT | 2 | |----<a name="bytebase-store-DataSourceExternalSecret-AuthType"></a>--### DataSourceExternalSecret.AuthType---| Name | Number | Description |-| ---- | ------ | ----------- |-| AUTH_TYPE_UNSPECIFIED | 0 | |-| TOKEN | 1 | ref: https://developer.hashicorp.com/vault/docs/auth/token |-| VAULT_APP_ROLE | 2 | ref: https://developer.hashicorp.com/vault/docs/auth/approle |----<a name="bytebase-store-DataSourceExternalSecret-SecretType"></a>--### DataSourceExternalSecret.SecretType---| Name | Number | Description |-| ---- | ------ | ----------- |-| SAECRET_TYPE_UNSPECIFIED | 0 | |-| VAULT_KV_V2 | 1 | ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 |-| AWS_SECRETS_MANAGER | 2 | ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html |-| 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 | |-| AWS_RDS_IAM | 3 | |-| AZURE_IAM | 4 | |----<a name="bytebase-store-DataSourceOptions-RedisType"></a>--### DataSourceOptions.RedisType---| Name | Number | Description |-| ---- | ------ | ----------- |-| REDIS_TYPE_UNSPECIFIED | 0 | |-| STANDALONE | 1 | |-| SENTINEL | 2 | |-| CLUSTER | 3 | |----<a name="bytebase-store-DataSourceType"></a>--### DataSourceType---| Name | Number | Description |-| ---- | ------ | ----------- |-| DATA_SOURCE_UNSPECIFIED | 0 | |-| ADMIN | 1 | |-| READ_ONLY | 2 | |--@@ -2733,6 +2475,145 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.+<a name="bytebase-store-DataSource"></a>++### DataSource++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| id | [string](#string) | | |+| type | [DataSourceType](#bytebase-store-DataSourceType) | | |+| host | [string](#string) | | |+| port | [string](#string) | | |+| username | [string](#string) | | |+| obfuscated_password | [string](#string) | | |+| database | [string](#string) | | |+| obfuscated_ssl_key | [string](#string) | | |+| obfuscated_ssl_cert | [string](#string) | | |+| obfuscated_ssl_ca | [string](#string) | | |+| srv | [bool](#bool) | | srv is a boolean flag that indicates whether the host is a DNS SRV record. |+| authentication_database | [string](#string) | | authentication_database is the database name to authenticate against, which stores the user credentials. |+| sid | [string](#string) | | sid and service_name are used for Oracle. |+| service_name | [string](#string) | | |+| ssh_host | [string](#string) | | SSH related The hostname of the SSH server agent. |+| ssh_port | [string](#string) | | The port of the SSH server agent. It's 22 typically. |+| ssh_user | [string](#string) | | The user to login the server. |+| ssh_obfuscated_password | [string](#string) | | The password to login the server. If it's empty string, no password is required. |+| 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 | [DataSource.AuthenticationType](#bytebase-store-DataSource-AuthenticationType) | | |+| client_secret_credential | [DataSource.ClientSecretCredential](#bytebase-store-DataSource-ClientSecretCredential) | | |+| sasl_config | [SASLConfig](#bytebase-store-SASLConfig) | | |+| additional_addresses | [DataSource.Address](#bytebase-store-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |+| replica_set | [string](#string) | | replica_set is used for MongoDB replica set. |+| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |+| region | [string](#string) | | region is the location of where the DB is, works for AWS RDS. For example, us-east-1. |+| warehouse_id | [string](#string) | | warehouse_id is used by Databricks. |+| master_name | [string](#string) | | master_name is the master name used by connecting redis-master via redis sentinel. |+| master_username | [string](#string) | | master_username and master_obfuscated_password are master credentials used by redis sentinel mode. |+| master_obfuscated_password | [string](#string) | | |+| redis_type | [DataSource.RedisType](#bytebase-store-DataSource-RedisType) | | |+| use_ssl | [bool](#bool) | | Use SSL to connect to the data source. By default, we use system default SSL configuration. |+| cluster | [string](#string) | | Cluster is the cluster name for the data source. Used by CockroachDB. |+| extra_connection_parameters | [DataSource.ExtraConnectionParametersEntry](#bytebase-store-DataSource-ExtraConnectionParametersEntry) | repeated | Extra connection parameters for the database connection. For PostgreSQL HA, this can be used to set target_session_attrs=read-write |+++++++<a name="bytebase-store-DataSource-Address"></a>++### DataSource.Address++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| host | [string](#string) | | |+| port | [string](#string) | | |+++++++<a name="bytebase-store-DataSource-ClientSecretCredential"></a>++### DataSource.ClientSecretCredential++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| tenant_id | [string](#string) | | |+| client_id | [string](#string) | | |+| client_secret | [string](#string) | | |+++++++<a name="bytebase-store-DataSource-ExtraConnectionParametersEntry"></a>++### DataSource.ExtraConnectionParametersEntry++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| key | [string](#string) | | |+| value | [string](#string) | | |+++++++<a name="bytebase-store-DataSourceExternalSecret"></a>++### DataSourceExternalSecret++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| secret_type | [DataSourceExternalSecret.SecretType](#bytebase-store-DataSourceExternalSecret-SecretType) | | |+| url | [string](#string) | | |+| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-store-DataSourceExternalSecret-AuthType) | | |+| app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption) | | |+| token | [string](#string) | | |+| engine_name | [string](#string) | | engine name is the name for secret engine. |+| secret_name | [string](#string) | | the secret name in the engine to store the password. |+| password_key_name | [string](#string) | | the key name for the password. |+++++++<a name="bytebase-store-DataSourceExternalSecret-AppRoleAuthOption"></a>++### DataSourceExternalSecret.AppRoleAuthOption++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| role_id | [string](#string) | | |+| secret_id | [string](#string) | | the secret id for the role without ttl. |+| type | [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption-SecretType) | | |+| mount_path | [string](#string) | | The path where the approle auth method is mounted. |++++++<a name="bytebase-store-InstanceMetadata"></a>### InstanceMetadata@@ -2747,6 +2628,7 @@ InstanceMetadata is the metadata for instances.| sync_interval | [google.protobuf.Duration](#google-protobuf-Duration) | | How often the instance is synced. || maximum_connections | [int32](#int32) | | The maximum number of connections. The default is 10 if the value is unset or zero. || sync_databases | [string](#string) | repeated | Enable sync for following databases. Default empty, means sync all schemas & databases. |+| data_sources | [DataSource](#bytebase-store-DataSource) | repeated | |@@ -2770,8 +2652,126 @@ InstanceRole is the API message for instance role.++<a name="bytebase-store-KerberosConfig"></a>++### KerberosConfig++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| primary | [string](#string) | | |+| instance | [string](#string) | | |+| realm | [string](#string) | | |+| keytab | [bytes](#bytes) | | |+| kdc_host | [string](#string) | | |+| kdc_port | [string](#string) | | |+| kdc_transport_protocol | [string](#string) | | |+++++++<a name="bytebase-store-SASLConfig"></a>++### SASLConfig++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| krb_config | [KerberosConfig](#bytebase-store-KerberosConfig) | | |+++++++<a name="bytebase-store-DataSource-AuthenticationType"></a>++### DataSource.AuthenticationType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| PASSWORD | 1 | |+| GOOGLE_CLOUD_SQL_IAM | 2 | |+| AWS_RDS_IAM | 3 | |+| AZURE_IAM | 4 | |++++<a name="bytebase-store-DataSource-RedisType"></a>++### DataSource.RedisType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| REDIS_TYPE_UNSPECIFIED | 0 | |+| STANDALONE | 1 | |+| SENTINEL | 2 | |+| CLUSTER | 3 | |++++<a name="bytebase-store-DataSourceExternalSecret-AppRoleAuthOption-SecretType"></a>++### DataSourceExternalSecret.AppRoleAuthOption.SecretType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| SECRET_TYPE_UNSPECIFIED | 0 | |+| PLAIN | 1 | |+| ENVIRONMENT | 2 | |++++<a name="bytebase-store-DataSourceExternalSecret-AuthType"></a>++### DataSourceExternalSecret.AuthType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTH_TYPE_UNSPECIFIED | 0 | |+| TOKEN | 1 | ref: https://developer.hashicorp.com/vault/docs/auth/token |+| VAULT_APP_ROLE | 2 | ref: https://developer.hashicorp.com/vault/docs/auth/approle |++++<a name="bytebase-store-DataSourceExternalSecret-SecretType"></a>++### DataSourceExternalSecret.SecretType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| SAECRET_TYPE_UNSPECIFIED | 0 | |+| VAULT_KV_V2 | 1 | ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2 |+| AWS_SECRETS_MANAGER | 2 | ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html |+| GCP_SECRET_MANAGER | 3 | ref: https://cloud.google.com/secret-manager/docs |++++<a name="bytebase-store-DataSourceType"></a>++### DataSourceType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| DATA_SOURCE_UNSPECIFIED | 0 | |+| ADMIN | 1 | |+| READ_ONLY | 2 | |++diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex d93efc8a6e..319875b214 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -403,62 +403,6 @@<a href="#store%2fdata_source.proto">store/data_source.proto</a><ul>- <li>- <a href="#bytebase.store.DataSourceExternalSecret"><span class="badge">M</span>DataSourceExternalSecret</a>- </li>-- <li>- <a href="#bytebase.store.DataSourceExternalSecret.AppRoleAuthOption"><span class="badge">M</span>DataSourceExternalSecret.AppRoleAuthOption</a>- </li>-- <li>- <a href="#bytebase.store.DataSourceOptions"><span class="badge">M</span>DataSourceOptions</a>- </li>-- <li>- <a href="#bytebase.store.DataSourceOptions.Address"><span class="badge">M</span>DataSourceOptions.Address</a>- </li>-- <li>- <a href="#bytebase.store.DataSourceOptions.ClientSecretCredential"><span class="badge">M</span>DataSourceOptions.ClientSecretCredential</a>- </li>-- <li>- <a href="#bytebase.store.DataSourceOptions.ExtraConnectionParametersEntry"><span class="badge">M</span>DataSourceOptions.ExtraConnectionParametersEntry</a>- </li>-- <li>- <a href="#bytebase.store.KerberosConfig"><span class="badge">M</span>KerberosConfig</a>- </li>-- <li>- <a href="#bytebase.store.SASLConfig"><span class="badge">M</span>SASLConfig</a>- </li>--- <li>- <a href="#bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType"><span class="badge">E</span>DataSourceExternalSecret.AppRoleAuthOption.SecretType</a>- </li>-- <li>- <a href="#bytebase.store.DataSourceExternalSecret.AuthType"><span class="badge">E</span>DataSourceExternalSecret.AuthType</a>- </li>-- <li>- <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>-- <li>- <a href="#bytebase.store.DataSourceOptions.RedisType"><span class="badge">E</span>DataSourceOptions.RedisType</a>- </li>-- <li>- <a href="#bytebase.store.DataSourceType"><span class="badge">E</span>DataSourceType</a>- </li>@@ -815,6 +759,30 @@<a href="#store%2finstance.proto">store/instance.proto</a><ul>+ <li>+ <a href="#bytebase.store.DataSource"><span class="badge">M</span>DataSource</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSource.Address"><span class="badge">M</span>DataSource.Address</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSource.ClientSecretCredential"><span class="badge">M</span>DataSource.ClientSecretCredential</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSource.ExtraConnectionParametersEntry"><span class="badge">M</span>DataSource.ExtraConnectionParametersEntry</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSourceExternalSecret"><span class="badge">M</span>DataSourceExternalSecret</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSourceExternalSecret.AppRoleAuthOption"><span class="badge">M</span>DataSourceExternalSecret.AppRoleAuthOption</a>+ </li>+<li><a href="#bytebase.store.InstanceMetadata"><span class="badge">M</span>InstanceMetadata</a></li>@@ -823,6 +791,38 @@<a href="#bytebase.store.InstanceRole"><span class="badge">M</span>InstanceRole</a></li>+ <li>+ <a href="#bytebase.store.KerberosConfig"><span class="badge">M</span>KerberosConfig</a>+ </li>++ <li>+ <a href="#bytebase.store.SASLConfig"><span class="badge">M</span>SASLConfig</a>+ </li>+++ <li>+ <a href="#bytebase.store.DataSource.AuthenticationType"><span class="badge">E</span>DataSource.AuthenticationType</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSource.RedisType"><span class="badge">E</span>DataSource.RedisType</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType"><span class="badge">E</span>DataSourceExternalSecret.AppRoleAuthOption.SecretType</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSourceExternalSecret.AuthType"><span class="badge">E</span>DataSourceExternalSecret.AuthType</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSourceExternalSecret.SecretType"><span class="badge">E</span>DataSourceExternalSecret.SecretType</a>+ </li>++ <li>+ <a href="#bytebase.store.DataSourceType"><span class="badge">E</span>DataSourceType</a>+ </li>@@ -3279,7 +3279,21 @@ Format: projects/{project}/sheets/{sheet} </p></td><p></p>- <h3 id="bytebase.store.DataSourceExternalSecret">DataSourceExternalSecret</h3>+++++++++ <div class="file-heading">+ <h2 id="store/database.proto">store/database.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.store.CheckConstraintMetadata">CheckConstraintMetadata</h3><p></p>@@ -3290,59 +3304,90 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>secret_type</td>- <td><a href="#bytebase.store.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name is the name of a check constraint. </p></td></tr><tr>- <td>url</td>+ <td>expression</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The expression is the expression of a check constraint. </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.ColumnCatalog">ColumnCatalog</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>auth_type</td>- <td><a href="#bytebase.store.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name is the name of a column. </p></td></tr><tr>- <td>app_role</td>- <td><a href="#bytebase.store.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</a></td>+ <td>semantic_type</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>token</td>+ <td>labels</td>+ <td><a href="#bytebase.store.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</a></td>+ <td>repeated</td>+ <td><p>The user labels for a column. </p></td>+ </tr>++ <tr>+ <td>classification</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>engine_name</td>- <td><a href="#string">string</a></td>+ <td>object_schema</td>+ <td><a href="#bytebase.store.ObjectSchema">ObjectSchema</a></td>+ <td>optional</td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>masking_level</td>+ <td><a href="#bytebase.store.MaskingLevel">MaskingLevel</a></td><td></td>- <td><p>engine name is the name for secret engine. </p></td>+ <td><p>Deprecated. </p></td></tr><tr>- <td>secret_name</td>+ <td>full_masking_algorithm_id</td><td><a href="#string">string</a></td><td></td>- <td><p>the secret name in the engine to store the password. </p></td>+ <td><p>Deprecated. </p></td></tr><tr>- <td>password_key_name</td>+ <td>partial_masking_algorithm_id</td><td><a href="#string">string</a></td><td></td>- <td><p>the key name for the password. </p></td>+ <td><p>Deprecated. </p></td></tr></tbody>@@ -3352,7 +3397,7 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.store.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</h3>+ <h3 id="bytebase.store.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</h3><p></p>@@ -3363,33 +3408,19 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>role_id</td>+ <td>key</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>secret_id</td>+ <td>value</td><td><a href="#string">string</a></td><td></td>- <td><p>the secret id for the role without ttl. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></td>- <td></td><td><p> </p></td></tr>- <tr>- <td>mount_path</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The path where the approle auth method is mounted. </p></td>- </tr>-</tbody></table>@@ -3397,8 +3428,8 @@ Format: projects/{project}/sheets/{sheet} </p></td>- <h3 id="bytebase.store.DataSourceOptions">DataSourceOptions</h3>- <p></p>+ <h3 id="bytebase.store.ColumnMetadata">ColumnMetadata</h3>+ <p>ColumnMetadata is the metadata for columns.</p><table class="field-table">@@ -3408,286 +3439,296 @@ Format: projects/{project}/sheets/{sheet} </p></td><tbody><tr>- <td>id</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name is the name of a column. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.store.DataSourceType">DataSourceType</a></td>+ <td>position</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p> </p></td>+ <td><p>The position is the position in columns. </p></td></tr><tr>- <td>host</td>- <td><a href="#string">string</a></td>+ <td>default</td>+ <td><a href="#google.protobuf.StringValue">google.protobuf.StringValue</a></td><td></td>- <td><p> </p></td>+ <td><p>The default is the default of a column. Use google.protobuf.StringValue+to distinguish between an empty string default value or no default. </p></td></tr><tr>- <td>port</td>- <td><a href="#string">string</a></td>+ <td>default_null</td>+ <td><a href="#bool">bool</a></td><td></td><td><p> </p></td></tr><tr>- <td>username</td>+ <td>default_expression</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>obfuscated_password</td>+ <td>on_update</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The on_update is the on update action of a column.+For MySQL like databases, it's only supported for TIMESTAMP columns with+CURRENT_TIMESTAMP as on update value. </p></td></tr><tr>- <td>database</td>- <td><a href="#string">string</a></td>+ <td>nullable</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>The nullable is the nullable of a column. </p></td></tr><tr>- <td>obfuscated_ssl_key</td>+ <td>type</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The type is the type of a column. </p></td></tr><tr>- <td>obfuscated_ssl_cert</td>+ <td>character_set</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The character_set is the character_set of a column. </p></td></tr><tr>- <td>obfuscated_ssl_ca</td>+ <td>collation</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The collation is the collation of a column. </p></td></tr><tr>- <td>srv</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>srv is a boolean flag that indicates whether the host is a DNS SRV record. </p></td>- </tr>-- <tr>- <td>authentication_database</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>authentication_database is the database name to authenticate against, which stores the user credentials. </p></td>- </tr>-- <tr>- <td>sid</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>sid and service_name are used for Oracle. </p></td>+ <td><p>The comment is the comment of a column.+classification and user_comment is parsed from the comment. </p></td></tr><tr>- <td>service_name</td>+ <td>user_comment</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The user_comment is the user comment of a table parsed from the comment. </p></td></tr><tr>- <td>ssh_host</td>- <td><a href="#string">string</a></td>+ <td>generation</td>+ <td><a href="#bytebase.store.GenerationMetadata">GenerationMetadata</a></td><td></td>- <td><p>SSH related-The hostname of the SSH server agent. </p></td>+ <td><p>The generation is for generated columns. </p></td></tr><tr>- <td>ssh_port</td>- <td><a href="#string">string</a></td>+ <td>identity_generation</td>+ <td><a href="#bytebase.store.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</a></td><td></td>- <td><p>The port of the SSH server agent. It's 22 typically. </p></td>+ <td><p>The identity_generation is for identity columns, PG only. </p></td></tr>- <tr>- <td>ssh_user</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The user to login the server. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.DatabaseConfig">DatabaseConfig</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>ssh_obfuscated_password</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The password to login the server. If it's empty string, no password is required. </p></td>+ <td><p> </p></td></tr><tr>- <td>ssh_obfuscated_private_key</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>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"). </p></td>+ <td>schemas</td>+ <td><a href="#bytebase.store.SchemaCatalog">SchemaCatalog</a></td>+ <td>repeated</td>+ <td><p>The schema_configs is the list of configs for schemas in a database. </p></td></tr>- <tr>- <td>authentication_private_key_obfuscated</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>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. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.DatabaseMetadata">DatabaseMetadata</h3>+ <p>DatabaseMetadata is the metadata for databases.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>external_secret</td>- <td><a href="#bytebase.store.DataSourceExternalSecret">DataSourceExternalSecret</a></td>- <td></td>+ <td>labels</td>+ <td><a href="#bytebase.store.DatabaseMetadata.LabelsEntry">DatabaseMetadata.LabelsEntry</a></td>+ <td>repeated</td><td><p> </p></td></tr><tr>- <td>authentication_type</td>- <td><a href="#bytebase.store.DataSourceOptions.AuthenticationType">DataSourceOptions.AuthenticationType</a></td>+ <td>last_sync_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td><td><p> </p></td></tr><tr>- <td>client_secret_credential</td>- <td><a href="#bytebase.store.DataSourceOptions.ClientSecretCredential">DataSourceOptions.ClientSecretCredential</a></td>+ <td>backup_available</td>+ <td><a href="#bool">bool</a></td><td></td><td><p> </p></td></tr><tr>- <td>sasl_config</td>- <td><a href="#bytebase.store.SASLConfig">SASLConfig</a></td>+ <td>datashare</td>+ <td><a href="#bool">bool</a></td><td></td><td><p> </p></td></tr><tr>- <td>additional_addresses</td>- <td><a href="#bytebase.store.DataSourceOptions.Address">DataSourceOptions.Address</a></td>+ <td>secrets</td>+ <td><a href="#bytebase.store.Secret">Secret</a></td><td>repeated</td>- <td><p>additional_addresses is used for MongoDB replica set. </p></td>+ <td><p> </p></td></tr>- <tr>- <td>replica_set</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>replica_set is used for MongoDB replica set. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.DatabaseMetadata.LabelsEntry">DatabaseMetadata.LabelsEntry</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>direct_connection</td>- <td><a href="#bool">bool</a></td>+ <td>key</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. </p></td>+ <td><p> </p></td></tr><tr>- <td>region</td>+ <td>value</td><td><a href="#string">string</a></td><td></td>- <td><p>region is the location of where the DB is, works for AWS RDS. For example, us-east-1. </p></td>+ <td><p> </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.DatabaseSchemaMetadata">DatabaseSchemaMetadata</h3>+ <p>DatabaseSchemaMetadata is the schema metadata for databases.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>warehouse_id</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>warehouse_id is used by Databricks. </p></td>+ <td><p> </p></td></tr><tr>- <td>master_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>master_name is the master name used by connecting redis-master via redis sentinel. </p></td>+ <td>schemas</td>+ <td><a href="#bytebase.store.SchemaMetadata">SchemaMetadata</a></td>+ <td>repeated</td>+ <td><p>The schemas is the list of schemas in a database. </p></td></tr><tr>- <td>master_username</td>+ <td>character_set</td><td><a href="#string">string</a></td><td></td>- <td><p>master_username and master_obfuscated_password are master credentials used by redis sentinel mode. </p></td>+ <td><p>The character_set is the character set of a database. </p></td></tr><tr>- <td>master_obfuscated_password</td>+ <td>collation</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The collation is the collation of a database. </p></td></tr><tr>- <td>redis_type</td>- <td><a href="#bytebase.store.DataSourceOptions.RedisType">DataSourceOptions.RedisType</a></td>- <td></td>- <td><p> </p></td>+ <td>extensions</td>+ <td><a href="#bytebase.store.ExtensionMetadata">ExtensionMetadata</a></td>+ <td>repeated</td>+ <td><p>The extensions is the list of extensions in a database. </p></td></tr><tr>- <td>use_ssl</td>+ <td>datashare</td><td><a href="#bool">bool</a></td><td></td>- <td><p>Use SSL to connect to the data source. By default, we use system default SSL configuration. </p></td>+ <td><p>The database belongs to a datashare. </p></td></tr><tr>- <td>cluster</td>+ <td>service_name</td><td><a href="#string">string</a></td><td></td>- <td><p>Cluster is the cluster name for the data source. Used by CockroachDB. </p></td>+ <td><p>The service name of the database. It's the Oracle specific concept. </p></td></tr><tr>- <td>extra_connection_parameters</td>- <td><a href="#bytebase.store.DataSourceOptions.ExtraConnectionParametersEntry">DataSourceOptions.ExtraConnectionParametersEntry</a></td>+ <td>linked_databases</td>+ <td><a href="#bytebase.store.LinkedDatabaseMetadata">LinkedDatabaseMetadata</a></td><td>repeated</td>- <td><p>Extra connection parameters for the database connection.-For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.store.DataSourceOptions.Address">DataSourceOptions.Address</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>host</td>- <td><a href="#string">string</a></td>- <td></td><td><p> </p></td></tr><tr>- <td>port</td>+ <td>owner</td><td><a href="#string">string</a></td><td></td><td><p> </p></td>@@ -3700,8 +3741,8 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><- <h3 id="bytebase.store.DataSourceOptions.ClientSecretCredential">DataSourceOptions.ClientSecretCredential</h3>- <p></p>+ <h3 id="bytebase.store.DependencyColumn">DependencyColumn</h3>+ <p>DependencyColumn is the metadata for dependency columns.</p><table class="field-table">@@ -3711,24 +3752,24 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><<tbody><tr>- <td>tenant_id</td>+ <td>schema</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The schema is the schema of a reference column. </p></td></tr><tr>- <td>client_id</td>+ <td>table</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The table is the table of a reference column. </p></td></tr><tr>- <td>client_secret</td>+ <td>column</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The column is the name of a reference column. </p></td></tr></tbody>@@ -3738,7 +3779,7 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><- <h3 id="bytebase.store.DataSourceOptions.ExtraConnectionParametersEntry">DataSourceOptions.ExtraConnectionParametersEntry</h3>+ <h3 id="bytebase.store.DependencyTable">DependencyTable</h3><p></p>@@ -3749,17 +3790,17 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><<tbody><tr>- <td>key</td>+ <td>schema</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The schema is the schema of a reference table. </p></td></tr><tr>- <td>value</td>+ <td>table</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The table is the name of a reference table. </p></td></tr></tbody>@@ -3769,7 +3810,7 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><- <h3 id="bytebase.store.KerberosConfig">KerberosConfig</h3>+ <h3 id="bytebase.store.EnumTypeMetadata">EnumTypeMetadata</h3><p></p>@@ -3780,49 +3821,87 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><<tbody><tr>- <td>primary</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of a type. </p></td></tr><tr>- <td>instance</td>+ <td>values</td><td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>repeated</td>+ <td><p>The enum values of a type. </p></td></tr><tr>- <td>realm</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>keytab</td>- <td><a href="#bytes">bytes</a></td>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td><td></td><td><p> </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.EventMetadata">EventMetadata</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>kdc_host</td>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name of the event. </p></td>+ </tr>++ <tr>+ <td>definition</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schedule of the event. </p></td>+ </tr>++ <tr>+ <td>time_zone</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The time zone of the event. </p></td>+ </tr>++ <tr>+ <td>sql_mode</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>kdc_port</td>+ <td>character_set_client</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>kdc_transport_protocol</td>+ <td>collation_connection</td><td><a href="#string">string</a></td><td></td><td><p> </p></td>@@ -3835,8 +3914,8 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><- <h3 id="bytebase.store.SASLConfig">SASLConfig</h3>- <p></p>+ <h3 id="bytebase.store.ExtensionMetadata">ExtensionMetadata</h3>+ <p>ExtensionMetadata is the metadata for extensions.</p><table class="field-table">@@ -3846,10 +3925,32 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><<tbody><tr>- <td>krb_config</td>- <td><a href="#bytebase.store.KerberosConfig">KerberosConfig</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name is the name of an extension. </p></td>+ </tr>++ <tr>+ <td>schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schema is the extension that is installed to. But the extension usage+is not limited to the schema. </p></td>+ </tr>++ <tr>+ <td>version</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The version is the version of an extension. </p></td>+ </tr>++ <tr>+ <td>description</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The description is the description of an extension. </p></td></tr></tbody>@@ -3859,220 +3960,129 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><+ <h3 id="bytebase.store.ExternalTableMetadata">ExternalTableMetadata</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name is the name of a external table. </p></td>+ </tr>++ <tr>+ <td>external_server_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The external_server_name is the name of the external server. </p></td>+ </tr>++ <tr>+ <td>external_database_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The external_database_name is the name of the external database. </p></td>+ </tr>++ <tr>+ <td>columns</td>+ <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>+ <td>repeated</td>+ <td><p>The columns is the ordered list of columns in a foreign table. </p></td>+ </tr>++ </tbody>+ </table>+++- <h3 id="bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SECRET_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>PLAIN</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>ENVIRONMENT</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>+ <h3 id="bytebase.store.ForeignKeyMetadata">ForeignKeyMetadata</h3>+ <p>ForeignKeyMetadata is the metadata for foreign keys.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The name is the name of a foreign key. </p></td>+ </tr>++ <tr>+ <td>columns</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>+ </tr>++ <tr>+ <td>referenced_schema</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The referenced_schema is the referenced schema name of a foreign key.+It is an empty string for databases without such concept such as MySQL. </p></td>+ </tr>++ <tr>+ <td>referenced_table</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>+ </tr>++ <tr>+ <td>referenced_columns</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>+ </tr>++ <tr>+ <td>on_delete</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The on_delete is the on delete action of a foreign key. </p></td>+ </tr>++ <tr>+ <td>on_update</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The on_update is the on update action of a foreign key. </p></td>+ </tr>++ <tr>+ <td>match_type</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The match_type is the match type of a foreign key.+The match_type is the PostgreSQL specific field.+It's empty string for other databases. </p></td>+ </tr>++ </tbody>+ </table>++++- <h3 id="bytebase.store.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>AUTH_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>TOKEN</td>- <td>1</td>- <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/token</p></td>- </tr>-- <tr>- <td>VAULT_APP_ROLE</td>- <td>2</td>- <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/approle</p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>SAECRET_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>VAULT_KV_V2</td>- <td>1</td>- <td><p>ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2</p></td>- </tr>-- <tr>- <td>AWS_SECRETS_MANAGER</td>- <td>2</td>- <td><p>ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html</p></td>- </tr>-- <tr>- <td>GCP_SECRET_MANAGER</td>- <td>3</td>- <td><p>ref: https://cloud.google.com/secret-manager/docs</p></td>- </tr>-- </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>-- <tr>- <td>AWS_RDS_IAM</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>AZURE_IAM</td>- <td>4</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.DataSourceOptions.RedisType">DataSourceOptions.RedisType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>REDIS_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>STANDALONE</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>SENTINEL</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>CLUSTER</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.DataSourceType">DataSourceType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>DATA_SOURCE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ADMIN</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>READ_ONLY</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-------- <div class="file-heading">- <h2 id="store/database.proto">store/database.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.CheckConstraintMetadata">CheckConstraintMetadata</h3>- <p></p>+ <h3 id="bytebase.store.FunctionMetadata">FunctionMetadata</h3>+ <p>FunctionMetadata is the metadata for functions.</p><table class="field-table">@@ -4085,87 +4095,72 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><<td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a check constraint. </p></td>+ <td><p>The name is the name of a function. </p></td></tr><tr>- <td>expression</td>+ <td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The expression is the expression of a check constraint. </p></td>+ <td><p>The definition is the definition of a function. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.ColumnCatalog">ColumnCatalog</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>name</td>+ <td>signature</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a column. </p></td>+ <td><p>The signature is the name with the number and type of input arguments the+function takes. </p></td></tr><tr>- <td>semantic_type</td>+ <td>character_set_client</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>MySQL specific metadata. </p></td></tr><tr>- <td>labels</td>- <td><a href="#bytebase.store.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</a></td>- <td>repeated</td>- <td><p>The user labels for a column. </p></td>+ <td>collation_connection</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>classification</td>+ <td>database_collation</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>object_schema</td>- <td><a href="#bytebase.store.ObjectSchema">ObjectSchema</a></td>- <td>optional</td>+ <td>sql_mode</td>+ <td><a href="#string">string</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>masking_level</td>- <td><a href="#bytebase.store.MaskingLevel">MaskingLevel</a></td>+ <td>comment</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>Deprecated. </p></td>+ <td><p> </p></td></tr><tr>- <td>full_masking_algorithm_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>Deprecated. </p></td>+ <td>dependency_tables</td>+ <td><a href="#bytebase.store.DependencyTable">DependencyTable</a></td>+ <td>repeated</td>+ <td><p>The dependency_tables is the list of dependency tables of a function.+For PostgreSQL, it's the list of tables that the function depends on the return type definition. </p></td></tr><tr>- <td>partial_masking_algorithm_id</td>- <td><a href="#string">string</a></td>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>Deprecated. </p></td>+ <td><p> </p></td></tr></tbody>@@ -4175,7 +4170,7 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><- <h3 id="bytebase.store.ColumnCatalog.LabelsEntry">ColumnCatalog.LabelsEntry</h3>+ <h3 id="bytebase.store.GenerationMetadata">GenerationMetadata</h3><p></p>@@ -4186,14 +4181,14 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><<tbody><tr>- <td>key</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.store.GenerationMetadata.Type">GenerationMetadata.Type</a></td><td></td><td><p> </p></td></tr><tr>- <td>value</td>+ <td>expression</td><td><a href="#string">string</a></td><td></td><td><p> </p></td>@@ -4206,8 +4201,8 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><- <h3 id="bytebase.store.ColumnMetadata">ColumnMetadata</h3>- <p>ColumnMetadata is the metadata for columns.</p>+ <h3 id="bytebase.store.IndexMetadata">IndexMetadata</h3>+ <p>IndexMetadata is the metadata for indexes.</p><table class="field-table">@@ -4220,102 +4215,101 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><<td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a column. </p></td>+ <td><p>The name is the name of an index. </p></td></tr><tr>- <td>position</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The position is the position in columns. </p></td>+ <td>expressions</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>The expressions are the ordered columns or expressions of an index.+This could refer to a column or an expression. </p></td></tr><tr>- <td>default</td>- <td><a href="#google.protobuf.StringValue">google.protobuf.StringValue</a></td>- <td></td>- <td><p>The default is the default of a column. Use google.protobuf.StringValue-to distinguish between an empty string default value or no default. </p></td>+ <td>key_length</td>+ <td><a href="#int64">int64</a></td>+ <td>repeated</td>+ <td><p>The key_lengths are the ordered key lengths of an index.+If the key length is not specified, it's -1. </p></td></tr><tr>- <td>default_null</td>+ <td>descending</td><td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>+ <td>repeated</td>+ <td><p>The descending is the ordered descending of an index. </p></td></tr><tr>- <td>default_expression</td>+ <td>type</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The type is the type of an index. </p></td></tr><tr>- <td>on_update</td>- <td><a href="#string">string</a></td>+ <td>unique</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The on_update is the on update action of a column.-For MySQL like databases, it's only supported for TIMESTAMP columns with-CURRENT_TIMESTAMP as on update value. </p></td>+ <td><p>The unique is whether the index is unique. </p></td></tr><tr>- <td>nullable</td>+ <td>primary</td><td><a href="#bool">bool</a></td><td></td>- <td><p>The nullable is the nullable of a column. </p></td>+ <td><p>The primary is whether the index is a primary key index. </p></td></tr><tr>- <td>type</td>- <td><a href="#string">string</a></td>+ <td>visible</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The type is the type of a column. </p></td>+ <td><p>The visible is whether the index is visible. </p></td></tr><tr>- <td>character_set</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>The character_set is the character_set of a column. </p></td>+ <td><p>The comment is the comment of an index. </p></td></tr><tr>- <td>collation</td>+ <td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The collation is the collation of a column. </p></td>+ <td><p>The definition of an index. </p></td></tr><tr>- <td>comment</td>+ <td>parent_index_schema</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment is the comment of a column.-classification and user_comment is parsed from the comment. </p></td>+ <td><p>The schema name of the parent index. </p></td></tr><tr>- <td>user_comment</td>+ <td>parent_index_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The user_comment is the user comment of a table parsed from the comment. </p></td>+ <td><p>The index name of the parent index. </p></td></tr><tr>- <td>generation</td>- <td><a href="#bytebase.store.GenerationMetadata">GenerationMetadata</a></td>+ <td>granularity</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The generation is for generated columns. </p></td>+ <td><p>The number of granules in the block. It's a ClickHouse specific field. </p></td></tr><tr>- <td>identity_generation</td>- <td><a href="#bytebase.store.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</a></td>+ <td>is_constraint</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The identity_generation is for identity columns, PG only. </p></td>+ <td><p>It's a PostgreSQL specific field.+The unique constraint and unique index are not the same thing in PostgreSQL. </p></td></tr></tbody>@@ -4325,8 +4319,8 @@ classification and user_comment is parsed from the comment. </p></td>- <h3 id="bytebase.store.DatabaseConfig">DatabaseConfig</h3>- <p></p>+ <h3 id="bytebase.store.InstanceRoleMetadata">InstanceRoleMetadata</h3>+ <p>InstanceRoleMetadata is the message for instance role.</p><table class="field-table">@@ -4339,14 +4333,15 @@ classification and user_comment is parsed from the comment. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The role name. It's unique within the instance. </p></td></tr><tr>- <td>schemas</td>- <td><a href="#bytebase.store.SchemaCatalog">SchemaCatalog</a></td>- <td>repeated</td>- <td><p>The schema_configs is the list of configs for schemas in a database. </p></td>+ <td>grant</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The grant display string on the instance. It's generated by database+engine. </p></td></tr></tbody>@@ -4356,8 +4351,8 @@ classification and user_comment is parsed from the comment. </p></td>- <h3 id="bytebase.store.DatabaseMetadata">DatabaseMetadata</h3>- <p>DatabaseMetadata is the metadata for databases.</p>+ <h3 id="bytebase.store.LinkedDatabaseMetadata">LinkedDatabaseMetadata</h3>+ <p></p><table class="field-table">@@ -4367,66 +4362,21 @@ classification and user_comment is parsed from the comment. </p></td><tbody><tr>- <td>labels</td>- <td><a href="#bytebase.store.DatabaseMetadata.LabelsEntry">DatabaseMetadata.LabelsEntry</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- <tr>- <td>last_sync_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>backup_available</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>datashare</td>- <td><a href="#bool">bool</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>secrets</td>- <td><a href="#bytebase.store.Secret">Secret</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.store.DatabaseMetadata.LabelsEntry">DatabaseMetadata.LabelsEntry</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>key</td>+ <td>username</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>value</td>+ <td>host</td><td><a href="#string">string</a></td><td></td><td><p> </p></td>@@ -4439,8 +4389,8 @@ classification and user_comment is parsed from the comment. </p></td>- <h3 id="bytebase.store.DatabaseSchemaMetadata">DatabaseSchemaMetadata</h3>- <p>DatabaseSchemaMetadata is the schema metadata for databases.</p>+ <h3 id="bytebase.store.MaterializedViewMetadata">MaterializedViewMetadata</h3>+ <p>MaterializedViewMetadata is the metadata for materialized views.</p><table class="field-table">@@ -4453,61 +4403,47 @@ classification and user_comment is parsed from the comment. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>schemas</td>- <td><a href="#bytebase.store.SchemaMetadata">SchemaMetadata</a></td>- <td>repeated</td>- <td><p>The schemas is the list of schemas in a database. </p></td>+ <td><p>The name is the name of a view. </p></td></tr><tr>- <td>character_set</td>+ <td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The character_set is the character set of a database. </p></td>+ <td><p>The definition is the definition of a view. </p></td></tr><tr>- <td>collation</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>The collation is the collation of a database. </p></td>+ <td><p>The comment is the comment of a view. </p></td></tr><tr>- <td>extensions</td>- <td><a href="#bytebase.store.ExtensionMetadata">ExtensionMetadata</a></td>+ <td>dependency_columns</td>+ <td><a href="#bytebase.store.DependencyColumn">DependencyColumn</a></td><td>repeated</td>- <td><p>The extensions is the list of extensions in a database. </p></td>- </tr>-- <tr>- <td>datashare</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The database belongs to a datashare. </p></td>+ <td><p>The dependency_columns is the list of dependency columns of a view. </p></td></tr><tr>- <td>service_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The service name of the database. It's the Oracle specific concept. </p></td>+ <td>triggers</td>+ <td><a href="#bytebase.store.TriggerMetadata">TriggerMetadata</a></td>+ <td>repeated</td>+ <td><p>The columns is the ordered list of columns in a table. </p></td></tr><tr>- <td>linked_databases</td>- <td><a href="#bytebase.store.LinkedDatabaseMetadata">LinkedDatabaseMetadata</a></td>+ <td>indexes</td>+ <td><a href="#bytebase.store.IndexMetadata">IndexMetadata</a></td><td>repeated</td>- <td><p> </p></td>+ <td><p>The indexes is the list of indexes in a table. </p></td></tr><tr>- <td>owner</td>- <td><a href="#string">string</a></td>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td><td></td><td><p> </p></td></tr>@@ -4519,8 +4455,8 @@ classification and user_comment is parsed from the comment. </p></td>- <h3 id="bytebase.store.DependencyColumn">DependencyColumn</h3>- <p>DependencyColumn is the metadata for dependency columns.</p>+ <h3 id="bytebase.store.ObjectSchema">ObjectSchema</h3>+ <p></p><table class="field-table">@@ -4530,24 +4466,31 @@ classification and user_comment is parsed from the comment. </p></td><tbody><tr>- <td>schema</td>- <td><a href="#string">string</a></td>+ <td>type</td>+ <td><a href="#bytebase.store.ObjectSchema.Type">ObjectSchema.Type</a></td><td></td>- <td><p>The schema is the schema of a reference column. </p></td>+ <td><p> </p></td></tr><tr>- <td>table</td>- <td><a href="#string">string</a></td>+ <td>struct_kind</td>+ <td><a href="#bytebase.store.ObjectSchema.StructKind">ObjectSchema.StructKind</a></td><td></td>- <td><p>The table is the table of a reference column. </p></td>+ <td><p> </p></td></tr><tr>- <td>column</td>+ <td>array_kind</td>+ <td><a href="#bytebase.store.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>semantic_type</td><td><a href="#string">string</a></td><td></td>- <td><p>The column is the name of a reference column. </p></td>+ <td><p> </p></td></tr></tbody>@@ -4557,7 +4500,7 @@ classification and user_comment is parsed from the comment. </p></td>- <h3 id="bytebase.store.DependencyTable">DependencyTable</h3>+ <h3 id="bytebase.store.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</h3><p></p>@@ -4568,17 +4511,10 @@ classification and user_comment is parsed from the comment. </p></td><tbody><tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The schema is the schema of a reference table. </p></td>- </tr>-- <tr>- <td>table</td>- <td><a href="#string">string</a></td>+ <td>kind</td>+ <td><a href="#bytebase.store.ObjectSchema">ObjectSchema</a></td><td></td>- <td><p>The table is the name of a reference table. </p></td>+ <td><p> </p></td></tr></tbody>@@ -4588,7 +4524,7 @@ classification and user_comment is parsed from the comment. </p></td>- <h3 id="bytebase.store.EnumTypeMetadata">EnumTypeMetadata</h3>+ <h3 id="bytebase.store.ObjectSchema.StructKind">ObjectSchema.StructKind</h3><p></p>@@ -4599,30 +4535,9 @@ classification and user_comment is parsed from the comment. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of a type. </p></td>- </tr>-- <tr>- <td>values</td>- <td><a href="#string">string</a></td>+ <td>properties</td>+ <td><a href="#bytebase.store.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</a></td><td>repeated</td>- <td><p>The enum values of a type. </p></td>- </tr>-- <tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>- <td></td><td><p> </p></td></tr>@@ -4633,7 +4548,7 @@ classification and user_comment is parsed from the comment. </p></td>- <h3 id="bytebase.store.EventMetadata">EventMetadata</h3>+ <h3 id="bytebase.store.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</h3><p></p>@@ -4644,43 +4559,15 @@ classification and user_comment is parsed from the comment. </p></td><tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name of the event. </p></td>- </tr>-- <tr>- <td>definition</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The schedule of the event. </p></td>- </tr>-- <tr>- <td>time_zone</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The time zone of the event. </p></td>- </tr>-- <tr>- <td>sql_mode</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>character_set_client</td>+ <td>key</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>collation_connection</td>- <td><a href="#string">string</a></td>+ <td>value</td>+ <td><a href="#bytebase.store.ObjectSchema">ObjectSchema</a></td><td></td><td><p> </p></td></tr>@@ -4692,99 +4579,8 @@ classification and user_comment is parsed from the comment. </p></td>- <h3 id="bytebase.store.ExtensionMetadata">ExtensionMetadata</h3>- <p>ExtensionMetadata is the metadata for extensions.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of an extension. </p></td>- </tr>-- <tr>- <td>schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The schema is the extension that is installed to. But the extension usage-is not limited to the schema. </p></td>- </tr>-- <tr>- <td>version</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The version is the version of an extension. </p></td>- </tr>-- <tr>- <td>description</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The description is the description of an extension. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.store.ExternalTableMetadata">ExternalTableMetadata</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of a external table. </p></td>- </tr>-- <tr>- <td>external_server_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The external_server_name is the name of the external server. </p></td>- </tr>-- <tr>- <td>external_database_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The external_database_name is the name of the external database. </p></td>- </tr>-- <tr>- <td>columns</td>- <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>- <td>repeated</td>- <td><p>The columns is the ordered list of columns in a foreign table. </p></td>- </tr>-- </tbody>- </table>------ <h3 id="bytebase.store.ForeignKeyMetadata">ForeignKeyMetadata</h3>- <p>ForeignKeyMetadata is the metadata for foreign keys.</p>+ <h3 id="bytebase.store.PackageMetadata">PackageMetadata</h3>+ <p>PackageMetadata is the metadata for packages.</p><table class="field-table">@@ -4797,59 +4593,14 @@ is not limited to the schema. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a foreign key. </p></td>- </tr>-- <tr>- <td>columns</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>- </tr>-- <tr>- <td>referenced_schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The referenced_schema is the referenced schema name of a foreign key.-It is an empty string for databases without such concept such as MySQL. </p></td>- </tr>-- <tr>- <td>referenced_table</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>- </tr>-- <tr>- <td>referenced_columns</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>- </tr>-- <tr>- <td>on_delete</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The on_delete is the on delete action of a foreign key. </p></td>- </tr>-- <tr>- <td>on_update</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The on_update is the on update action of a foreign key. </p></td>+ <td><p>The name is the name of a package. </p></td></tr><tr>- <td>match_type</td>+ <td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The match_type is the match type of a foreign key.-The match_type is the PostgreSQL specific field.-It's empty string for other databases. </p></td>+ <td><p>The definition is the definition of a package. </p></td></tr></tbody>@@ -4859,8 +4610,8 @@ It's empty string for other databases. </p></td>- <h3 id="bytebase.store.FunctionMetadata">FunctionMetadata</h3>- <p>FunctionMetadata is the metadata for functions.</p>+ <h3 id="bytebase.store.ProcedureMetadata">ProcedureMetadata</h3>+ <p>ProcedureMetadata is the metadata for procedures.</p><table class="field-table">@@ -4873,14 +4624,14 @@ It's empty string for other databases. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a function. </p></td>+ <td><p>The name is the name of a procedure. </p></td></tr><tr><td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The definition is the definition of a function. </p></td>+ <td><p>The definition is the definition of a procedure. </p></td></tr><tr>@@ -4919,21 +4670,6 @@ function takes. </p></td><td><p> </p></td></tr>- <tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>dependency_tables</td>- <td><a href="#bytebase.store.DependencyTable">DependencyTable</a></td>- <td>repeated</td>- <td><p>The dependency_tables is the list of dependency tables of a function.-For PostgreSQL, it's the list of tables that the function depends on the return type definition. </p></td>- </tr>-<tr><td>skip_dump</td><td><a href="#bool">bool</a></td>@@ -4948,7 +4684,7 @@ For PostgreSQL, it's the list of tables that the function depends on the ret- <h3 id="bytebase.store.GenerationMetadata">GenerationMetadata</h3>+ <h3 id="bytebase.store.SchemaCatalog">SchemaCatalog</h3><p></p>@@ -4959,17 +4695,18 @@ For PostgreSQL, it's the list of tables that the function depends on the ret<tbody><tr>- <td>type</td>- <td><a href="#bytebase.store.GenerationMetadata.Type">GenerationMetadata.Type</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name is the schema name.+It is an empty string for databases without such concept such as MySQL. </p></td></tr><tr>- <td>expression</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>tables</td>+ <td><a href="#bytebase.store.TableCatalog">TableCatalog</a></td>+ <td>repeated</td>+ <td><p>The table_configs is the list of configs for tables in a schema. </p></td></tr></tbody>@@ -4979,8 +4716,8 @@ For PostgreSQL, it's the list of tables that the function depends on the ret- <h3 id="bytebase.store.IndexMetadata">IndexMetadata</h3>- <p>IndexMetadata is the metadata for indexes.</p>+ <h3 id="bytebase.store.SchemaMetadata">SchemaMetadata</h3>+ <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p><table class="field-table">@@ -4993,101 +4730,108 @@ For PostgreSQL, it's the list of tables that the function depends on the ret<td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of an index. </p></td>+ <td><p>The name is the schema name.+It is an empty string for databases without such concept such as MySQL. </p></td></tr><tr>- <td>expressions</td>- <td><a href="#string">string</a></td>+ <td>tables</td>+ <td><a href="#bytebase.store.TableMetadata">TableMetadata</a></td><td>repeated</td>- <td><p>The expressions are the ordered columns or expressions of an index.-This could refer to a column or an expression. </p></td>+ <td><p>The tables is the list of tables in a schema. </p></td></tr><tr>- <td>key_length</td>- <td><a href="#int64">int64</a></td>+ <td>external_tables</td>+ <td><a href="#bytebase.store.ExternalTableMetadata">ExternalTableMetadata</a></td><td>repeated</td>- <td><p>The key_lengths are the ordered key lengths of an index.-If the key length is not specified, it's -1. </p></td>+ <td><p>The external_tables is the list of external tables in a schema. </p></td></tr><tr>- <td>descending</td>- <td><a href="#bool">bool</a></td>+ <td>views</td>+ <td><a href="#bytebase.store.ViewMetadata">ViewMetadata</a></td><td>repeated</td>- <td><p>The descending is the ordered descending of an index. </p></td>- </tr>-- <tr>- <td>type</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The type is the type of an index. </p></td>+ <td><p>The views is the list of views in a schema. </p></td></tr><tr>- <td>unique</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The unique is whether the index is unique. </p></td>+ <td>functions</td>+ <td><a href="#bytebase.store.FunctionMetadata">FunctionMetadata</a></td>+ <td>repeated</td>+ <td><p>The functions is the list of functions in a schema. </p></td></tr><tr>- <td>primary</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The primary is whether the index is a primary key index. </p></td>+ <td>procedures</td>+ <td><a href="#bytebase.store.ProcedureMetadata">ProcedureMetadata</a></td>+ <td>repeated</td>+ <td><p>The procedures is the list of procedures in a schema. </p></td></tr><tr>- <td>visible</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>The visible is whether the index is visible. </p></td>+ <td>streams</td>+ <td><a href="#bytebase.store.StreamMetadata">StreamMetadata</a></td>+ <td>repeated</td>+ <td><p>The streams is the list of streams in a schema, currently, only used for+Snowflake. </p></td></tr><tr>- <td>comment</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The comment is the comment of an index. </p></td>+ <td>tasks</td>+ <td><a href="#bytebase.store.TaskMetadata">TaskMetadata</a></td>+ <td>repeated</td>+ <td><p>The routines is the list of routines in a schema, currently, only used for+Snowflake. </p></td></tr><tr>- <td>definition</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The definition of an index. </p></td>+ <td>materialized_views</td>+ <td><a href="#bytebase.store.MaterializedViewMetadata">MaterializedViewMetadata</a></td>+ <td>repeated</td>+ <td><p>The materialized_views is the list of materialized views in a schema. </p></td></tr><tr>- <td>parent_index_schema</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The schema name of the parent index. </p></td>+ <td>sequences</td>+ <td><a href="#bytebase.store.SequenceMetadata">SequenceMetadata</a></td>+ <td>repeated</td>+ <td><p>The sequences is the list of sequences in a schema. </p></td></tr><tr>- <td>parent_index_name</td>+ <td>packages</td>+ <td><a href="#bytebase.store.PackageMetadata">PackageMetadata</a></td>+ <td>repeated</td>+ <td><p>The packages is the list of packages in a schema. </p></td>+ </tr>++ <tr>+ <td>owner</td><td><a href="#string">string</a></td><td></td>- <td><p>The index name of the parent index. </p></td>+ <td><p> </p></td></tr><tr>- <td>granularity</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The number of granules in the block. It's a ClickHouse specific field. </p></td>+ <td>events</td>+ <td><a href="#bytebase.store.EventMetadata">EventMetadata</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr><tr>- <td>is_constraint</td>+ <td>enum_types</td>+ <td><a href="#bytebase.store.EnumTypeMetadata">EnumTypeMetadata</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>skip_dump</td><td><a href="#bool">bool</a></td><td></td>- <td><p>It's a PostgreSQL specific field.-The unique constraint and unique index are not the same thing in PostgreSQL. </p></td>+ <td><p> </p></td></tr></tbody>@@ -5097,8 +4841,8 @@ The unique constraint and unique index are not the same thing in PostgreSQL. </p- <h3 id="bytebase.store.InstanceRoleMetadata">InstanceRoleMetadata</h3>- <p>InstanceRoleMetadata is the message for instance role.</p>+ <h3 id="bytebase.store.Secret">Secret</h3>+ <p></p><table class="field-table">@@ -5111,15 +4855,21 @@ The unique constraint and unique index are not the same thing in PostgreSQL. </p<td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The role name. It's unique within the instance. </p></td>+ <td><p>The name is the name of the secret. </p></td></tr><tr>- <td>grant</td>+ <td>value</td><td><a href="#string">string</a></td><td></td>- <td><p>The grant display string on the instance. It's generated by database-engine. </p></td>+ <td><p>The value is the value of the secret. </p></td>+ </tr>++ <tr>+ <td>description</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The description is the description of the secret. </p></td></tr></tbody>@@ -5129,7 +4879,7 @@ engine. </p></td>- <h3 id="bytebase.store.LinkedDatabaseMetadata">LinkedDatabaseMetadata</h3>+ <h3 id="bytebase.store.SequenceMetadata">SequenceMetadata</h3><p></p>@@ -5143,23 +4893,93 @@ engine. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name of a sequence. </p></td></tr><tr>- <td>username</td>+ <td>data_type</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The data type of a sequence. </p></td></tr><tr>- <td>host</td>+ <td>start</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The start value of a sequence. </p></td>+ </tr>++ <tr>+ <td>min_value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The minimum value of a sequence. </p></td>+ </tr>++ <tr>+ <td>max_value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The maximum value of a sequence. </p></td>+ </tr>++ <tr>+ <td>increment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Increment value of a sequence. </p></td>+ </tr>++ <tr>+ <td>cycle</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Cycle is whether the sequence cycles. </p></td>+ </tr>++ <tr>+ <td>cache_size</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Cache size of a sequence. </p></td>+ </tr>++ <tr>+ <td>last_value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Last value of a sequence. </p></td>+ </tr>++ <tr>+ <td>owner_table</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The owner table of the sequence. </p></td>+ </tr>++ <tr>+ <td>owner_column</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The owner column of the sequence. </p></td>+ </tr>++ <tr>+ <td>comment</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>+ <tr>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+</tbody></table>@@ -5167,8 +4987,8 @@ engine. </p></td>- <h3 id="bytebase.store.MaterializedViewMetadata">MaterializedViewMetadata</h3>- <p>MaterializedViewMetadata is the metadata for materialized views.</p>+ <h3 id="bytebase.store.StreamMetadata">StreamMetadata</h3>+ <p></p><table class="field-table">@@ -5181,49 +5001,56 @@ engine. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a view. </p></td>+ <td><p>The name is the name of a stream. </p></td></tr><tr>- <td>definition</td>+ <td>table_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The definition is the definition of a view. </p></td>+ <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>+ </tr>++ <tr>+ <td>owner</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The owner of the stream. </p></td></tr><tr><td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment is the comment of a view. </p></td>+ <td><p>The comment of the stream. </p></td></tr><tr>- <td>dependency_columns</td>- <td><a href="#bytebase.store.DependencyColumn">DependencyColumn</a></td>- <td>repeated</td>- <td><p>The dependency_columns is the list of dependency columns of a view. </p></td>+ <td>type</td>+ <td><a href="#bytebase.store.StreamMetadata.Type">StreamMetadata.Type</a></td>+ <td></td>+ <td><p>The type of the stream. </p></td></tr><tr>- <td>triggers</td>- <td><a href="#bytebase.store.TriggerMetadata">TriggerMetadata</a></td>- <td>repeated</td>- <td><p>The columns is the ordered list of columns in a table. </p></td>+ <td>stale</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td></tr><tr>- <td>indexes</td>- <td><a href="#bytebase.store.IndexMetadata">IndexMetadata</a></td>- <td>repeated</td>- <td><p>The indexes is the list of indexes in a table. </p></td>+ <td>mode</td>+ <td><a href="#bytebase.store.StreamMetadata.Mode">StreamMetadata.Mode</a></td>+ <td></td>+ <td><p>The mode of the stream. </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>definition</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The definition of the stream. </p></td></tr></tbody>@@ -5233,7 +5060,7 @@ engine. </p></td>- <h3 id="bytebase.store.ObjectSchema">ObjectSchema</h3>+ <h3 id="bytebase.store.TableCatalog">TableCatalog</h3><p></p>@@ -5244,28 +5071,28 @@ engine. </p></td><tbody><tr>- <td>type</td>- <td><a href="#bytebase.store.ObjectSchema.Type">ObjectSchema.Type</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name is the name of a table. </p></td></tr><tr>- <td>struct_kind</td>- <td><a href="#bytebase.store.ObjectSchema.StructKind">ObjectSchema.StructKind</a></td>- <td></td>- <td><p> </p></td>+ <td>columns</td>+ <td><a href="#bytebase.store.ColumnCatalog">ColumnCatalog</a></td>+ <td>repeated</td>+ <td><p>The column_configs is the ordered list of configs for columns in a table. </p></td></tr><tr>- <td>array_kind</td>- <td><a href="#bytebase.store.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</a></td>- <td></td>+ <td>object_schema</td>+ <td><a href="#bytebase.store.ObjectSchema">ObjectSchema</a></td>+ <td>optional</td><td><p> </p></td></tr><tr>- <td>semantic_type</td>+ <td>classification</td><td><a href="#string">string</a></td><td></td><td><p> </p></td>@@ -5278,8 +5105,8 @@ engine. </p></td>- <h3 id="bytebase.store.ObjectSchema.ArrayKind">ObjectSchema.ArrayKind</h3>- <p></p>+ <h3 id="bytebase.store.TableMetadata">TableMetadata</h3>+ <p>TableMetadata is the metadata for tables.</p><table class="field-table">@@ -5289,162 +5116,137 @@ engine. </p></td><tbody><tr>- <td>kind</td>- <td><a href="#bytebase.store.ObjectSchema">ObjectSchema</a></td>+ <td>name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The name is the name of a table. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.ObjectSchema.StructKind">ObjectSchema.StructKind</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>properties</td>- <td><a href="#bytebase.store.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</a></td>+ <td>columns</td>+ <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td><td>repeated</td>- <td><p> </p></td>+ <td><p>The columns is the ordered list of columns in a table. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.ObjectSchema.StructKind.PropertiesEntry">ObjectSchema.StructKind.PropertiesEntry</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>indexes</td>+ <td><a href="#bytebase.store.IndexMetadata">IndexMetadata</a></td>+ <td>repeated</td>+ <td><p>The indexes is the list of indexes in a table. </p></td>+ </tr><tr>- <td>key</td>+ <td>engine</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The engine is the engine of a table. </p></td></tr><tr>- <td>value</td>- <td><a href="#bytebase.store.ObjectSchema">ObjectSchema</a></td>+ <td>collation</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The collation is the collation of a table. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.PackageMetadata">PackageMetadata</h3>- <p>PackageMetadata is the metadata for packages.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>name</td>+ <td>charset</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a package. </p></td>+ <td><p>The character set of table. </p></td></tr><tr>- <td>definition</td>- <td><a href="#string">string</a></td>+ <td>row_count</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The definition is the definition of a package. </p></td>+ <td><p>The row_count is the estimated number of rows of a table. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.ProcedureMetadata">ProcedureMetadata</h3>- <p>ProcedureMetadata is the metadata for procedures.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>data_size</td>+ <td><a href="#int64">int64</a></td>+ <td></td>+ <td><p>The data_size is the estimated data size of a table. </p></td>+ </tr><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>index_size</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The name is the name of a procedure. </p></td>+ <td><p>The index_size is the estimated index size of a table. </p></td></tr><tr>- <td>definition</td>- <td><a href="#string">string</a></td>+ <td>data_free</td>+ <td><a href="#int64">int64</a></td><td></td>- <td><p>The definition is the definition of a procedure. </p></td>+ <td><p>The data_free is the estimated free data size of a table. </p></td></tr><tr>- <td>signature</td>+ <td>create_options</td><td><a href="#string">string</a></td><td></td>- <td><p>The signature is the name with the number and type of input arguments the-function takes. </p></td>+ <td><p>The create_options is the create option of a table. </p></td></tr><tr>- <td>character_set_client</td>+ <td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>MySQL specific metadata. </p></td>+ <td><p>The comment is the comment of a table.+classification and user_comment is parsed from the comment. </p></td></tr><tr>- <td>collation_connection</td>+ <td>user_comment</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The user_comment is the user comment of a table parsed from the comment. </p></td></tr><tr>- <td>database_collation</td>+ <td>foreign_keys</td>+ <td><a href="#bytebase.store.ForeignKeyMetadata">ForeignKeyMetadata</a></td>+ <td>repeated</td>+ <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>+ </tr>++ <tr>+ <td>partitions</td>+ <td><a href="#bytebase.store.TablePartitionMetadata">TablePartitionMetadata</a></td>+ <td>repeated</td>+ <td><p>The partitions is the list of partitions in a table. </p></td>+ </tr>++ <tr>+ <td>check_constraints</td>+ <td><a href="#bytebase.store.CheckConstraintMetadata">CheckConstraintMetadata</a></td>+ <td>repeated</td>+ <td><p>The check_constraints is the list of check constraints in a table. </p></td>+ </tr>++ <tr>+ <td>owner</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>sql_mode</td>+ <td>sorting_keys</td><td><a href="#string">string</a></td>- <td></td>+ <td>repeated</td>+ <td><p>The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.+Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by </p></td>+ </tr>++ <tr>+ <td>triggers</td>+ <td><a href="#bytebase.store.TriggerMetadata">TriggerMetadata</a></td>+ <td>repeated</td><td><p> </p></td></tr>@@ -5462,8 +5264,8 @@ function takes. </p></td>- <h3 id="bytebase.store.SchemaCatalog">SchemaCatalog</h3>- <p></p>+ <h3 id="bytebase.store.TablePartitionMetadata">TablePartitionMetadata</h3>+ <p>TablePartitionMetadata is the metadata for table partitions.</p><table class="field-table">@@ -5476,15 +5278,68 @@ function takes. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the schema name.-It is an empty string for databases without such concept such as MySQL. </p></td>+ <td><p>The name is the name of a table partition. </p></td></tr><tr>- <td>tables</td>- <td><a href="#bytebase.store.TableCatalog">TableCatalog</a></td>+ <td>type</td>+ <td><a href="#bytebase.store.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>+ <td></td>+ <td><p>The type of a table partition. </p></td>+ </tr>++ <tr>+ <td>expression</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The expression is the expression of a table partition.+For PostgreSQL, the expression is the text of {FOR VALUES+partition_bound_spec}, see+https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,+the expression is the `expr` or `column_list` of the following syntax.+PARTITION BY+ { [LINEAR] HASH(expr)+ | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)+ | RANGE{(expr) | COLUMNS(column_list)}+ | LIST{(expr) | COLUMNS(column_list)} }. </p></td>+ </tr>++ <tr>+ <td>value</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The value is the value of a table partition.+For MySQL, the value is for RANGE and LIST partition types,+- For a RANGE partition, it contains the value set in the partition's+VALUES LESS THAN clause, which can be either an integer or MAXVALUE.+- For a LIST partition, this column contains the values defined in the+partition's VALUES IN clause, which is a list of comma-separated integer+values.+- For others, it's an empty string. </p></td>+ </tr>++ <tr>+ <td>use_default</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The use_default is whether the users use the default partition, it stores+the different value for different database engines. For MySQL, it's [INT]+type, 0 means not use default partition, otherwise, it's equals to number+in syntax [SUB]PARTITION {number}. </p></td>+ </tr>++ <tr>+ <td>subpartitions</td>+ <td><a href="#bytebase.store.TablePartitionMetadata">TablePartitionMetadata</a></td><td>repeated</td>- <td><p>The table_configs is the list of configs for tables in a schema. </p></td>+ <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>+ </tr>++ <tr>+ <td>indexes</td>+ <td><a href="#bytebase.store.IndexMetadata">IndexMetadata</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -5494,8 +5349,8 @@ It is an empty string for databases without such concept such as MySQL. </p></td- <h3 id="bytebase.store.SchemaMetadata">SchemaMetadata</h3>- <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>+ <h3 id="bytebase.store.TaskMetadata">TaskMetadata</h3>+ <p></p><table class="field-table">@@ -5508,146 +5363,71 @@ It is an empty string for databases without such concept such as MySQL. </p></td<td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the schema name.-It is an empty string for databases without such concept such as MySQL. </p></td>+ <td><p>The name is the name of a task. </p></td></tr><tr>- <td>tables</td>- <td><a href="#bytebase.store.TableMetadata">TableMetadata</a></td>- <td>repeated</td>- <td><p>The tables is the list of tables in a schema. </p></td>+ <td>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The id is the snowflake-generated id of a task.+Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td></tr><tr>- <td>external_tables</td>- <td><a href="#bytebase.store.ExternalTableMetadata">ExternalTableMetadata</a></td>- <td>repeated</td>- <td><p>The external_tables is the list of external tables in a schema. </p></td>- </tr>-- <tr>- <td>views</td>- <td><a href="#bytebase.store.ViewMetadata">ViewMetadata</a></td>- <td>repeated</td>- <td><p>The views is the list of views in a schema. </p></td>- </tr>-- <tr>- <td>functions</td>- <td><a href="#bytebase.store.FunctionMetadata">FunctionMetadata</a></td>- <td>repeated</td>- <td><p>The functions is the list of functions in a schema. </p></td>- </tr>-- <tr>- <td>procedures</td>- <td><a href="#bytebase.store.ProcedureMetadata">ProcedureMetadata</a></td>- <td>repeated</td>- <td><p>The procedures is the list of procedures in a schema. </p></td>- </tr>-- <tr>- <td>streams</td>- <td><a href="#bytebase.store.StreamMetadata">StreamMetadata</a></td>- <td>repeated</td>- <td><p>The streams is the list of streams in a schema, currently, only used for-Snowflake. </p></td>- </tr>-- <tr>- <td>tasks</td>- <td><a href="#bytebase.store.TaskMetadata">TaskMetadata</a></td>- <td>repeated</td>- <td><p>The routines is the list of routines in a schema, currently, only used for-Snowflake. </p></td>- </tr>-- <tr>- <td>materialized_views</td>- <td><a href="#bytebase.store.MaterializedViewMetadata">MaterializedViewMetadata</a></td>- <td>repeated</td>- <td><p>The materialized_views is the list of materialized views in a schema. </p></td>- </tr>-- <tr>- <td>sequences</td>- <td><a href="#bytebase.store.SequenceMetadata">SequenceMetadata</a></td>- <td>repeated</td>- <td><p>The sequences is the list of sequences in a schema. </p></td>+ <td>owner</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The owner of the task. </p></td></tr><tr>- <td>packages</td>- <td><a href="#bytebase.store.PackageMetadata">PackageMetadata</a></td>- <td>repeated</td>- <td><p>The packages is the list of packages in a schema. </p></td>+ <td>comment</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The comment of the task. </p></td></tr><tr>- <td>owner</td>+ <td>warehouse</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>The warehouse of the task. </p></td></tr><tr>- <td>events</td>- <td><a href="#bytebase.store.EventMetadata">EventMetadata</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>schedule</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The schedule interval of the task. </p></td></tr><tr>- <td>enum_types</td>- <td><a href="#bytebase.store.EnumTypeMetadata">EnumTypeMetadata</a></td>+ <td>predecessors</td>+ <td><a href="#string">string</a></td><td>repeated</td>- <td><p> </p></td>- </tr>-- <tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>+ <td><p>The predecessor tasks of the task. </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.Secret">Secret</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>state</td>+ <td><a href="#bytebase.store.TaskMetadata.State">TaskMetadata.State</a></td><td></td>- <td><p>The name is the name of the secret. </p></td>+ <td><p>The state of the task. </p></td></tr><tr>- <td>value</td>+ <td>condition</td><td><a href="#string">string</a></td><td></td>- <td><p>The value is the value of the secret. </p></td>+ <td><p>The condition of the task. </p></td></tr><tr>- <td>description</td>+ <td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The description is the description of the secret. </p></td>+ <td><p>The definition of the task. </p></td></tr></tbody>@@ -5657,7 +5437,7 @@ Snowflake. </p></td>- <h3 id="bytebase.store.SequenceMetadata">SequenceMetadata</h3>+ <h3 id="bytebase.store.TriggerMetadata">TriggerMetadata</h3><p></p>@@ -5671,77 +5451,50 @@ Snowflake. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name of a sequence. </p></td>- </tr>-- <tr>- <td>data_type</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The data type of a sequence. </p></td>- </tr>-- <tr>- <td>start</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The start value of a sequence. </p></td>- </tr>-- <tr>- <td>min_value</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The minimum value of a sequence. </p></td>+ <td><p>The name is the name of the trigger. </p></td></tr><tr>- <td>max_value</td>+ <td>event</td><td><a href="#string">string</a></td><td></td>- <td><p>The maximum value of a sequence. </p></td>+ <td><p>The event is the event of the trigger, such as INSERT, UPDATE, DELETE,+TRUNCATE. </p></td></tr><tr>- <td>increment</td>+ <td>timing</td><td><a href="#string">string</a></td><td></td>- <td><p>Increment value of a sequence. </p></td>- </tr>-- <tr>- <td>cycle</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Cycle is whether the sequence cycles. </p></td>+ <td><p>The timing is the timing of the trigger, such as BEFORE, AFTER. </p></td></tr><tr>- <td>cache_size</td>+ <td>body</td><td><a href="#string">string</a></td><td></td>- <td><p>Cache size of a sequence. </p></td>+ <td><p>The body is the body of the trigger. </p></td></tr><tr>- <td>last_value</td>+ <td>sql_mode</td><td><a href="#string">string</a></td><td></td>- <td><p>Last value of a sequence. </p></td>+ <td><p> </p></td></tr><tr>- <td>owner_table</td>+ <td>character_set_client</td><td><a href="#string">string</a></td><td></td>- <td><p>The owner table of the sequence. </p></td>+ <td><p> </p></td></tr><tr>- <td>owner_column</td>+ <td>collation_connection</td><td><a href="#string">string</a></td><td></td>- <td><p>The owner column of the sequence. </p></td>+ <td><p> </p></td></tr><tr>@@ -5765,8 +5518,8 @@ Snowflake. </p></td>- <h3 id="bytebase.store.StreamMetadata">StreamMetadata</h3>- <p></p>+ <h3 id="bytebase.store.ViewMetadata">ViewMetadata</h3>+ <p>ViewMetadata is the metadata for views.</p><table class="field-table">@@ -5779,56 +5532,49 @@ Snowflake. </p></td><td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a stream. </p></td>- </tr>-- <tr>- <td>table_name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>+ <td><p>The name is the name of a view. </p></td></tr><tr>- <td>owner</td>+ <td>definition</td><td><a href="#string">string</a></td><td></td>- <td><p>The owner of the stream. </p></td>+ <td><p>The definition is the definition of a view. </p></td></tr><tr><td>comment</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment of the stream. </p></td>+ <td><p>The comment is the comment of a view. </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.store.StreamMetadata.Type">StreamMetadata.Type</a></td>- <td></td>- <td><p>The type of the stream. </p></td>+ <td>dependency_columns</td>+ <td><a href="#bytebase.store.DependencyColumn">DependencyColumn</a></td>+ <td>repeated</td>+ <td><p>The dependency_columns is the list of dependency columns of a view. </p></td></tr><tr>- <td>stale</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td>+ <td>columns</td>+ <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>+ <td>repeated</td>+ <td><p>The columns is the ordered list of columns in a table. </p></td></tr><tr>- <td>mode</td>- <td><a href="#bytebase.store.StreamMetadata.Mode">StreamMetadata.Mode</a></td>- <td></td>- <td><p>The mode of the stream. </p></td>+ <td>triggers</td>+ <td><a href="#bytebase.store.TriggerMetadata">TriggerMetadata</a></td>+ <td>repeated</td>+ <td><p>The triggers is the list of triggers in a view. </p></td></tr><tr>- <td>definition</td>- <td><a href="#string">string</a></td>+ <td>skip_dump</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The definition of the stream. </p></td>+ <td><p> </p></td></tr></tbody>@@ -5838,53 +5584,538 @@ Snowflake. </p></td>- <h3 id="bytebase.store.TableCatalog">TableCatalog</h3>- <p></p>-- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The name is the name of a table. </p></td>- </tr>-- <tr>- <td>columns</td>- <td><a href="#bytebase.store.ColumnCatalog">ColumnCatalog</a></td>- <td>repeated</td>- <td><p>The column_configs is the ordered list of configs for columns in a table. </p></td>- </tr>-- <tr>- <td>object_schema</td>- <td><a href="#bytebase.store.ObjectSchema">ObjectSchema</a></td>- <td>optional</td>- <td><p> </p></td>- </tr>++ <h3 id="bytebase.store.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>IDENTITY_GENERATION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ALWAYS</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>BY_DEFAULT</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.GenerationMetadata.Type">GenerationMetadata.Type</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TYPE_VIRTUAL</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TYPE_STORED</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.ObjectSchema.Type">ObjectSchema.Type</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STRING</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>NUMBER</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>BOOLEAN</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>OBJECT</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ARRAY</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.StreamMetadata.Mode">StreamMetadata.Mode</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>MODE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>MODE_DEFAULT</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>MODE_APPEND_ONLY</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>MODE_INSERT_ONLY</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.StreamMetadata.Type">StreamMetadata.Type</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TYPE_DELTA</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>+ <p>Type is the type of a table partition, some database engines may not</p><p>support all types. Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,</p><p>LINEAR_KEY</p><p>(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:</p><p>RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,</p><p>LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>RANGE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>RANGE_COLUMNS</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LIST</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LIST_COLUMNS</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>HASH</td>+ <td>5</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LINEAR_HASH</td>+ <td>6</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>KEY</td>+ <td>7</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LINEAR_KEY</td>+ <td>8</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.TaskMetadata.State">TaskMetadata.State</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>STATE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATE_STARTED</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STATE_SUSPENDED</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++++++++ <div class="file-heading">+ <h2 id="store/db_group.proto">store/db_group.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.store.DatabaseGroupPayload">DatabaseGroupPayload</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>classification</td>+ <td>multitenancy</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++++++++++ <div class="file-heading">+ <h2 id="store/deployment_config.proto">store/deployment_config.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.store.DeploymentConfig">DeploymentConfig</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>schedule</td>+ <td><a href="#bytebase.store.Schedule">Schedule</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.store.DeploymentSpec">DeploymentSpec</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>selector</td>+ <td><a href="#bytebase.store.LabelSelector">LabelSelector</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.store.LabelSelector">LabelSelector</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>match_expressions</td>+ <td><a href="#bytebase.store.LabelSelectorRequirement">LabelSelectorRequirement</a></td>+ <td>repeated</td>+ <td><p>match_expressions is a list of label selector requirements. The requirements are ANDed. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.store.LabelSelectorRequirement">LabelSelectorRequirement</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>key</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>+ <tr>+ <td>operator</td>+ <td><a href="#bytebase.store.LabelSelectorRequirement.OperatorType">LabelSelectorRequirement.OperatorType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>values</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.store.Schedule">Schedule</h3>+ <p>Schedule is the message for deployment schedule.</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>deployments</td>+ <td><a href="#bytebase.store.ScheduleDeployment">ScheduleDeployment</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>+</tbody></table>-+++ <h3 id="bytebase.store.ScheduleDeployment">ScheduleDeployment</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>title</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The title of the deployment (stage) in a schedule. </p></td>+ </tr>++ <tr>+ <td>id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>spec</td>+ <td><a href="#bytebase.store.DeploymentSpec">DeploymentSpec</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++++ <h3 id="bytebase.store.LabelSelectorRequirement.OperatorType">LabelSelectorRequirement.OperatorType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>OPERATOR_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>The operator is not specified.</p></td>+ </tr>++ <tr>+ <td>IN</td>+ <td>1</td>+ <td><p>The operator is "In".</p></td>+ </tr>++ <tr>+ <td>EXISTS</td>+ <td>2</td>+ <td><p>The operator is "Exists".</p></td>+ </tr>++ <tr>+ <td>NOT_IN</td>+ <td>3</td>+ <td><p>The operator is "Not In".</p></td>+ </tr>++ </tbody>+ </table>++++++++ <div class="file-heading">+ <h2 id="store/deprecated.proto">store/deprecated.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+- <h3 id="bytebase.store.TableMetadata">TableMetadata</h3>- <p>TableMetadata is the metadata for tables.</p>+ <h3 id="bytebase.store.DeprecatedMaskData">DeprecatedMaskData</h3>+ <p></p><table class="field-table">@@ -5894,145 +6125,273 @@ Snowflake. </p></td><tbody><tr>- <td>name</td>+ <td>schema</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a table. </p></td>- </tr>-- <tr>- <td>columns</td>- <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>- <td>repeated</td>- <td><p>The columns is the ordered list of columns in a table. </p></td>- </tr>-- <tr>- <td>indexes</td>- <td><a href="#bytebase.store.IndexMetadata">IndexMetadata</a></td>- <td>repeated</td>- <td><p>The indexes is the list of indexes in a table. </p></td>+ <td><p> </p></td></tr><tr>- <td>engine</td>+ <td>table</td><td><a href="#string">string</a></td><td></td>- <td><p>The engine is the engine of a table. </p></td>+ <td><p> </p></td></tr><tr>- <td>collation</td>+ <td>column</td><td><a href="#string">string</a></td><td></td>- <td><p>The collation is the collation of a table. </p></td>+ <td><p> </p></td></tr><tr>- <td>charset</td>- <td><a href="#string">string</a></td>+ <td>masking_level</td>+ <td><a href="#bytebase.store.MaskingLevel">MaskingLevel</a></td><td></td>- <td><p>The character set of table. </p></td>+ <td><p> </p></td></tr><tr>- <td>row_count</td>- <td><a href="#int64">int64</a></td>+ <td>full_masking_algorithm_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The row_count is the estimated number of rows of a table. </p></td>+ <td><p> </p></td></tr><tr>- <td>data_size</td>- <td><a href="#int64">int64</a></td>+ <td>partial_masking_algorithm_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The data_size is the estimated data size of a table. </p></td>+ <td><p> </p></td></tr>- <tr>- <td>index_size</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The index_size is the estimated index size of a table. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.DeprecatedMaskingPolicy">DeprecatedMaskingPolicy</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>data_free</td>- <td><a href="#int64">int64</a></td>- <td></td>- <td><p>The data_free is the estimated free data size of a table. </p></td>+ <td>mask_data</td>+ <td><a href="#bytebase.store.DeprecatedMaskData">DeprecatedMaskData</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr>+ </tbody>+ </table>++++++++++++++ <div class="file-heading">+ <h2 id="store/export_archive.proto">store/export_archive.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.store.ExportArchivePayload">ExportArchivePayload</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>create_options</td>- <td><a href="#string">string</a></td>+ <td>file_format</td>+ <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td><td></td>- <td><p>The create_options is the create option of a table. </p></td>+ <td><p>The exported file format. e.g. JSON, CSV, SQL </p></td></tr>+ </tbody>+ </table>++++++++++++++ <div class="file-heading">+ <h2 id="store/group.proto">store/group.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.store.GroupMember">GroupMember</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>comment</td>+ <td>member</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment is the comment of a table.-classification and user_comment is parsed from the comment. </p></td>+ <td><p>Member is the principal who belong to this group.++Format: users/{userUID}. </p></td></tr><tr>- <td>user_comment</td>- <td><a href="#string">string</a></td>+ <td>role</td>+ <td><a href="#bytebase.store.GroupMember.Role">GroupMember.Role</a></td><td></td>- <td><p>The user_comment is the user comment of a table parsed from the comment. </p></td>+ <td><p> </p></td></tr>- <tr>- <td>foreign_keys</td>- <td><a href="#bytebase.store.ForeignKeyMetadata">ForeignKeyMetadata</a></td>- <td>repeated</td>- <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>- </tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.GroupPayload">GroupPayload</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody><tr>- <td>partitions</td>- <td><a href="#bytebase.store.TablePartitionMetadata">TablePartitionMetadata</a></td>+ <td>members</td>+ <td><a href="#bytebase.store.GroupMember">GroupMember</a></td><td>repeated</td>- <td><p>The partitions is the list of partitions in a table. </p></td>+ <td><p> </p></td></tr><tr>- <td>check_constraints</td>- <td><a href="#bytebase.store.CheckConstraintMetadata">CheckConstraintMetadata</a></td>- <td>repeated</td>- <td><p>The check_constraints is the list of check constraints in a table. </p></td>+ <td>source</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>source means where the group comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td></tr>+ </tbody>+ </table>++++++++ <h3 id="bytebase.store.GroupMember.Role">GroupMember.Role</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ROLE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>OWNER</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>MEMBER</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++++++++ <div class="file-heading">+ <h2 id="store/idp.proto">store/idp.proto</h2><a href="#title">Top</a>+ </div>+ <p></p>+++ <h3 id="bytebase.store.FieldMapping">FieldMapping</h3>+ <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p><p>e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.</p><p>Then the identifier of FieldMapping will be `login`, display_name will be `name`,</p><p>and email will be `email`.</p><p>reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user</p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>owner</td>+ <td>identifier</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td></tr><tr>- <td>sorting_keys</td>+ <td>display_name</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.-Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by </p></td>+ <td></td>+ <td><p>DisplayName is the field name of display name in 3rd-party idp user info. Optional. </p></td></tr><tr>- <td>triggers</td>- <td><a href="#bytebase.store.TriggerMetadata">TriggerMetadata</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>email</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Email is the field name of primary email in 3rd-party idp user info. Optional. </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>phone</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td></tr></tbody>@@ -6042,8 +6401,8 @@ Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family- <h3 id="bytebase.store.TablePartitionMetadata">TablePartitionMetadata</h3>- <p>TablePartitionMetadata is the metadata for table partitions.</p>+ <h3 id="bytebase.store.IdentityProviderConfig">IdentityProviderConfig</h3>+ <p></p><table class="field-table">@@ -6053,71 +6412,69 @@ Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family<tbody><tr>- <td>name</td>- <td><a href="#string">string</a></td>+ <td>oauth2_config</td>+ <td><a href="#bytebase.store.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td><td></td>- <td><p>The name is the name of a table partition. </p></td>+ <td><p> </p></td></tr><tr>- <td>type</td>- <td><a href="#bytebase.store.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>+ <td>oidc_config</td>+ <td><a href="#bytebase.store.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td><td></td>- <td><p>The type of a table partition. </p></td>+ <td><p> </p></td></tr><tr>- <td>expression</td>- <td><a href="#string">string</a></td>+ <td>ldap_config</td>+ <td><a href="#bytebase.store.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td><td></td>- <td><p>The expression is the expression of a table partition.-For PostgreSQL, the expression is the text of {FOR VALUES-partition_bound_spec}, see-https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,-the expression is the `expr` or `column_list` of the following syntax.-PARTITION BY- { [LINEAR] HASH(expr)- | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)- | RANGE{(expr) | COLUMNS(column_list)}- | LIST{(expr) | COLUMNS(column_list)} }. </p></td>+ <td><p> </p></td></tr>+ </tbody>+ </table>++++++ <h3 id="bytebase.store.IdentityProviderUserInfo">IdentityProviderUserInfo</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>+<tr>- <td>value</td>+ <td>identifier</td><td><a href="#string">string</a></td><td></td>- <td><p>The value is the value of a table partition.-For MySQL, the value is for RANGE and LIST partition types,-- For a RANGE partition, it contains the value set in the partition's-VALUES LESS THAN clause, which can be either an integer or MAXVALUE.-- For a LIST partition, this column contains the values defined in the-partition's VALUES IN clause, which is a list of comma-separated integer-values.-- For others, it's an empty string. </p></td>+ <td><p>Identifier is the value of the unique identifier in 3rd-party idp user info. </p></td></tr><tr>- <td>use_default</td>+ <td>display_name</td><td><a href="#string">string</a></td><td></td>- <td><p>The use_default is whether the users use the default partition, it stores-the different value for different database engines. For MySQL, it's [INT]-type, 0 means not use default partition, otherwise, it's equals to number-in syntax [SUB]PARTITION {number}. </p></td>+ <td><p>DisplayName is the value of display name in 3rd-party idp user info. </p></td></tr><tr>- <td>subpartitions</td>- <td><a href="#bytebase.store.TablePartitionMetadata">TablePartitionMetadata</a></td>- <td>repeated</td>- <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>+ <td>email</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Email is the value of primary email in 3rd-party idp user info. </p></td></tr><tr>- <td>indexes</td>- <td><a href="#bytebase.store.IndexMetadata">IndexMetadata</a></td>- <td>repeated</td>- <td><p> </p></td>+ <td>phone</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Phone is the value of primary phone in 3rd-party idp user info. </p></td></tr></tbody>@@ -6127,8 +6484,8 @@ in syntax [SUB]PARTITION {number}. </p></td>- <h3 id="bytebase.store.TaskMetadata">TaskMetadata</h3>- <p></p>+ <h3 id="bytebase.store.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>+ <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p><table class="field-table">@@ -6138,74 +6495,73 @@ in syntax [SUB]PARTITION {number}. </p></td><tbody><tr>- <td>name</td>+ <td>host</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a task. </p></td>+ <td><p>Host is the hostname or IP address of the LDAP server, e.g.+"ldap.example.com". </p></td></tr><tr>- <td>id</td>- <td><a href="#string">string</a></td>+ <td>port</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>The id is the snowflake-generated id of a task.-Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>+ <td><p>Port is the port number of the LDAP server, e.g. 389. When not set, the+default port of the corresponding security protocol will be used, i.e. 389+for StartTLS and 636 for LDAPS. </p></td></tr><tr>- <td>owner</td>- <td><a href="#string">string</a></td>+ <td>skip_tls_verify</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p>The owner of the task. </p></td>+ <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td></tr><tr>- <td>comment</td>+ <td>bind_dn</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment of the task. </p></td>+ <td><p>BindDN is the DN of the user to bind as a service account to perform+search requests. </p></td></tr><tr>- <td>warehouse</td>+ <td>bind_password</td><td><a href="#string">string</a></td><td></td>- <td><p>The warehouse of the task. </p></td>+ <td><p>BindPassword is the password of the user to bind as a service account. </p></td></tr><tr>- <td>schedule</td>+ <td>base_dn</td><td><a href="#string">string</a></td><td></td>- <td><p>The schedule interval of the task. </p></td>+ <td><p>BaseDN is the base DN to search for users, e.g. "ou=users,dc=example,dc=com". </p></td></tr><tr>- <td>predecessors</td>+ <td>user_filter</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The predecessor tasks of the task. </p></td>- </tr>-- <tr>- <td>state</td>- <td><a href="#bytebase.store.TaskMetadata.State">TaskMetadata.State</a></td><td></td>- <td><p>The state of the task. </p></td>+ <td><p>UserFilter is the filter to search for users, e.g. "(uid=%s)". </p></td></tr><tr>- <td>condition</td>+ <td>security_protocol</td><td><a href="#string">string</a></td><td></td>- <td><p>The condition of the task. </p></td>+ <td><p>SecurityProtocol is the security protocol to be used for establishing+connections with the LDAP server. It should be either StartTLS or LDAPS, and+cannot be empty. </p></td></tr><tr>- <td>definition</td>- <td><a href="#string">string</a></td>+ <td>field_mapping</td>+ <td><a href="#bytebase.store.FieldMapping">FieldMapping</a></td><td></td>- <td><p>The definition of the task. </p></td>+ <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP+server. </p></td></tr></tbody>@@ -6215,8 +6571,8 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>- <h3 id="bytebase.store.TriggerMetadata">TriggerMetadata</h3>- <p></p>+ <h3 id="bytebase.store.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>+ <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p><table class="field-table">@@ -6226,65 +6582,64 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td><tbody><tr>- <td>name</td>+ <td>auth_url</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of the trigger. </p></td>+ <td><p> </p></td></tr><tr>- <td>event</td>+ <td>token_url</td><td><a href="#string">string</a></td><td></td>- <td><p>The event is the event of the trigger, such as INSERT, UPDATE, DELETE,-TRUNCATE. </p></td>+ <td><p> </p></td></tr><tr>- <td>timing</td>+ <td>user_info_url</td><td><a href="#string">string</a></td><td></td>- <td><p>The timing is the timing of the trigger, such as BEFORE, AFTER. </p></td>+ <td><p> </p></td></tr><tr>- <td>body</td>+ <td>client_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The body is the body of the trigger. </p></td>+ <td><p> </p></td></tr><tr>- <td>sql_mode</td>+ <td>client_secret</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>character_set_client</td>+ <td>scopes</td><td><a href="#string">string</a></td>- <td></td>+ <td>repeated</td><td><p> </p></td></tr><tr>- <td>collation_connection</td>- <td><a href="#string">string</a></td>+ <td>field_mapping</td>+ <td><a href="#bytebase.store.FieldMapping">FieldMapping</a></td><td></td><td><p> </p></td></tr><tr>- <td>comment</td>- <td><a href="#string">string</a></td>+ <td>skip_tls_verify</td>+ <td><a href="#bool">bool</a></td><td></td><td><p> </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>auth_style</td>+ <td><a href="#bytebase.store.OAuth2AuthStyle">OAuth2AuthStyle</a></td><td></td><td><p> </p></td></tr>@@ -6296,8 +6651,8 @@ TRUNCATE. </p></td>- <h3 id="bytebase.store.ViewMetadata">ViewMetadata</h3>- <p>ViewMetadata is the metadata for views.</p>+ <h3 id="bytebase.store.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>+ <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p><table class="field-table">@@ -6307,50 +6662,43 @@ TRUNCATE. </p></td><tbody><tr>- <td>name</td>+ <td>issuer</td><td><a href="#string">string</a></td><td></td>- <td><p>The name is the name of a view. </p></td>+ <td><p> </p></td></tr><tr>- <td>definition</td>+ <td>client_id</td><td><a href="#string">string</a></td><td></td>- <td><p>The definition is the definition of a view. </p></td>+ <td><p> </p></td></tr><tr>- <td>comment</td>+ <td>client_secret</td><td><a href="#string">string</a></td><td></td>- <td><p>The comment is the comment of a view. </p></td>- </tr>-- <tr>- <td>dependency_columns</td>- <td><a href="#bytebase.store.DependencyColumn">DependencyColumn</a></td>- <td>repeated</td>- <td><p>The dependency_columns is the list of dependency columns of a view. </p></td>+ <td><p> </p></td></tr><tr>- <td>columns</td>- <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>- <td>repeated</td>- <td><p>The columns is the ordered list of columns in a table. </p></td>+ <td>field_mapping</td>+ <td><a href="#bytebase.store.FieldMapping">FieldMapping</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>triggers</td>- <td><a href="#bytebase.store.TriggerMetadata">TriggerMetadata</a></td>- <td>repeated</td>- <td><p>The triggers is the list of triggers in a view. </p></td>+ <td>skip_tls_verify</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td></tr><tr>- <td>skip_dump</td>- <td><a href="#bool">bool</a></td>+ <td>auth_style</td>+ <td><a href="#bytebase.store.OAuth2AuthStyle">OAuth2AuthStyle</a></td><td></td><td><p> </p></td></tr>@@ -6364,147 +6712,7 @@ TRUNCATE. </p></td>- <h3 id="bytebase.store.ColumnMetadata.IdentityGeneration">ColumnMetadata.IdentityGeneration</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>IDENTITY_GENERATION_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>ALWAYS</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>BY_DEFAULT</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.GenerationMetadata.Type">GenerationMetadata.Type</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>TYPE_VIRTUAL</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>TYPE_STORED</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.ObjectSchema.Type">ObjectSchema.Type</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>STRING</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>NUMBER</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>BOOLEAN</td>- <td>3</td>- <td><p></p></td>- </tr>-- <tr>- <td>OBJECT</td>- <td>4</td>- <td><p></p></td>- </tr>-- <tr>- <td>ARRAY</td>- <td>5</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.StreamMetadata.Mode">StreamMetadata.Mode</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>MODE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>MODE_DEFAULT</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>MODE_APPEND_ONLY</td>- <td>2</td>- <td><p></p></td>- </tr>-- <tr>- <td>MODE_INSERT_ONLY</td>- <td>3</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.StreamMetadata.Type">StreamMetadata.Type</h3>+ <h3 id="bytebase.store.IdentityProviderType">IdentityProviderType</h3><p></p><table class="enum-table"><thead>@@ -6513,86 +6721,33 @@ TRUNCATE. </p></td><tbody><tr>- <td>TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>TYPE_DELTA</td>- <td>1</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-- <h3 id="bytebase.store.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>- <p>Type is the type of a table partition, some database engines may not</p><p>support all types. Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,</p><p>LINEAR_KEY</p><p>(https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:</p><p>RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,</p><p>LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>TYPE_UNSPECIFIED</td>+ <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>RANGE</td>+ <td>OAUTH2</td><td>1</td><td><p></p></td></tr><tr>- <td>RANGE_COLUMNS</td>+ <td>OIDC</td><td>2</td><td><p></p></td></tr><tr>- <td>LIST</td>+ <td>LDAP</td><td>3</td><td><p></p></td></tr>- <tr>- <td>LIST_COLUMNS</td>- <td>4</td>- <td><p></p></td>- </tr>-- <tr>- <td>HASH</td>- <td>5</td>- <td><p></p></td>- </tr>-- <tr>- <td>LINEAR_HASH</td>- <td>6</td>- <td><p></p></td>- </tr>-- <tr>- <td>KEY</td>- <td>7</td>- <td><p></p></td>- </tr>-- <tr>- <td>LINEAR_KEY</td>- <td>8</td>- <td><p></p></td>- </tr>-</tbody></table>- <h3 id="bytebase.store.TaskMetadata.State">TaskMetadata.State</h3>+ <h3 id="bytebase.store.OAuth2AuthStyle">OAuth2AuthStyle</h3><p></p><table class="enum-table"><thead>@@ -6601,21 +6756,23 @@ TRUNCATE. </p></td><tbody><tr>- <td>STATE_UNSPECIFIED</td>+ <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>STATE_STARTED</td>+ <td>IN_PARAMS</td><td>1</td>- <td><p></p></td>+ <td><p>IN_PARAMS sends the "client_id" and "client_secret" in the POST body+as application/x-www-form-urlencoded parameters.</p></td></tr><tr>- <td>STATE_SUSPENDED</td>+ <td>IN_HEADER</td><td>2</td>- <td><p></p></td>+ <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.+This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td></tr></tbody>@@ -6628,50 +6785,12 @@ TRUNCATE. </p></td><div class="file-heading">- <h2 id="store/db_group.proto">store/db_group.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.DatabaseGroupPayload">DatabaseGroupPayload</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>multitenancy</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- </tbody>- </table>-------------- <div class="file-heading">- <h2 id="store/deployment_config.proto">store/deployment_config.proto</h2><a href="#title">Top</a>+ <h2 id="store/instance.proto">store/instance.proto</h2><a href="#title">Top</a></div><p></p>- <h3 id="bytebase.store.DeploymentConfig">DeploymentConfig</h3>+ <h3 id="bytebase.store.DataSource">DataSource</h3><p></p>@@ -6682,266 +6801,258 @@ TRUNCATE. </p></td><tbody><tr>- <td>schedule</td>- <td><a href="#bytebase.store.Schedule">Schedule</a></td>+ <td>id</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.DeploymentSpec">DeploymentSpec</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>type</td>+ <td><a href="#bytebase.store.DataSourceType">DataSourceType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>selector</td>- <td><a href="#bytebase.store.LabelSelector">LabelSelector</a></td>+ <td>host</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.LabelSelector">LabelSelector</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>port</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>match_expressions</td>- <td><a href="#bytebase.store.LabelSelectorRequirement">LabelSelectorRequirement</a></td>- <td>repeated</td>- <td><p>match_expressions is a list of label selector requirements. The requirements are ANDed. </p></td>+ <td>username</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.LabelSelectorRequirement">LabelSelectorRequirement</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>obfuscated_password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>key</td>+ <td>database</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>operator</td>- <td><a href="#bytebase.store.LabelSelectorRequirement.OperatorType">LabelSelectorRequirement.OperatorType</a></td>+ <td>obfuscated_ssl_key</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>values</td>+ <td>obfuscated_ssl_cert</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. </p></td>+ <td></td>+ <td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.Schedule">Schedule</h3>- <p>Schedule is the message for deployment schedule.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>obfuscated_ssl_ca</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>deployments</td>- <td><a href="#bytebase.store.ScheduleDeployment">ScheduleDeployment</a></td>- <td>repeated</td>+ <td>srv</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>srv is a boolean flag that indicates whether the host is a DNS SRV record. </p></td>+ </tr>++ <tr>+ <td>authentication_database</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>authentication_database is the database name to authenticate against, which stores the user credentials. </p></td>+ </tr>++ <tr>+ <td>sid</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>sid and service_name are used for Oracle. </p></td>+ </tr>++ <tr>+ <td>service_name</td>+ <td><a href="#string">string</a></td>+ <td></td><td><p> </p></td></tr>- </tbody>- </table>------ <h3 id="bytebase.store.ScheduleDeployment">ScheduleDeployment</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>ssh_host</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>SSH related+The hostname of the SSH server agent. </p></td>+ </tr><tr>- <td>title</td>+ <td>ssh_port</td><td><a href="#string">string</a></td><td></td>- <td><p>The title of the deployment (stage) in a schedule. </p></td>+ <td><p>The port of the SSH server agent. It's 22 typically. </p></td></tr><tr>- <td>id</td>+ <td>ssh_user</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The user to login the server. </p></td>+ </tr>++ <tr>+ <td>ssh_obfuscated_password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The password to login the server. If it's empty string, no password is required. </p></td>+ </tr>++ <tr>+ <td>ssh_obfuscated_private_key</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>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"). </p></td>+ </tr>++ <tr>+ <td>authentication_private_key_obfuscated</td><td><a href="#string">string</a></td><td></td>+ <td><p>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. </p></td>+ </tr>++ <tr>+ <td>external_secret</td>+ <td><a href="#bytebase.store.DataSourceExternalSecret">DataSourceExternalSecret</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>authentication_type</td>+ <td><a href="#bytebase.store.DataSource.AuthenticationType">DataSource.AuthenticationType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>client_secret_credential</td>+ <td><a href="#bytebase.store.DataSource.ClientSecretCredential">DataSource.ClientSecretCredential</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>sasl_config</td>+ <td><a href="#bytebase.store.SASLConfig">SASLConfig</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>spec</td>- <td><a href="#bytebase.store.DeploymentSpec">DeploymentSpec</a></td>+ <td>additional_addresses</td>+ <td><a href="#bytebase.store.DataSource.Address">DataSource.Address</a></td>+ <td>repeated</td>+ <td><p>additional_addresses is used for MongoDB replica set. </p></td>+ </tr>++ <tr>+ <td>replica_set</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>replica_set is used for MongoDB replica set. </p></td>+ </tr>++ <tr>+ <td>direct_connection</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. </p></td>+ </tr>++ <tr>+ <td>region</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>region is the location of where the DB is, works for AWS RDS. For example, us-east-1. </p></td>+ </tr>++ <tr>+ <td>warehouse_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>warehouse_id is used by Databricks. </p></td>+ </tr>++ <tr>+ <td>master_name</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>master_name is the master name used by connecting redis-master via redis sentinel. </p></td></tr>- </tbody>- </table>-------- <h3 id="bytebase.store.LabelSelectorRequirement.OperatorType">LabelSelectorRequirement.OperatorType</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>OPERATOR_TYPE_UNSPECIFIED</td>- <td>0</td>- <td><p>The operator is not specified.</p></td>- </tr>-- <tr>- <td>IN</td>- <td>1</td>- <td><p>The operator is "In".</p></td>- </tr>-- <tr>- <td>EXISTS</td>- <td>2</td>- <td><p>The operator is "Exists".</p></td>- </tr>-- <tr>- <td>NOT_IN</td>- <td>3</td>- <td><p>The operator is "Not In".</p></td>- </tr>-- </tbody>- </table>-------- <div class="file-heading">- <h2 id="store/deprecated.proto">store/deprecated.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.DeprecatedMaskData">DeprecatedMaskData</h3>- <p></p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-<tr>- <td>schema</td>+ <td>master_username</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>master_username and master_obfuscated_password are master credentials used by redis sentinel mode. </p></td></tr><tr>- <td>table</td>+ <td>master_obfuscated_password</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>column</td>- <td><a href="#string">string</a></td>+ <td>redis_type</td>+ <td><a href="#bytebase.store.DataSource.RedisType">DataSource.RedisType</a></td><td></td><td><p> </p></td></tr><tr>- <td>masking_level</td>- <td><a href="#bytebase.store.MaskingLevel">MaskingLevel</a></td>+ <td>use_ssl</td>+ <td><a href="#bool">bool</a></td><td></td>- <td><p> </p></td>+ <td><p>Use SSL to connect to the data source. By default, we use system default SSL configuration. </p></td></tr><tr>- <td>full_masking_algorithm_id</td>+ <td>cluster</td><td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>Cluster is the cluster name for the data source. Used by CockroachDB. </p></td></tr><tr>- <td>partial_masking_algorithm_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>+ <td>extra_connection_parameters</td>+ <td><a href="#bytebase.store.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</a></td>+ <td>repeated</td>+ <td><p>Extra connection parameters for the database connection.+For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p></td></tr></tbody>@@ -6951,7 +7062,7 @@ TRUNCATE. </p></td>- <h3 id="bytebase.store.DeprecatedMaskingPolicy">DeprecatedMaskingPolicy</h3>+ <h3 id="bytebase.store.DataSource.Address">DataSource.Address</h3><p></p>@@ -6962,9 +7073,16 @@ TRUNCATE. </p></td><tbody><tr>- <td>mask_data</td>- <td><a href="#bytebase.store.DeprecatedMaskData">DeprecatedMaskData</a></td>- <td>repeated</td>+ <td>host</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>port</td>+ <td><a href="#string">string</a></td>+ <td></td><td><p> </p></td></tr>@@ -6975,21 +7093,7 @@ TRUNCATE. </p></td>--------- <div class="file-heading">- <h2 id="store/export_archive.proto">store/export_archive.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.ExportArchivePayload">ExportArchivePayload</h3>+ <h3 id="bytebase.store.DataSource.ClientSecretCredential">DataSource.ClientSecretCredential</h3><p></p>@@ -7000,10 +7104,24 @@ TRUNCATE. </p></td><tbody><tr>- <td>file_format</td>- <td><a href="#bytebase.store.ExportFormat">ExportFormat</a></td>+ <td>tenant_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p>The exported file format. e.g. JSON, CSV, SQL </p></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>client_id</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>client_secret</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td></tr></tbody>@@ -7013,21 +7131,7 @@ TRUNCATE. </p></td>--------- <div class="file-heading">- <h2 id="store/group.proto">store/group.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.GroupMember">GroupMember</h3>+ <h3 id="bytebase.store.DataSource.ExtraConnectionParametersEntry">DataSource.ExtraConnectionParametersEntry</h3><p></p>@@ -7038,17 +7142,15 @@ TRUNCATE. </p></td><tbody><tr>- <td>member</td>+ <td>key</td><td><a href="#string">string</a></td><td></td>- <td><p>Member is the principal who belong to this group.--Format: users/{userUID}. </p></td>+ <td><p> </p></td></tr><tr>- <td>role</td>- <td><a href="#bytebase.store.GroupMember.Role">GroupMember.Role</a></td>+ <td>value</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -7060,7 +7162,7 @@ Format: users/{userUID}. </p></td>- <h3 id="bytebase.store.GroupPayload">GroupPayload</h3>+ <h3 id="bytebase.store.DataSourceExternalSecret">DataSourceExternalSecret</h3><p></p>@@ -7071,105 +7173,59 @@ Format: users/{userUID}. </p></td><tbody><tr>- <td>members</td>- <td><a href="#bytebase.store.GroupMember">GroupMember</a></td>- <td>repeated</td>+ <td>secret_type</td>+ <td><a href="#bytebase.store.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</a></td>+ <td></td><td><p> </p></td></tr><tr>- <td>source</td>+ <td>url</td><td><a href="#string">string</a></td><td></td>- <td><p>source means where the group comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID. </p></td>+ <td><p> </p></td></tr>- </tbody>- </table>-------- <h3 id="bytebase.store.GroupMember.Role">GroupMember.Role</h3>- <p></p>- <table class="enum-table">- <thead>- <tr><td>Name</td><td>Number</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>ROLE_UNSPECIFIED</td>- <td>0</td>- <td><p></p></td>- </tr>-- <tr>- <td>OWNER</td>- <td>1</td>- <td><p></p></td>- </tr>-- <tr>- <td>MEMBER</td>- <td>2</td>- <td><p></p></td>- </tr>-- </tbody>- </table>-------- <div class="file-heading">- <h2 id="store/idp.proto">store/idp.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.FieldMapping">FieldMapping</h3>- <p>FieldMapping saves the field names from user info API of identity provider.</p><p>As we save all raw json string of user info response data into `principal.idp_user_info`,</p><p>we can extract the relevant data based with `FieldMapping`.</p><p>e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.</p><p>Then the identifier of FieldMapping will be `login`, display_name will be `name`,</p><p>and email will be `email`.</p><p>reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>+ <tr>+ <td>auth_type</td>+ <td><a href="#bytebase.store.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>app_role</td>+ <td><a href="#bytebase.store.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</a></td>+ <td></td>+ <td><p> </p></td>+ </tr><tr>- <td>identifier</td>+ <td>token</td><td><a href="#string">string</a></td><td></td>- <td><p>Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. </p></td>+ <td><p> </p></td></tr><tr>- <td>display_name</td>+ <td>engine_name</td><td><a href="#string">string</a></td><td></td>- <td><p>DisplayName is the field name of display name in 3rd-party idp user info. Optional. </p></td>+ <td><p>engine name is the name for secret engine. </p></td></tr><tr>- <td>email</td>+ <td>secret_name</td><td><a href="#string">string</a></td><td></td>- <td><p>Email is the field name of primary email in 3rd-party idp user info. Optional. </p></td>+ <td><p>the secret name in the engine to store the password. </p></td></tr><tr>- <td>phone</td>+ <td>password_key_name</td><td><a href="#string">string</a></td><td></td>- <td><p>Phone is the field name of primary phone in 3rd-party idp user info. Optional. </p></td>+ <td><p>the key name for the password. </p></td></tr></tbody>@@ -7179,7 +7235,7 @@ Format: users/{userUID}. </p></td>- <h3 id="bytebase.store.IdentityProviderConfig">IdentityProviderConfig</h3>+ <h3 id="bytebase.store.DataSourceExternalSecret.AppRoleAuthOption">DataSourceExternalSecret.AppRoleAuthOption</h3><p></p>@@ -7190,26 +7246,33 @@ Format: users/{userUID}. </p></td><tbody><tr>- <td>oauth2_config</td>- <td><a href="#bytebase.store.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</a></td>+ <td>role_id</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>oidc_config</td>- <td><a href="#bytebase.store.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</a></td>+ <td>secret_id</td>+ <td><a href="#string">string</a></td><td></td>- <td><p> </p></td>+ <td><p>the secret id for the role without ttl. </p></td></tr><tr>- <td>ldap_config</td>- <td><a href="#bytebase.store.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</a></td>+ <td>type</td>+ <td><a href="#bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</a></td><td></td><td><p> </p></td></tr>+ <tr>+ <td>mount_path</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The path where the approle auth method is mounted. </p></td>+ </tr>+</tbody></table>@@ -7217,8 +7280,8 @@ Format: users/{userUID}. </p></td>- <h3 id="bytebase.store.IdentityProviderUserInfo">IdentityProviderUserInfo</h3>- <p></p>+ <h3 id="bytebase.store.InstanceMetadata">InstanceMetadata</h3>+ <p>InstanceMetadata is the metadata for instances.</p><table class="field-table">@@ -7228,31 +7291,55 @@ Format: users/{userUID}. </p></td><tbody><tr>- <td>identifier</td>- <td><a href="#string">string</a></td>+ <td>mysql_lower_case_table_names</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Identifier is the value of the unique identifier in 3rd-party idp user info. </p></td>+ <td><p>The lower_case_table_names config for MySQL instances.+It is used to determine whether the table names and database names are case sensitive. </p></td></tr><tr>- <td>display_name</td>- <td><a href="#string">string</a></td>+ <td>last_sync_time</td>+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td><td></td>- <td><p>DisplayName is the value of display name in 3rd-party idp user info. </p></td>+ <td><p> </p></td></tr><tr>- <td>email</td>- <td><a href="#string">string</a></td>+ <td>roles</td>+ <td><a href="#bytebase.store.InstanceRole">InstanceRole</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>sync_interval</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td><td></td>- <td><p>Email is the value of primary email in 3rd-party idp user info. </p></td>+ <td><p>How often the instance is synced. </p></td></tr><tr>- <td>phone</td>- <td><a href="#string">string</a></td>+ <td>maximum_connections</td>+ <td><a href="#int32">int32</a></td><td></td>- <td><p>Phone is the value of primary phone in 3rd-party idp user info. </p></td>+ <td><p>The maximum number of connections.+The default is 10 if the value is unset or zero. </p></td>+ </tr>++ <tr>+ <td>sync_databases</td>+ <td><a href="#string">string</a></td>+ <td>repeated</td>+ <td><p>Enable sync for following databases.+Default empty, means sync all schemas & databases. </p></td>+ </tr>++ <tr>+ <td>data_sources</td>+ <td><a href="#bytebase.store.DataSource">DataSource</a></td>+ <td>repeated</td>+ <td><p> </p></td></tr></tbody>@@ -7262,8 +7349,8 @@ Format: users/{userUID}. </p></td>- <h3 id="bytebase.store.LDAPIdentityProviderConfig">LDAPIdentityProviderConfig</h3>- <p>LDAPIdentityProviderConfig is the structure for LDAP identity provider config.</p>+ <h3 id="bytebase.store.InstanceRole">InstanceRole</h3>+ <p>InstanceRole is the API message for instance role.</p><table class="field-table">@@ -7273,73 +7360,33 @@ Format: users/{userUID}. </p></td><tbody><tr>- <td>host</td>+ <td>name</td><td><a href="#string">string</a></td><td></td>- <td><p>Host is the hostname or IP address of the LDAP server, e.g.-"ldap.example.com". </p></td>+ <td><p>The role name. </p></td></tr><tr>- <td>port</td>+ <td>connection_limit</td><td><a href="#int32">int32</a></td>- <td></td>- <td><p>Port is the port number of the LDAP server, e.g. 389. When not set, the-default port of the corresponding security protocol will be used, i.e. 389-for StartTLS and 636 for LDAPS. </p></td>- </tr>-- <tr>- <td>skip_tls_verify</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p>SkipTLSVerify controls whether to skip TLS certificate verification. </p></td>- </tr>-- <tr>- <td>bind_dn</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>BindDN is the DN of the user to bind as a service account to perform-search requests. </p></td>- </tr>-- <tr>- <td>bind_password</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>BindPassword is the password of the user to bind as a service account. </p></td>- </tr>-- <tr>- <td>base_dn</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>BaseDN is the base DN to search for users, e.g. "ou=users,dc=example,dc=com". </p></td>+ <td>optional</td>+ <td><p>The connection count limit for this role. </p></td></tr><tr>- <td>user_filter</td>+ <td>valid_until</td><td><a href="#string">string</a></td>- <td></td>- <td><p>UserFilter is the filter to search for users, e.g. "(uid=%s)". </p></td>+ <td>optional</td>+ <td><p>The expiration for the role's password. </p></td></tr><tr>- <td>security_protocol</td>+ <td>attribute</td><td><a href="#string">string</a></td>- <td></td>- <td><p>SecurityProtocol is the security protocol to be used for establishing-connections with the LDAP server. It should be either StartTLS or LDAPS, and-cannot be empty. </p></td>- </tr>-- <tr>- <td>field_mapping</td>- <td><a href="#bytebase.store.FieldMapping">FieldMapping</a></td>- <td></td>- <td><p>FieldMapping is the mapping of the user attributes returned by the LDAP-server. </p></td>+ <td>optional</td>+ <td><p>The role attribute.+For PostgreSQL, it containt super_user, no_inherit, create_role, create_db, can_login, replication and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html+For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html </p></td></tr></tbody>@@ -7349,8 +7396,8 @@ server. </p></td>- <h3 id="bytebase.store.OAuth2IdentityProviderConfig">OAuth2IdentityProviderConfig</h3>- <p>OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.</p>+ <h3 id="bytebase.store.KerberosConfig">KerberosConfig</h3>+ <p></p><table class="field-table">@@ -7360,64 +7407,50 @@ server. </p></td><tbody><tr>- <td>auth_url</td>+ <td>primary</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>token_url</td>+ <td>instance</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>user_info_url</td>+ <td>realm</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>client_id</td>- <td><a href="#string">string</a></td>+ <td>keytab</td>+ <td><a href="#bytes">bytes</a></td><td></td><td><p> </p></td></tr><tr>- <td>client_secret</td>+ <td>kdc_host</td><td><a href="#string">string</a></td><td></td><td><p> </p></td></tr><tr>- <td>scopes</td>+ <td>kdc_port</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- <tr>- <td>field_mapping</td>- <td><a href="#bytebase.store.FieldMapping">FieldMapping</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>skip_tls_verify</td>- <td><a href="#bool">bool</a></td><td></td><td><p> </p></td></tr><tr>- <td>auth_style</td>- <td><a href="#bytebase.store.OAuth2AuthStyle">OAuth2AuthStyle</a></td>+ <td>kdc_transport_protocol</td>+ <td><a href="#string">string</a></td><td></td><td><p> </p></td></tr>@@ -7429,8 +7462,8 @@ server. </p></td>- <h3 id="bytebase.store.OIDCIdentityProviderConfig">OIDCIdentityProviderConfig</h3>- <p>OIDCIdentityProviderConfig is the structure for OIDC identity provider config.</p>+ <h3 id="bytebase.store.SASLConfig">SASLConfig</h3>+ <p></p><table class="field-table">@@ -7440,43 +7473,8 @@ server. </p></td><tbody><tr>- <td>issuer</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>client_id</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>client_secret</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>field_mapping</td>- <td><a href="#bytebase.store.FieldMapping">FieldMapping</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>skip_tls_verify</td>- <td><a href="#bool">bool</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>auth_style</td>- <td><a href="#bytebase.store.OAuth2AuthStyle">OAuth2AuthStyle</a></td>+ <td>krb_config</td>+ <td><a href="#bytebase.store.KerberosConfig">KerberosConfig</a></td><td></td><td><p> </p></td></tr>@@ -7490,7 +7488,48 @@ server. </p></td>- <h3 id="bytebase.store.IdentityProviderType">IdentityProviderType</h3>+ <h3 id="bytebase.store.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>++ <tr>+ <td>AWS_RDS_IAM</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AZURE_IAM</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.DataSource.RedisType">DataSource.RedisType</h3><p></p><table class="enum-table"><thead>@@ -7499,25 +7538,25 @@ server. </p></td><tbody><tr>- <td>IDENTITY_PROVIDER_TYPE_UNSPECIFIED</td>+ <td>REDIS_TYPE_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>OAUTH2</td>+ <td>STANDALONE</td><td>1</td><td><p></p></td></tr><tr>- <td>OIDC</td>+ <td>SENTINEL</td><td>2</td><td><p></p></td></tr><tr>- <td>LDAP</td>+ <td>CLUSTER</td><td>3</td><td><p></p></td></tr>@@ -7525,7 +7564,7 @@ server. </p></td></tbody></table>- <h3 id="bytebase.store.OAuth2AuthStyle">OAuth2AuthStyle</h3>+ <h3 id="bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType">DataSourceExternalSecret.AppRoleAuthOption.SecretType</h3><p></p><table class="enum-table"><thead>@@ -7534,150 +7573,118 @@ server. </p></td><tbody><tr>- <td>OAUTH2_AUTH_STYLE_UNSPECIFIED</td>+ <td>SECRET_TYPE_UNSPECIFIED</td><td>0</td><td><p></p></td></tr><tr>- <td>IN_PARAMS</td>+ <td>PLAIN</td><td>1</td>- <td><p>IN_PARAMS sends the "client_id" and "client_secret" in the POST body-as application/x-www-form-urlencoded parameters.</p></td>+ <td><p></p></td></tr><tr>- <td>IN_HEADER</td>+ <td>ENVIRONMENT</td><td>2</td>- <td><p>IN_HEADER sends the client_id and client_password using HTTP Basic Authorization.-This is an optional style described in the OAuth2 RFC 6749 section 2.3.1.</p></td>+ <td><p></p></td></tr></tbody></table>------- <div class="file-heading">- <h2 id="store/instance.proto">store/instance.proto</h2><a href="#title">Top</a>- </div>- <p></p>--- <h3 id="bytebase.store.InstanceMetadata">InstanceMetadata</h3>- <p>InstanceMetadata is the metadata for instances.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>mysql_lower_case_table_names</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The lower_case_table_names config for MySQL instances.-It is used to determine whether the table names and database names are case sensitive. </p></td>- </tr>-- <tr>- <td>last_sync_time</td>- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>- <td></td>- <td><p> </p></td>- </tr>-- <tr>- <td>roles</td>- <td><a href="#bytebase.store.InstanceRole">InstanceRole</a></td>- <td>repeated</td>- <td><p> </p></td>- </tr>-- <tr>- <td>sync_interval</td>- <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>- <td></td>- <td><p>How often the instance is synced. </p></td>- </tr>-- <tr>- <td>maximum_connections</td>- <td><a href="#int32">int32</a></td>- <td></td>- <td><p>The maximum number of connections.-The default is 10 if the value is unset or zero. </p></td>- </tr>-- <tr>- <td>sync_databases</td>- <td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>Enable sync for following databases.-Default empty, means sync all schemas & databases. </p></td>- </tr>-- </tbody>- </table>----+ <h3 id="bytebase.store.DataSourceExternalSecret.AuthType">DataSourceExternalSecret.AuthType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AUTH_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>TOKEN</td>+ <td>1</td>+ <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/token</p></td>+ </tr>++ <tr>+ <td>VAULT_APP_ROLE</td>+ <td>2</td>+ <td><p>ref: https://developer.hashicorp.com/vault/docs/auth/approle</p></td>+ </tr>++ </tbody>+ </table>- <h3 id="bytebase.store.InstanceRole">InstanceRole</h3>- <p>InstanceRole is the API message for instance role.</p>--- <table class="field-table">- <thead>- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>- </thead>- <tbody>-- <tr>- <td>name</td>- <td><a href="#string">string</a></td>- <td></td>- <td><p>The role name. </p></td>- </tr>-- <tr>- <td>connection_limit</td>- <td><a href="#int32">int32</a></td>- <td>optional</td>- <td><p>The connection count limit for this role. </p></td>- </tr>-- <tr>- <td>valid_until</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The expiration for the role's password. </p></td>- </tr>-- <tr>- <td>attribute</td>- <td><a href="#string">string</a></td>- <td>optional</td>- <td><p>The role attribute.-For PostgreSQL, it containt super_user, no_inherit, create_role, create_db, can_login, replication and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html-For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html </p></td>- </tr>-- </tbody>- </table>----+ <h3 id="bytebase.store.DataSourceExternalSecret.SecretType">DataSourceExternalSecret.SecretType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>SAECRET_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>VAULT_KV_V2</td>+ <td>1</td>+ <td><p>ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2</p></td>+ </tr>++ <tr>+ <td>AWS_SECRETS_MANAGER</td>+ <td>2</td>+ <td><p>ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html</p></td>+ </tr>++ <tr>+ <td>GCP_SECRET_MANAGER</td>+ <td>3</td>+ <td><p>ref: https://cloud.google.com/secret-manager/docs</p></td>+ </tr>++ </tbody>+ </table>-+ <h3 id="bytebase.store.DataSourceType">DataSourceType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>DATA_SOURCE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ADMIN</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>READ_ONLY</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>diff --git a/proto/generated-go/store/data_source.pb.go b/proto/generated-go/store/data_source.pb.goindex d739732581..8af032d514 100644--- a/proto/generated-go/store/data_source.pb.go+++ b/proto/generated-go/store/data_source.pb.go@@ -10,7 +10,6 @@ import (protoreflect "google.golang.org/protobuf/reflect/protoreflect"protoimpl "google.golang.org/protobuf/runtime/protoimpl"reflect "reflect"- sync "sync"unsafe "unsafe")@@ -21,1438 +20,23 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))-type DataSourceType int32--const (- DataSourceType_DATA_SOURCE_UNSPECIFIED DataSourceType = 0- DataSourceType_ADMIN DataSourceType = 1- DataSourceType_READ_ONLY DataSourceType = 2-)--// Enum value maps for DataSourceType.-var (- DataSourceType_name = map[int32]string{- 0: "DATA_SOURCE_UNSPECIFIED",- 1: "ADMIN",- 2: "READ_ONLY",- }- DataSourceType_value = map[string]int32{- "DATA_SOURCE_UNSPECIFIED": 0,- "ADMIN": 1,- "READ_ONLY": 2,- }-)--func (x DataSourceType) Enum() *DataSourceType {- p := new(DataSourceType)- *p = x- return p-}--func (x DataSourceType) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (DataSourceType) Descriptor() protoreflect.EnumDescriptor {- return file_store_data_source_proto_enumTypes[0].Descriptor()-}--func (DataSourceType) Type() protoreflect.EnumType {- return &file_store_data_source_proto_enumTypes[0]-}--func (x DataSourceType) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use DataSourceType.Descriptor instead.-func (DataSourceType) EnumDescriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{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- DataSourceOptions_AWS_RDS_IAM DataSourceOptions_AuthenticationType = 3- DataSourceOptions_AZURE_IAM DataSourceOptions_AuthenticationType = 4-)--// Enum value maps for DataSourceOptions_AuthenticationType.-var (- DataSourceOptions_AuthenticationType_name = map[int32]string{- 0: "AUTHENTICATION_UNSPECIFIED",- 1: "PASSWORD",- 2: "GOOGLE_CLOUD_SQL_IAM",- 3: "AWS_RDS_IAM",- 4: "AZURE_IAM",- }- DataSourceOptions_AuthenticationType_value = map[string]int32{- "AUTHENTICATION_UNSPECIFIED": 0,- "PASSWORD": 1,- "GOOGLE_CLOUD_SQL_IAM": 2,- "AWS_RDS_IAM": 3,- "AZURE_IAM": 4,- }-)--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[1].Descriptor()-}--func (DataSourceOptions_AuthenticationType) Type() protoreflect.EnumType {- return &file_store_data_source_proto_enumTypes[1]-}--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{0, 0}-}--type DataSourceOptions_RedisType int32--const (- DataSourceOptions_REDIS_TYPE_UNSPECIFIED DataSourceOptions_RedisType = 0- DataSourceOptions_STANDALONE DataSourceOptions_RedisType = 1- DataSourceOptions_SENTINEL DataSourceOptions_RedisType = 2- DataSourceOptions_CLUSTER DataSourceOptions_RedisType = 3-)--// Enum value maps for DataSourceOptions_RedisType.-var (- DataSourceOptions_RedisType_name = map[int32]string{- 0: "REDIS_TYPE_UNSPECIFIED",- 1: "STANDALONE",- 2: "SENTINEL",- 3: "CLUSTER",- }- DataSourceOptions_RedisType_value = map[string]int32{- "REDIS_TYPE_UNSPECIFIED": 0,- "STANDALONE": 1,- "SENTINEL": 2,- "CLUSTER": 3,- }-)--func (x DataSourceOptions_RedisType) Enum() *DataSourceOptions_RedisType {- p := new(DataSourceOptions_RedisType)- *p = x- return p-}--func (x DataSourceOptions_RedisType) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (DataSourceOptions_RedisType) Descriptor() protoreflect.EnumDescriptor {- return file_store_data_source_proto_enumTypes[2].Descriptor()-}--func (DataSourceOptions_RedisType) Type() protoreflect.EnumType {- return &file_store_data_source_proto_enumTypes[2]-}--func (x DataSourceOptions_RedisType) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use DataSourceOptions_RedisType.Descriptor instead.-func (DataSourceOptions_RedisType) EnumDescriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{0, 1}-}--type DataSourceExternalSecret_SecretType int32--const (- DataSourceExternalSecret_SAECRET_TYPE_UNSPECIFIED DataSourceExternalSecret_SecretType = 0- // ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2- DataSourceExternalSecret_VAULT_KV_V2 DataSourceExternalSecret_SecretType = 1- // ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html- DataSourceExternalSecret_AWS_SECRETS_MANAGER DataSourceExternalSecret_SecretType = 2- // ref: https://cloud.google.com/secret-manager/docs- DataSourceExternalSecret_GCP_SECRET_MANAGER DataSourceExternalSecret_SecretType = 3-)--// Enum value maps for DataSourceExternalSecret_SecretType.-var (- DataSourceExternalSecret_SecretType_name = map[int32]string{- 0: "SAECRET_TYPE_UNSPECIFIED",- 1: "VAULT_KV_V2",- 2: "AWS_SECRETS_MANAGER",- 3: "GCP_SECRET_MANAGER",- }- DataSourceExternalSecret_SecretType_value = map[string]int32{- "SAECRET_TYPE_UNSPECIFIED": 0,- "VAULT_KV_V2": 1,- "AWS_SECRETS_MANAGER": 2,- "GCP_SECRET_MANAGER": 3,- }-)--func (x DataSourceExternalSecret_SecretType) Enum() *DataSourceExternalSecret_SecretType {- p := new(DataSourceExternalSecret_SecretType)- *p = x- return p-}--func (x DataSourceExternalSecret_SecretType) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (DataSourceExternalSecret_SecretType) Descriptor() protoreflect.EnumDescriptor {- return file_store_data_source_proto_enumTypes[3].Descriptor()-}--func (DataSourceExternalSecret_SecretType) Type() protoreflect.EnumType {- return &file_store_data_source_proto_enumTypes[3]-}--func (x DataSourceExternalSecret_SecretType) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use DataSourceExternalSecret_SecretType.Descriptor instead.-func (DataSourceExternalSecret_SecretType) EnumDescriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{3, 0}-}--type DataSourceExternalSecret_AuthType int32--const (- DataSourceExternalSecret_AUTH_TYPE_UNSPECIFIED DataSourceExternalSecret_AuthType = 0- // ref: https://developer.hashicorp.com/vault/docs/auth/token- DataSourceExternalSecret_TOKEN DataSourceExternalSecret_AuthType = 1- // ref: https://developer.hashicorp.com/vault/docs/auth/approle- DataSourceExternalSecret_VAULT_APP_ROLE DataSourceExternalSecret_AuthType = 2-)--// Enum value maps for DataSourceExternalSecret_AuthType.-var (- DataSourceExternalSecret_AuthType_name = map[int32]string{- 0: "AUTH_TYPE_UNSPECIFIED",- 1: "TOKEN",- 2: "VAULT_APP_ROLE",- }- DataSourceExternalSecret_AuthType_value = map[string]int32{- "AUTH_TYPE_UNSPECIFIED": 0,- "TOKEN": 1,- "VAULT_APP_ROLE": 2,- }-)--func (x DataSourceExternalSecret_AuthType) Enum() *DataSourceExternalSecret_AuthType {- p := new(DataSourceExternalSecret_AuthType)- *p = x- return p-}--func (x DataSourceExternalSecret_AuthType) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (DataSourceExternalSecret_AuthType) Descriptor() protoreflect.EnumDescriptor {- return file_store_data_source_proto_enumTypes[4].Descriptor()-}--func (DataSourceExternalSecret_AuthType) Type() protoreflect.EnumType {- return &file_store_data_source_proto_enumTypes[4]-}--func (x DataSourceExternalSecret_AuthType) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use DataSourceExternalSecret_AuthType.Descriptor instead.-func (DataSourceExternalSecret_AuthType) EnumDescriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{3, 1}-}--type DataSourceExternalSecret_AppRoleAuthOption_SecretType int32--const (- DataSourceExternalSecret_AppRoleAuthOption_SECRET_TYPE_UNSPECIFIED DataSourceExternalSecret_AppRoleAuthOption_SecretType = 0- DataSourceExternalSecret_AppRoleAuthOption_PLAIN DataSourceExternalSecret_AppRoleAuthOption_SecretType = 1- DataSourceExternalSecret_AppRoleAuthOption_ENVIRONMENT DataSourceExternalSecret_AppRoleAuthOption_SecretType = 2-)--// Enum value maps for DataSourceExternalSecret_AppRoleAuthOption_SecretType.-var (- DataSourceExternalSecret_AppRoleAuthOption_SecretType_name = map[int32]string{- 0: "SECRET_TYPE_UNSPECIFIED",- 1: "PLAIN",- 2: "ENVIRONMENT",- }- DataSourceExternalSecret_AppRoleAuthOption_SecretType_value = map[string]int32{- "SECRET_TYPE_UNSPECIFIED": 0,- "PLAIN": 1,- "ENVIRONMENT": 2,- }-)--func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) Enum() *DataSourceExternalSecret_AppRoleAuthOption_SecretType {- p := new(DataSourceExternalSecret_AppRoleAuthOption_SecretType)- *p = x- return p-}--func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) String() string {- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))-}--func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) Descriptor() protoreflect.EnumDescriptor {- return file_store_data_source_proto_enumTypes[5].Descriptor()-}--func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) Type() protoreflect.EnumType {- return &file_store_data_source_proto_enumTypes[5]-}--func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) Number() protoreflect.EnumNumber {- return protoreflect.EnumNumber(x)-}--// Deprecated: Use DataSourceExternalSecret_AppRoleAuthOption_SecretType.Descriptor instead.-func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) EnumDescriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{3, 0, 0}-}--type DataSourceOptions struct {- state protoimpl.MessageState `protogen:"open.v1"`- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`- Type DataSourceType `protobuf:"varint,2,opt,name=type,proto3,enum=bytebase.store.DataSourceType" json:"type,omitempty"`- Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`- Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`- Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"`- ObfuscatedPassword string `protobuf:"bytes,6,opt,name=obfuscated_password,json=obfuscatedPassword,proto3" json:"obfuscated_password,omitempty"`- Database string `protobuf:"bytes,7,opt,name=database,proto3" json:"database,omitempty"`- ObfuscatedSslKey string `protobuf:"bytes,8,opt,name=obfuscated_ssl_key,json=obfuscatedSslKey,proto3" json:"obfuscated_ssl_key,omitempty"`- ObfuscatedSslCert string `protobuf:"bytes,9,opt,name=obfuscated_ssl_cert,json=obfuscatedSslCert,proto3" json:"obfuscated_ssl_cert,omitempty"`- ObfuscatedSslCa string `protobuf:"bytes,10,opt,name=obfuscated_ssl_ca,json=obfuscatedSslCa,proto3" json:"obfuscated_ssl_ca,omitempty"`- // srv is a boolean flag that indicates whether the host is a DNS SRV record.- Srv bool `protobuf:"varint,11,opt,name=srv,proto3" json:"srv,omitempty"`- // authentication_database is the database name to authenticate against, which stores the user credentials.- AuthenticationDatabase string `protobuf:"bytes,12,opt,name=authentication_database,json=authenticationDatabase,proto3" json:"authentication_database,omitempty"`- // sid and service_name are used for Oracle.- Sid string `protobuf:"bytes,13,opt,name=sid,proto3" json:"sid,omitempty"`- ServiceName string `protobuf:"bytes,14,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`- // SSH related- // The hostname of the SSH server agent.- SshHost string `protobuf:"bytes,15,opt,name=ssh_host,json=sshHost,proto3" json:"ssh_host,omitempty"`- // The port of the SSH server agent. It's 22 typically.- SshPort string `protobuf:"bytes,16,opt,name=ssh_port,json=sshPort,proto3" json:"ssh_port,omitempty"`- // The user to login the server.- SshUser string `protobuf:"bytes,17,opt,name=ssh_user,json=sshUser,proto3" json:"ssh_user,omitempty"`- // The password to login the server. If it's empty string, no password is required.- SshObfuscatedPassword string `protobuf:"bytes,18,opt,name=ssh_obfuscated_password,json=sshObfuscatedPassword,proto3" json:"ssh_obfuscated_password,omitempty"`- // 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").- SshObfuscatedPrivateKey string `protobuf:"bytes,19,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,20,opt,name=authentication_private_key_obfuscated,json=authenticationPrivateKeyObfuscated,proto3" json:"authentication_private_key_obfuscated,omitempty"`- ExternalSecret *DataSourceExternalSecret `protobuf:"bytes,21,opt,name=external_secret,json=externalSecret,proto3" json:"external_secret,omitempty"`- AuthenticationType DataSourceOptions_AuthenticationType `protobuf:"varint,22,opt,name=authentication_type,json=authenticationType,proto3,enum=bytebase.store.DataSourceOptions_AuthenticationType" json:"authentication_type,omitempty"`- // Types that are valid to be assigned to IamExtension:- //- // *DataSourceOptions_ClientSecretCredential_- IamExtension isDataSourceOptions_IamExtension `protobuf_oneof:"iam_extension"`- SaslConfig *SASLConfig `protobuf:"bytes,24,opt,name=sasl_config,json=saslConfig,proto3" json:"sasl_config,omitempty"`- // additional_addresses is used for MongoDB replica set.- AdditionalAddresses []*DataSourceOptions_Address `protobuf:"bytes,25,rep,name=additional_addresses,json=additionalAddresses,proto3" json:"additional_addresses,omitempty"`- // replica_set is used for MongoDB replica set.- ReplicaSet string `protobuf:"bytes,26,opt,name=replica_set,json=replicaSet,proto3" json:"replica_set,omitempty"`- // direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.- DirectConnection bool `protobuf:"varint,27,opt,name=direct_connection,json=directConnection,proto3" json:"direct_connection,omitempty"`- // region is the location of where the DB is, works for AWS RDS. For example, us-east-1.- Region string `protobuf:"bytes,28,opt,name=region,proto3" json:"region,omitempty"`- // warehouse_id is used by Databricks.- WarehouseId string `protobuf:"bytes,29,opt,name=warehouse_id,json=warehouseId,proto3" json:"warehouse_id,omitempty"`- // master_name is the master name used by connecting redis-master via redis sentinel.- MasterName string `protobuf:"bytes,30,opt,name=master_name,json=masterName,proto3" json:"master_name,omitempty"`- // master_username and master_obfuscated_password are master credentials used by redis sentinel mode.- MasterUsername string `protobuf:"bytes,31,opt,name=master_username,json=masterUsername,proto3" json:"master_username,omitempty"`- MasterObfuscatedPassword string `protobuf:"bytes,32,opt,name=master_obfuscated_password,json=masterObfuscatedPassword,proto3" json:"master_obfuscated_password,omitempty"`- RedisType DataSourceOptions_RedisType `protobuf:"varint,33,opt,name=redis_type,json=redisType,proto3,enum=bytebase.store.DataSourceOptions_RedisType" json:"redis_type,omitempty"`- // Use SSL to connect to the data source. By default, we use system default SSL configuration.- UseSsl bool `protobuf:"varint,34,opt,name=use_ssl,json=useSsl,proto3" json:"use_ssl,omitempty"`- // Cluster is the cluster name for the data source. Used by CockroachDB.- Cluster string `protobuf:"bytes,35,opt,name=cluster,proto3" json:"cluster,omitempty"`- // Extra connection parameters for the database connection.- // For PostgreSQL HA, this can be used to set target_session_attrs=read-write- ExtraConnectionParameters map[string]string `protobuf:"bytes,36,rep,name=extra_connection_parameters,json=extraConnectionParameters,proto3" json:"extra_connection_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *DataSourceOptions) Reset() {- *x = DataSourceOptions{}- mi := &file_store_data_source_proto_msgTypes[0]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *DataSourceOptions) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*DataSourceOptions) ProtoMessage() {}--func (x *DataSourceOptions) ProtoReflect() protoreflect.Message {- mi := &file_store_data_source_proto_msgTypes[0]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use DataSourceOptions.ProtoReflect.Descriptor instead.-func (*DataSourceOptions) Descriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{0}-}--func (x *DataSourceOptions) GetId() string {- if x != nil {- return x.Id- }- return ""-}--func (x *DataSourceOptions) GetType() DataSourceType {- if x != nil {- return x.Type- }- return DataSourceType_DATA_SOURCE_UNSPECIFIED-}--func (x *DataSourceOptions) GetHost() string {- if x != nil {- return x.Host- }- return ""-}--func (x *DataSourceOptions) GetPort() string {- if x != nil {- return x.Port- }- return ""-}--func (x *DataSourceOptions) GetUsername() string {- if x != nil {- return x.Username- }- return ""-}--func (x *DataSourceOptions) GetObfuscatedPassword() string {- if x != nil {- return x.ObfuscatedPassword- }- return ""-}--func (x *DataSourceOptions) GetDatabase() string {- if x != nil {- return x.Database- }- return ""-}--func (x *DataSourceOptions) GetObfuscatedSslKey() string {- if x != nil {- return x.ObfuscatedSslKey- }- return ""-}--func (x *DataSourceOptions) GetObfuscatedSslCert() string {- if x != nil {- return x.ObfuscatedSslCert- }- return ""-}--func (x *DataSourceOptions) GetObfuscatedSslCa() string {- if x != nil {- return x.ObfuscatedSslCa- }- return ""-}--func (x *DataSourceOptions) GetSrv() bool {- if x != nil {- return x.Srv- }- return false-}--func (x *DataSourceOptions) GetAuthenticationDatabase() string {- if x != nil {- return x.AuthenticationDatabase- }- return ""-}--func (x *DataSourceOptions) GetSid() string {- if x != nil {- return x.Sid- }- return ""-}--func (x *DataSourceOptions) GetServiceName() string {- if x != nil {- return x.ServiceName- }- return ""-}--func (x *DataSourceOptions) GetSshHost() string {- if x != nil {- return x.SshHost- }- return ""-}--func (x *DataSourceOptions) GetSshPort() string {- if x != nil {- return x.SshPort- }- return ""-}--func (x *DataSourceOptions) GetSshUser() string {- if x != nil {- return x.SshUser- }- return ""-}--func (x *DataSourceOptions) GetSshObfuscatedPassword() string {- if x != nil {- return x.SshObfuscatedPassword- }- return ""-}--func (x *DataSourceOptions) GetSshObfuscatedPrivateKey() string {- if x != nil {- return x.SshObfuscatedPrivateKey- }- return ""-}--func (x *DataSourceOptions) GetAuthenticationPrivateKeyObfuscated() string {- if x != nil {- return x.AuthenticationPrivateKeyObfuscated- }- return ""-}--func (x *DataSourceOptions) GetExternalSecret() *DataSourceExternalSecret {- if x != nil {- return x.ExternalSecret- }- return nil-}--func (x *DataSourceOptions) GetAuthenticationType() DataSourceOptions_AuthenticationType {- if x != nil {- return x.AuthenticationType- }- return DataSourceOptions_AUTHENTICATION_UNSPECIFIED-}--func (x *DataSourceOptions) GetIamExtension() isDataSourceOptions_IamExtension {- if x != nil {- return x.IamExtension- }- return nil-}--func (x *DataSourceOptions) GetClientSecretCredential() *DataSourceOptions_ClientSecretCredential {- if x != nil {- if x, ok := x.IamExtension.(*DataSourceOptions_ClientSecretCredential_); ok {- return x.ClientSecretCredential- }- }- return nil-}--func (x *DataSourceOptions) GetSaslConfig() *SASLConfig {- if x != nil {- return x.SaslConfig- }- return nil-}--func (x *DataSourceOptions) GetAdditionalAddresses() []*DataSourceOptions_Address {- if x != nil {- return x.AdditionalAddresses- }- return nil-}--func (x *DataSourceOptions) GetReplicaSet() string {- if x != nil {- return x.ReplicaSet- }- return ""-}--func (x *DataSourceOptions) GetDirectConnection() bool {- if x != nil {- return x.DirectConnection- }- return false-}--func (x *DataSourceOptions) GetRegion() string {- if x != nil {- return x.Region- }- return ""-}--func (x *DataSourceOptions) GetWarehouseId() string {- if x != nil {- return x.WarehouseId- }- return ""-}--func (x *DataSourceOptions) GetMasterName() string {- if x != nil {- return x.MasterName- }- return ""-}--func (x *DataSourceOptions) GetMasterUsername() string {- if x != nil {- return x.MasterUsername- }- return ""-}--func (x *DataSourceOptions) GetMasterObfuscatedPassword() string {- if x != nil {- return x.MasterObfuscatedPassword- }- return ""-}--func (x *DataSourceOptions) GetRedisType() DataSourceOptions_RedisType {- if x != nil {- return x.RedisType- }- return DataSourceOptions_REDIS_TYPE_UNSPECIFIED-}--func (x *DataSourceOptions) GetUseSsl() bool {- if x != nil {- return x.UseSsl- }- return false-}--func (x *DataSourceOptions) GetCluster() string {- if x != nil {- return x.Cluster- }- return ""-}--func (x *DataSourceOptions) GetExtraConnectionParameters() map[string]string {- if x != nil {- return x.ExtraConnectionParameters- }- return nil-}--type isDataSourceOptions_IamExtension interface {- isDataSourceOptions_IamExtension()-}--type DataSourceOptions_ClientSecretCredential_ struct {- ClientSecretCredential *DataSourceOptions_ClientSecretCredential `protobuf:"bytes,23,opt,name=client_secret_credential,json=clientSecretCredential,proto3,oneof"`-}--func (*DataSourceOptions_ClientSecretCredential_) isDataSourceOptions_IamExtension() {}--type SASLConfig struct {- state protoimpl.MessageState `protogen:"open.v1"`- // Types that are valid to be assigned to Mechanism:- //- // *SASLConfig_KrbConfig- Mechanism isSASLConfig_Mechanism `protobuf_oneof:"mechanism"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *SASLConfig) Reset() {- *x = SASLConfig{}- mi := &file_store_data_source_proto_msgTypes[1]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *SASLConfig) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*SASLConfig) ProtoMessage() {}--func (x *SASLConfig) ProtoReflect() protoreflect.Message {- mi := &file_store_data_source_proto_msgTypes[1]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use SASLConfig.ProtoReflect.Descriptor instead.-func (*SASLConfig) Descriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{1}-}--func (x *SASLConfig) GetMechanism() isSASLConfig_Mechanism {- if x != nil {- return x.Mechanism- }- return nil-}--func (x *SASLConfig) GetKrbConfig() *KerberosConfig {- if x != nil {- if x, ok := x.Mechanism.(*SASLConfig_KrbConfig); ok {- return x.KrbConfig- }- }- return nil-}--type isSASLConfig_Mechanism interface {- isSASLConfig_Mechanism()-}--type SASLConfig_KrbConfig struct {- KrbConfig *KerberosConfig `protobuf:"bytes,1,opt,name=krb_config,json=krbConfig,proto3,oneof"`-}--func (*SASLConfig_KrbConfig) isSASLConfig_Mechanism() {}--type KerberosConfig struct {- state protoimpl.MessageState `protogen:"open.v1"`- Primary string `protobuf:"bytes,1,opt,name=primary,proto3" json:"primary,omitempty"`- Instance string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"`- Realm string `protobuf:"bytes,3,opt,name=realm,proto3" json:"realm,omitempty"`- Keytab []byte `protobuf:"bytes,4,opt,name=keytab,proto3" json:"keytab,omitempty"`- KdcHost string `protobuf:"bytes,5,opt,name=kdc_host,json=kdcHost,proto3" json:"kdc_host,omitempty"`- KdcPort string `protobuf:"bytes,6,opt,name=kdc_port,json=kdcPort,proto3" json:"kdc_port,omitempty"`- KdcTransportProtocol string `protobuf:"bytes,7,opt,name=kdc_transport_protocol,json=kdcTransportProtocol,proto3" json:"kdc_transport_protocol,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *KerberosConfig) Reset() {- *x = KerberosConfig{}- mi := &file_store_data_source_proto_msgTypes[2]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *KerberosConfig) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*KerberosConfig) ProtoMessage() {}--func (x *KerberosConfig) ProtoReflect() protoreflect.Message {- mi := &file_store_data_source_proto_msgTypes[2]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use KerberosConfig.ProtoReflect.Descriptor instead.-func (*KerberosConfig) Descriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{2}-}--func (x *KerberosConfig) GetPrimary() string {- if x != nil {- return x.Primary- }- return ""-}--func (x *KerberosConfig) GetInstance() string {- if x != nil {- return x.Instance- }- return ""-}--func (x *KerberosConfig) GetRealm() string {- if x != nil {- return x.Realm- }- return ""-}--func (x *KerberosConfig) GetKeytab() []byte {- if x != nil {- return x.Keytab- }- return nil-}--func (x *KerberosConfig) GetKdcHost() string {- if x != nil {- return x.KdcHost- }- return ""-}--func (x *KerberosConfig) GetKdcPort() string {- if x != nil {- return x.KdcPort- }- return ""-}--func (x *KerberosConfig) GetKdcTransportProtocol() string {- if x != nil {- return x.KdcTransportProtocol- }- return ""-}--type DataSourceExternalSecret struct {- state protoimpl.MessageState `protogen:"open.v1"`- SecretType DataSourceExternalSecret_SecretType `protobuf:"varint,1,opt,name=secret_type,json=secretType,proto3,enum=bytebase.store.DataSourceExternalSecret_SecretType" json:"secret_type,omitempty"`- Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`- AuthType DataSourceExternalSecret_AuthType `protobuf:"varint,3,opt,name=auth_type,json=authType,proto3,enum=bytebase.store.DataSourceExternalSecret_AuthType" json:"auth_type,omitempty"`- // Types that are valid to be assigned to AuthOption:- //- // *DataSourceExternalSecret_AppRole- // *DataSourceExternalSecret_Token- AuthOption isDataSourceExternalSecret_AuthOption `protobuf_oneof:"auth_option"`- // engine name is the name for secret engine.- EngineName string `protobuf:"bytes,6,opt,name=engine_name,json=engineName,proto3" json:"engine_name,omitempty"`- // the secret name in the engine to store the password.- SecretName string `protobuf:"bytes,7,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"`- // the key name for the password.- PasswordKeyName string `protobuf:"bytes,8,opt,name=password_key_name,json=passwordKeyName,proto3" json:"password_key_name,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *DataSourceExternalSecret) Reset() {- *x = DataSourceExternalSecret{}- mi := &file_store_data_source_proto_msgTypes[3]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *DataSourceExternalSecret) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*DataSourceExternalSecret) ProtoMessage() {}--func (x *DataSourceExternalSecret) ProtoReflect() protoreflect.Message {- mi := &file_store_data_source_proto_msgTypes[3]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use DataSourceExternalSecret.ProtoReflect.Descriptor instead.-func (*DataSourceExternalSecret) Descriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{3}-}--func (x *DataSourceExternalSecret) GetSecretType() DataSourceExternalSecret_SecretType {- if x != nil {- return x.SecretType- }- return DataSourceExternalSecret_SAECRET_TYPE_UNSPECIFIED-}--func (x *DataSourceExternalSecret) GetUrl() string {- if x != nil {- return x.Url- }- return ""-}--func (x *DataSourceExternalSecret) GetAuthType() DataSourceExternalSecret_AuthType {- if x != nil {- return x.AuthType- }- return DataSourceExternalSecret_AUTH_TYPE_UNSPECIFIED-}--func (x *DataSourceExternalSecret) GetAuthOption() isDataSourceExternalSecret_AuthOption {- if x != nil {- return x.AuthOption- }- return nil-}--func (x *DataSourceExternalSecret) GetAppRole() *DataSourceExternalSecret_AppRoleAuthOption {- if x != nil {- if x, ok := x.AuthOption.(*DataSourceExternalSecret_AppRole); ok {- return x.AppRole- }- }- return nil-}--func (x *DataSourceExternalSecret) GetToken() string {- if x != nil {- if x, ok := x.AuthOption.(*DataSourceExternalSecret_Token); ok {- return x.Token- }- }- return ""-}--func (x *DataSourceExternalSecret) GetEngineName() string {- if x != nil {- return x.EngineName- }- return ""-}--func (x *DataSourceExternalSecret) GetSecretName() string {- if x != nil {- return x.SecretName- }- return ""-}--func (x *DataSourceExternalSecret) GetPasswordKeyName() string {- if x != nil {- return x.PasswordKeyName- }- return ""-}--type isDataSourceExternalSecret_AuthOption interface {- isDataSourceExternalSecret_AuthOption()-}--type DataSourceExternalSecret_AppRole struct {- AppRole *DataSourceExternalSecret_AppRoleAuthOption `protobuf:"bytes,4,opt,name=app_role,json=appRole,proto3,oneof"`-}--type DataSourceExternalSecret_Token struct {- Token string `protobuf:"bytes,5,opt,name=token,proto3,oneof"`-}--func (*DataSourceExternalSecret_AppRole) isDataSourceExternalSecret_AuthOption() {}--func (*DataSourceExternalSecret_Token) isDataSourceExternalSecret_AuthOption() {}--type DataSourceOptions_ClientSecretCredential struct {- state protoimpl.MessageState `protogen:"open.v1"`- TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`- ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`- ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *DataSourceOptions_ClientSecretCredential) Reset() {- *x = DataSourceOptions_ClientSecretCredential{}- mi := &file_store_data_source_proto_msgTypes[4]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *DataSourceOptions_ClientSecretCredential) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*DataSourceOptions_ClientSecretCredential) ProtoMessage() {}--func (x *DataSourceOptions_ClientSecretCredential) ProtoReflect() protoreflect.Message {- mi := &file_store_data_source_proto_msgTypes[4]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use DataSourceOptions_ClientSecretCredential.ProtoReflect.Descriptor instead.-func (*DataSourceOptions_ClientSecretCredential) Descriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{0, 0}-}--func (x *DataSourceOptions_ClientSecretCredential) GetTenantId() string {- if x != nil {- return x.TenantId- }- return ""-}--func (x *DataSourceOptions_ClientSecretCredential) GetClientId() string {- if x != nil {- return x.ClientId- }- return ""-}--func (x *DataSourceOptions_ClientSecretCredential) GetClientSecret() string {- if x != nil {- return x.ClientSecret- }- return ""-}--type DataSourceOptions_Address struct {- state protoimpl.MessageState `protogen:"open.v1"`- Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`- Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *DataSourceOptions_Address) Reset() {- *x = DataSourceOptions_Address{}- mi := &file_store_data_source_proto_msgTypes[5]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *DataSourceOptions_Address) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*DataSourceOptions_Address) ProtoMessage() {}--func (x *DataSourceOptions_Address) ProtoReflect() protoreflect.Message {- mi := &file_store_data_source_proto_msgTypes[5]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use DataSourceOptions_Address.ProtoReflect.Descriptor instead.-func (*DataSourceOptions_Address) Descriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{0, 1}-}--func (x *DataSourceOptions_Address) GetHost() string {- if x != nil {- return x.Host- }- return ""-}--func (x *DataSourceOptions_Address) GetPort() string {- if x != nil {- return x.Port- }- return ""-}--type DataSourceExternalSecret_AppRoleAuthOption struct {- state protoimpl.MessageState `protogen:"open.v1"`- RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`- // the secret id for the role without ttl.- SecretId string `protobuf:"bytes,2,opt,name=secret_id,json=secretId,proto3" json:"secret_id,omitempty"`- Type DataSourceExternalSecret_AppRoleAuthOption_SecretType `protobuf:"varint,3,opt,name=type,proto3,enum=bytebase.store.DataSourceExternalSecret_AppRoleAuthOption_SecretType" json:"type,omitempty"`- // The path where the approle auth method is mounted.- MountPath string `protobuf:"bytes,4,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache-}--func (x *DataSourceExternalSecret_AppRoleAuthOption) Reset() {- *x = DataSourceExternalSecret_AppRoleAuthOption{}- mi := &file_store_data_source_proto_msgTypes[7]- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- ms.StoreMessageInfo(mi)-}--func (x *DataSourceExternalSecret_AppRoleAuthOption) String() string {- return protoimpl.X.MessageStringOf(x)-}--func (*DataSourceExternalSecret_AppRoleAuthOption) ProtoMessage() {}--func (x *DataSourceExternalSecret_AppRoleAuthOption) ProtoReflect() protoreflect.Message {- mi := &file_store_data_source_proto_msgTypes[7]- if x != nil {- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))- if ms.LoadMessageInfo() == nil {- ms.StoreMessageInfo(mi)- }- return ms- }- return mi.MessageOf(x)-}--// Deprecated: Use DataSourceExternalSecret_AppRoleAuthOption.ProtoReflect.Descriptor instead.-func (*DataSourceExternalSecret_AppRoleAuthOption) Descriptor() ([]byte, []int) {- return file_store_data_source_proto_rawDescGZIP(), []int{3, 0}-}--func (x *DataSourceExternalSecret_AppRoleAuthOption) GetRoleId() string {- if x != nil {- return x.RoleId- }- return ""-}--func (x *DataSourceExternalSecret_AppRoleAuthOption) GetSecretId() string {- if x != nil {- return x.SecretId- }- return ""-}--func (x *DataSourceExternalSecret_AppRoleAuthOption) GetType() DataSourceExternalSecret_AppRoleAuthOption_SecretType {- if x != nil {- return x.Type- }- return DataSourceExternalSecret_AppRoleAuthOption_SECRET_TYPE_UNSPECIFIED-}--func (x *DataSourceExternalSecret_AppRoleAuthOption) GetMountPath() string {- if x != nil {- return x.MountPath- }- return ""-}-var File_store_data_source_proto protoreflect.FileDescriptorvar file_store_data_source_proto_rawDesc = string([]byte{0x0a, 0x17, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75,0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xc6, 0x11, 0x0a, 0x11, 0x44, 0x61,- 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,- 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,- 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 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, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74,- 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18,- 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75,- 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75,- 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x6f, 0x62, 0x66, 0x75, 0x73,- 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64,- 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74,- 0x65, 0x64, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x10, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x73, 0x6c, 0x4b,- 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64,- 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x11, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x73, 0x6c, 0x43, 0x65,- 0x72, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64,- 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x63, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f,- 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x73, 0x6c, 0x43, 0x61, 0x12, 0x10,- 0x0a, 0x03, 0x73, 0x72, 0x76, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x73, 0x72, 0x76,- 0x12, 0x37, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69,- 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x16, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,- 0x6e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64,- 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73,- 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19,- 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x07, 0x73, 0x73, 0x68, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x73, 0x68,- 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x73, 0x68,- 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72,- 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, 0x12,- 0x36, 0x0a, 0x17, 0x73, 0x73, 0x68, 0x5f, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65,- 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x15, 0x73, 0x73, 0x68, 0x4f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50,- 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x73, 0x73, 0x68, 0x5f, 0x6f,- 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74,- 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x73, 0x73, 0x68,- 0x4f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74,- 0x65, 0x4b, 0x65, 0x79, 0x12, 0x51, 0x0a, 0x25, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69,- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b,- 0x65, 0x79, 0x5f, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x14, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x22, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,- 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x62, 0x66,- 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72,- 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x15, 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, 0x12, 0x65, 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, 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, 0x12, 0x74, 0x0a, 0x18, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72,- 0x65, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x17, 0x20,- 0x01, 0x28, 0x0b, 0x32, 0x38, 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, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63,- 0x72, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x48, 0x00, 0x52,- 0x16, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x72, 0x65,- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x61, 0x73, 0x6c, 0x5f,- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x41,- 0x53, 0x4c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x73, 0x61, 0x73, 0x6c, 0x43, 0x6f,- 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5c, 0x0a, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,- 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x19, 0x20, 0x03,- 0x28, 0x0b, 0x32, 0x29, 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, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x13, 0x61,- 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,- 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x73, 0x65,- 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61,- 0x53, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f,- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10,- 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,- 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x61, 0x72, 0x65,- 0x68, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,- 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6d,- 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f,- 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18,- 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65,- 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f,- 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77,- 0x6f, 0x72, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6d, 0x61, 0x73, 0x74, 0x65,- 0x72, 0x4f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77,- 0x6f, 0x72, 0x64, 0x12, 0x4a, 0x0a, 0x0a, 0x72, 0x65, 0x64, 0x69, 0x73, 0x5f, 0x74, 0x79, 0x70,- 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 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, 0x52, 0x65, 0x64, 0x69, 0x73,- 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x72, 0x65, 0x64, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12,- 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x73, 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08,- 0x52, 0x06, 0x75, 0x73, 0x65, 0x53, 0x73, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73,- 0x74, 0x65, 0x72, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74,- 0x65, 0x72, 0x12, 0x80, 0x01, 0x0a, 0x1b, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x63, 0x6f, 0x6e,- 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,- 0x72, 0x73, 0x18, 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 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, 0x45, 0x78, 0x74, 0x72,- 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d,- 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x19, 0x65, 0x78, 0x74, 0x72,- 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d,- 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x77, 0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53,- 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12,- 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09,- 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69,- 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0x31,- 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73,- 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a,- 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72,- 0x74, 0x1a, 0x4c, 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,- 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e,- 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,- 0x7c, 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, 0x12, 0x0f, 0x0a,- 0x0b, 0x41, 0x57, 0x53, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x49, 0x41, 0x4d, 0x10, 0x03, 0x12, 0x0d,- 0x0a, 0x09, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x49, 0x41, 0x4d, 0x10, 0x04, 0x22, 0x52, 0x0a,- 0x09, 0x52, 0x65, 0x64, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45,- 0x44, 0x49, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41,- 0x4c, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x45, 0x4e, 0x54, 0x49, 0x4e,- 0x45, 0x4c, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x10,- 0x03, 0x42, 0x0f, 0x0a, 0x0d, 0x69, 0x61, 0x6d, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,- 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x0a, 0x53, 0x41, 0x53, 0x4c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,- 0x12, 0x3f, 0x0a, 0x0a, 0x6b, 0x72, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x4b, 0x65, 0x72, 0x62, 0x65, 0x72, 0x6f, 0x73, 0x43, 0x6f,- 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x72, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69,- 0x67, 0x42, 0x0b, 0x0a, 0x09, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x22, 0xe0,- 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x72, 0x62, 0x65, 0x72, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69,- 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69,- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69,- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d,- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x12, 0x16, 0x0a,- 0x06, 0x6b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6b,- 0x65, 0x79, 0x74, 0x61, 0x62, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x64, 0x63, 0x5f, 0x68, 0x6f, 0x73,- 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x64, 0x63, 0x48, 0x6f, 0x73, 0x74,- 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x64, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x07, 0x6b, 0x64, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x6b,- 0x64, 0x63, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x72, 0x6f,- 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6b, 0x64, 0x63,- 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,- 0x6c, 0x22, 0x81, 0x07, 0x0a, 0x18, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,- 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x54,- 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,- 0x01, 0x28, 0x0e, 0x32, 0x33, 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, 0x2e, 0x53, 0x65,- 0x63, 0x72, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,- 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x4e, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74,- 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 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, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x61, 0x75,- 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x57, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x72, 0x6f,- 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 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, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4f, 0x70,- 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x61, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x12,- 0x16, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,- 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e,- 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e,- 0x67, 0x69, 0x6e, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72,- 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,- 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x61, 0x73,- 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4b, 0x65,- 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x8a, 0x02, 0x0a, 0x11, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c,- 0x65, 0x41, 0x75, 0x74, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x72,- 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f,- 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x69,- 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x49,- 0x64, 0x12, 0x59, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,- 0x45, 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, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c,- 0x65, 0x41, 0x75, 0x74, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x63, 0x72,- 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a,- 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x45, 0x0a, 0x0a, 0x53,- 0x65, 0x63, 0x72, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x45, 0x43,- 0x52, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,- 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10,- 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x4e, 0x56, 0x49, 0x52, 0x4f, 0x4e, 0x4d, 0x45, 0x4e, 0x54,- 0x10, 0x02, 0x22, 0x6c, 0x0a, 0x0a, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65,- 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x41, 0x45, 0x43, 0x52, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45,- 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f,- 0x0a, 0x0b, 0x56, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x4b, 0x56, 0x5f, 0x56, 0x32, 0x10, 0x01, 0x12,- 0x17, 0x0a, 0x13, 0x41, 0x57, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x53, 0x5f, 0x4d,- 0x41, 0x4e, 0x41, 0x47, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x47, 0x43, 0x50, 0x5f,- 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x5f, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x52, 0x10, 0x03,- 0x22, 0x44, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15,- 0x41, 0x55, 0x54, 0x48, 0x5f, 0x54, 0x59, 0x50, 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, 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, 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,+ 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 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 (- file_store_data_source_proto_rawDescOnce sync.Once- file_store_data_source_proto_rawDescData []byte-)--func file_store_data_source_proto_rawDescGZIP() []byte {- file_store_data_source_proto_rawDescOnce.Do(func() {- file_store_data_source_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_data_source_proto_rawDesc), len(file_store_data_source_proto_rawDesc)))- })- return file_store_data_source_proto_rawDescData-}--var file_store_data_source_proto_enumTypes = make([]protoimpl.EnumInfo, 6)-var file_store_data_source_proto_msgTypes = make([]protoimpl.MessageInfo, 8)-var file_store_data_source_proto_goTypes = []any{- (DataSourceType)(0), // 0: bytebase.store.DataSourceType- (DataSourceOptions_AuthenticationType)(0), // 1: bytebase.store.DataSourceOptions.AuthenticationType- (DataSourceOptions_RedisType)(0), // 2: bytebase.store.DataSourceOptions.RedisType- (DataSourceExternalSecret_SecretType)(0), // 3: bytebase.store.DataSourceExternalSecret.SecretType- (DataSourceExternalSecret_AuthType)(0), // 4: bytebase.store.DataSourceExternalSecret.AuthType- (DataSourceExternalSecret_AppRoleAuthOption_SecretType)(0), // 5: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType- (*DataSourceOptions)(nil), // 6: bytebase.store.DataSourceOptions- (*SASLConfig)(nil), // 7: bytebase.store.SASLConfig- (*KerberosConfig)(nil), // 8: bytebase.store.KerberosConfig- (*DataSourceExternalSecret)(nil), // 9: bytebase.store.DataSourceExternalSecret- (*DataSourceOptions_ClientSecretCredential)(nil), // 10: bytebase.store.DataSourceOptions.ClientSecretCredential- (*DataSourceOptions_Address)(nil), // 11: bytebase.store.DataSourceOptions.Address- nil, // 12: bytebase.store.DataSourceOptions.ExtraConnectionParametersEntry- (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 13: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption-}+var file_store_data_source_proto_goTypes = []any{}var file_store_data_source_proto_depIdxs = []int32{- 0, // 0: bytebase.store.DataSourceOptions.type:type_name -> bytebase.store.DataSourceType- 9, // 1: bytebase.store.DataSourceOptions.external_secret:type_name -> bytebase.store.DataSourceExternalSecret- 1, // 2: bytebase.store.DataSourceOptions.authentication_type:type_name -> bytebase.store.DataSourceOptions.AuthenticationType- 10, // 3: bytebase.store.DataSourceOptions.client_secret_credential:type_name -> bytebase.store.DataSourceOptions.ClientSecretCredential- 7, // 4: bytebase.store.DataSourceOptions.sasl_config:type_name -> bytebase.store.SASLConfig- 11, // 5: bytebase.store.DataSourceOptions.additional_addresses:type_name -> bytebase.store.DataSourceOptions.Address- 2, // 6: bytebase.store.DataSourceOptions.redis_type:type_name -> bytebase.store.DataSourceOptions.RedisType- 12, // 7: bytebase.store.DataSourceOptions.extra_connection_parameters:type_name -> bytebase.store.DataSourceOptions.ExtraConnectionParametersEntry- 8, // 8: bytebase.store.SASLConfig.krb_config:type_name -> bytebase.store.KerberosConfig- 3, // 9: bytebase.store.DataSourceExternalSecret.secret_type:type_name -> bytebase.store.DataSourceExternalSecret.SecretType- 4, // 10: bytebase.store.DataSourceExternalSecret.auth_type:type_name -> bytebase.store.DataSourceExternalSecret.AuthType- 13, // 11: bytebase.store.DataSourceExternalSecret.app_role:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption- 5, // 12: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType- 13, // [13:13] is the sub-list for method output_type- 13, // [13:13] is the sub-list for method input_type- 13, // [13:13] is the sub-list for extension type_name- 13, // [13:13] is the sub-list for extension extendee- 0, // [0:13] is the sub-list for field type_name+ 0, // [0:0] is the sub-list for method output_type+ 0, // [0:0] is the sub-list for method input_type+ 0, // [0:0] is the sub-list for extension type_name+ 0, // [0:0] is the sub-list for extension extendee+ 0, // [0:0] is the sub-list for field type_name}func init() { file_store_data_source_proto_init() }@@ -1460,30 +44,18 @@ func file_store_data_source_proto_init() {if File_store_data_source_proto != nil {return}- file_store_data_source_proto_msgTypes[0].OneofWrappers = []any{- (*DataSourceOptions_ClientSecretCredential_)(nil),- }- file_store_data_source_proto_msgTypes[1].OneofWrappers = []any{- (*SASLConfig_KrbConfig)(nil),- }- file_store_data_source_proto_msgTypes[3].OneofWrappers = []any{- (*DataSourceExternalSecret_AppRole)(nil),- (*DataSourceExternalSecret_Token)(nil),- }type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_data_source_proto_rawDesc), len(file_store_data_source_proto_rawDesc)),- NumEnums: 6,- NumMessages: 8,+ NumEnums: 0,+ NumMessages: 0,NumExtensions: 0,NumServices: 0,},GoTypes: file_store_data_source_proto_goTypes,DependencyIndexes: file_store_data_source_proto_depIdxs,- EnumInfos: file_store_data_source_proto_enumTypes,- MessageInfos: file_store_data_source_proto_msgTypes,}.Build()File_store_data_source_proto = out.Filefile_store_data_source_proto_goTypes = nildiff --git a/proto/generated-go/store/instance.pb.go b/proto/generated-go/store/instance.pb.goindex 6b557cd1bb..b13ec5a12a 100644--- a/proto/generated-go/store/instance.pb.go+++ b/proto/generated-go/store/instance.pb.go@@ -23,6 +23,317 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+type DataSourceType int32++const (+ DataSourceType_DATA_SOURCE_UNSPECIFIED DataSourceType = 0+ DataSourceType_ADMIN DataSourceType = 1+ DataSourceType_READ_ONLY DataSourceType = 2+)++// Enum value maps for DataSourceType.+var (+ DataSourceType_name = map[int32]string{+ 0: "DATA_SOURCE_UNSPECIFIED",+ 1: "ADMIN",+ 2: "READ_ONLY",+ }+ DataSourceType_value = map[string]int32{+ "DATA_SOURCE_UNSPECIFIED": 0,+ "ADMIN": 1,+ "READ_ONLY": 2,+ }+)++func (x DataSourceType) Enum() *DataSourceType {+ p := new(DataSourceType)+ *p = x+ return p+}++func (x DataSourceType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSourceType) Descriptor() protoreflect.EnumDescriptor {+ return file_store_instance_proto_enumTypes[0].Descriptor()+}++func (DataSourceType) Type() protoreflect.EnumType {+ return &file_store_instance_proto_enumTypes[0]+}++func (x DataSourceType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSourceType.Descriptor instead.+func (DataSourceType) EnumDescriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{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+ DataSource_AWS_RDS_IAM DataSource_AuthenticationType = 3+ DataSource_AZURE_IAM DataSource_AuthenticationType = 4+)++// Enum value maps for DataSource_AuthenticationType.+var (+ DataSource_AuthenticationType_name = map[int32]string{+ 0: "AUTHENTICATION_UNSPECIFIED",+ 1: "PASSWORD",+ 2: "GOOGLE_CLOUD_SQL_IAM",+ 3: "AWS_RDS_IAM",+ 4: "AZURE_IAM",+ }+ DataSource_AuthenticationType_value = map[string]int32{+ "AUTHENTICATION_UNSPECIFIED": 0,+ "PASSWORD": 1,+ "GOOGLE_CLOUD_SQL_IAM": 2,+ "AWS_RDS_IAM": 3,+ "AZURE_IAM": 4,+ }+)++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_store_instance_proto_enumTypes[1].Descriptor()+}++func (DataSource_AuthenticationType) Type() protoreflect.EnumType {+ return &file_store_instance_proto_enumTypes[1]+}++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_store_instance_proto_rawDescGZIP(), []int{2, 0}+}++type DataSource_RedisType int32++const (+ DataSource_REDIS_TYPE_UNSPECIFIED DataSource_RedisType = 0+ DataSource_STANDALONE DataSource_RedisType = 1+ DataSource_SENTINEL DataSource_RedisType = 2+ DataSource_CLUSTER DataSource_RedisType = 3+)++// Enum value maps for DataSource_RedisType.+var (+ DataSource_RedisType_name = map[int32]string{+ 0: "REDIS_TYPE_UNSPECIFIED",+ 1: "STANDALONE",+ 2: "SENTINEL",+ 3: "CLUSTER",+ }+ DataSource_RedisType_value = map[string]int32{+ "REDIS_TYPE_UNSPECIFIED": 0,+ "STANDALONE": 1,+ "SENTINEL": 2,+ "CLUSTER": 3,+ }+)++func (x DataSource_RedisType) Enum() *DataSource_RedisType {+ p := new(DataSource_RedisType)+ *p = x+ return p+}++func (x DataSource_RedisType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSource_RedisType) Descriptor() protoreflect.EnumDescriptor {+ return file_store_instance_proto_enumTypes[2].Descriptor()+}++func (DataSource_RedisType) Type() protoreflect.EnumType {+ return &file_store_instance_proto_enumTypes[2]+}++func (x DataSource_RedisType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSource_RedisType.Descriptor instead.+func (DataSource_RedisType) EnumDescriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{2, 1}+}++type DataSourceExternalSecret_SecretType int32++const (+ DataSourceExternalSecret_SAECRET_TYPE_UNSPECIFIED DataSourceExternalSecret_SecretType = 0+ // ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2+ DataSourceExternalSecret_VAULT_KV_V2 DataSourceExternalSecret_SecretType = 1+ // ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html+ DataSourceExternalSecret_AWS_SECRETS_MANAGER DataSourceExternalSecret_SecretType = 2+ // ref: https://cloud.google.com/secret-manager/docs+ DataSourceExternalSecret_GCP_SECRET_MANAGER DataSourceExternalSecret_SecretType = 3+)++// Enum value maps for DataSourceExternalSecret_SecretType.+var (+ DataSourceExternalSecret_SecretType_name = map[int32]string{+ 0: "SAECRET_TYPE_UNSPECIFIED",+ 1: "VAULT_KV_V2",+ 2: "AWS_SECRETS_MANAGER",+ 3: "GCP_SECRET_MANAGER",+ }+ DataSourceExternalSecret_SecretType_value = map[string]int32{+ "SAECRET_TYPE_UNSPECIFIED": 0,+ "VAULT_KV_V2": 1,+ "AWS_SECRETS_MANAGER": 2,+ "GCP_SECRET_MANAGER": 3,+ }+)++func (x DataSourceExternalSecret_SecretType) Enum() *DataSourceExternalSecret_SecretType {+ p := new(DataSourceExternalSecret_SecretType)+ *p = x+ return p+}++func (x DataSourceExternalSecret_SecretType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSourceExternalSecret_SecretType) Descriptor() protoreflect.EnumDescriptor {+ return file_store_instance_proto_enumTypes[3].Descriptor()+}++func (DataSourceExternalSecret_SecretType) Type() protoreflect.EnumType {+ return &file_store_instance_proto_enumTypes[3]+}++func (x DataSourceExternalSecret_SecretType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSourceExternalSecret_SecretType.Descriptor instead.+func (DataSourceExternalSecret_SecretType) EnumDescriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{5, 0}+}++type DataSourceExternalSecret_AuthType int32++const (+ DataSourceExternalSecret_AUTH_TYPE_UNSPECIFIED DataSourceExternalSecret_AuthType = 0+ // ref: https://developer.hashicorp.com/vault/docs/auth/token+ DataSourceExternalSecret_TOKEN DataSourceExternalSecret_AuthType = 1+ // ref: https://developer.hashicorp.com/vault/docs/auth/approle+ DataSourceExternalSecret_VAULT_APP_ROLE DataSourceExternalSecret_AuthType = 2+)++// Enum value maps for DataSourceExternalSecret_AuthType.+var (+ DataSourceExternalSecret_AuthType_name = map[int32]string{+ 0: "AUTH_TYPE_UNSPECIFIED",+ 1: "TOKEN",+ 2: "VAULT_APP_ROLE",+ }+ DataSourceExternalSecret_AuthType_value = map[string]int32{+ "AUTH_TYPE_UNSPECIFIED": 0,+ "TOKEN": 1,+ "VAULT_APP_ROLE": 2,+ }+)++func (x DataSourceExternalSecret_AuthType) Enum() *DataSourceExternalSecret_AuthType {+ p := new(DataSourceExternalSecret_AuthType)+ *p = x+ return p+}++func (x DataSourceExternalSecret_AuthType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSourceExternalSecret_AuthType) Descriptor() protoreflect.EnumDescriptor {+ return file_store_instance_proto_enumTypes[4].Descriptor()+}++func (DataSourceExternalSecret_AuthType) Type() protoreflect.EnumType {+ return &file_store_instance_proto_enumTypes[4]+}++func (x DataSourceExternalSecret_AuthType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSourceExternalSecret_AuthType.Descriptor instead.+func (DataSourceExternalSecret_AuthType) EnumDescriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{5, 1}+}++type DataSourceExternalSecret_AppRoleAuthOption_SecretType int32++const (+ DataSourceExternalSecret_AppRoleAuthOption_SECRET_TYPE_UNSPECIFIED DataSourceExternalSecret_AppRoleAuthOption_SecretType = 0+ DataSourceExternalSecret_AppRoleAuthOption_PLAIN DataSourceExternalSecret_AppRoleAuthOption_SecretType = 1+ DataSourceExternalSecret_AppRoleAuthOption_ENVIRONMENT DataSourceExternalSecret_AppRoleAuthOption_SecretType = 2+)++// Enum value maps for DataSourceExternalSecret_AppRoleAuthOption_SecretType.+var (+ DataSourceExternalSecret_AppRoleAuthOption_SecretType_name = map[int32]string{+ 0: "SECRET_TYPE_UNSPECIFIED",+ 1: "PLAIN",+ 2: "ENVIRONMENT",+ }+ DataSourceExternalSecret_AppRoleAuthOption_SecretType_value = map[string]int32{+ "SECRET_TYPE_UNSPECIFIED": 0,+ "PLAIN": 1,+ "ENVIRONMENT": 2,+ }+)++func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) Enum() *DataSourceExternalSecret_AppRoleAuthOption_SecretType {+ p := new(DataSourceExternalSecret_AppRoleAuthOption_SecretType)+ *p = x+ return p+}++func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) Descriptor() protoreflect.EnumDescriptor {+ return file_store_instance_proto_enumTypes[5].Descriptor()+}++func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) Type() protoreflect.EnumType {+ return &file_store_instance_proto_enumTypes[5]+}++func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSourceExternalSecret_AppRoleAuthOption_SecretType.Descriptor instead.+func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) EnumDescriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{5, 0, 0}+}+// InstanceMetadata is the metadata for instances.type InstanceMetadata struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -38,7 +349,8 @@ type InstanceMetadata struct {MaximumConnections int32 `protobuf:"varint,5,opt,name=maximum_connections,json=maximumConnections,proto3" json:"maximum_connections,omitempty"`// Enable sync for following databases.// Default empty, means sync all schemas & databases.- SyncDatabases []string `protobuf:"bytes,6,rep,name=sync_databases,json=syncDatabases,proto3" json:"sync_databases,omitempty"`+ SyncDatabases []string `protobuf:"bytes,6,rep,name=sync_databases,json=syncDatabases,proto3" json:"sync_databases,omitempty"`+ DataSources []*DataSource `protobuf:"bytes,7,rep,name=data_sources,json=dataSources,proto3" json:"data_sources,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -115,6 +427,13 @@ func (x *InstanceMetadata) GetSyncDatabases() []string {return nil}+func (x *InstanceMetadata) GetDataSources() []*DataSource {+ if x != nil {+ return x.DataSources+ }+ return nil+}+// InstanceRole is the API message for instance role.type InstanceRole struct {state protoimpl.MessageState `protogen:"open.v1"`@@ -190,103 +509,1207 @@ func (x *InstanceRole) GetAttribute() string {return ""}-var File_store_instance_proto protoreflect.FileDescriptor+type DataSource struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`+ Type DataSourceType `protobuf:"varint,2,opt,name=type,proto3,enum=bytebase.store.DataSourceType" json:"type,omitempty"`+ Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`+ Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`+ Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"`+ ObfuscatedPassword string `protobuf:"bytes,6,opt,name=obfuscated_password,json=obfuscatedPassword,proto3" json:"obfuscated_password,omitempty"`+ Database string `protobuf:"bytes,7,opt,name=database,proto3" json:"database,omitempty"`+ ObfuscatedSslKey string `protobuf:"bytes,8,opt,name=obfuscated_ssl_key,json=obfuscatedSslKey,proto3" json:"obfuscated_ssl_key,omitempty"`+ ObfuscatedSslCert string `protobuf:"bytes,9,opt,name=obfuscated_ssl_cert,json=obfuscatedSslCert,proto3" json:"obfuscated_ssl_cert,omitempty"`+ ObfuscatedSslCa string `protobuf:"bytes,10,opt,name=obfuscated_ssl_ca,json=obfuscatedSslCa,proto3" json:"obfuscated_ssl_ca,omitempty"`+ // srv is a boolean flag that indicates whether the host is a DNS SRV record.+ Srv bool `protobuf:"varint,11,opt,name=srv,proto3" json:"srv,omitempty"`+ // authentication_database is the database name to authenticate against, which stores the user credentials.+ AuthenticationDatabase string `protobuf:"bytes,12,opt,name=authentication_database,json=authenticationDatabase,proto3" json:"authentication_database,omitempty"`+ // sid and service_name are used for Oracle.+ Sid string `protobuf:"bytes,13,opt,name=sid,proto3" json:"sid,omitempty"`+ ServiceName string `protobuf:"bytes,14,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`+ // SSH related+ // The hostname of the SSH server agent.+ SshHost string `protobuf:"bytes,15,opt,name=ssh_host,json=sshHost,proto3" json:"ssh_host,omitempty"`+ // The port of the SSH server agent. It's 22 typically.+ SshPort string `protobuf:"bytes,16,opt,name=ssh_port,json=sshPort,proto3" json:"ssh_port,omitempty"`+ // The user to login the server.+ SshUser string `protobuf:"bytes,17,opt,name=ssh_user,json=sshUser,proto3" json:"ssh_user,omitempty"`+ // The password to login the server. If it's empty string, no password is required.+ SshObfuscatedPassword string `protobuf:"bytes,18,opt,name=ssh_obfuscated_password,json=sshObfuscatedPassword,proto3" json:"ssh_obfuscated_password,omitempty"`+ // 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").+ SshObfuscatedPrivateKey string `protobuf:"bytes,19,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,20,opt,name=authentication_private_key_obfuscated,json=authenticationPrivateKeyObfuscated,proto3" json:"authentication_private_key_obfuscated,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.store.DataSource_AuthenticationType" json:"authentication_type,omitempty"`+ // Types that are valid to be assigned to IamExtension:+ //+ // *DataSource_ClientSecretCredential_+ IamExtension isDataSource_IamExtension `protobuf_oneof:"iam_extension"`+ SaslConfig *SASLConfig `protobuf:"bytes,24,opt,name=sasl_config,json=saslConfig,proto3" json:"sasl_config,omitempty"`+ // additional_addresses is used for MongoDB replica set.+ AdditionalAddresses []*DataSource_Address `protobuf:"bytes,25,rep,name=additional_addresses,json=additionalAddresses,proto3" json:"additional_addresses,omitempty"`+ // replica_set is used for MongoDB replica set.+ ReplicaSet string `protobuf:"bytes,26,opt,name=replica_set,json=replicaSet,proto3" json:"replica_set,omitempty"`+ // direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.+ DirectConnection bool `protobuf:"varint,27,opt,name=direct_connection,json=directConnection,proto3" json:"direct_connection,omitempty"`+ // region is the location of where the DB is, works for AWS RDS. For example, us-east-1.+ Region string `protobuf:"bytes,28,opt,name=region,proto3" json:"region,omitempty"`+ // warehouse_id is used by Databricks.+ WarehouseId string `protobuf:"bytes,29,opt,name=warehouse_id,json=warehouseId,proto3" json:"warehouse_id,omitempty"`+ // master_name is the master name used by connecting redis-master via redis sentinel.+ MasterName string `protobuf:"bytes,30,opt,name=master_name,json=masterName,proto3" json:"master_name,omitempty"`+ // master_username and master_obfuscated_password are master credentials used by redis sentinel mode.+ MasterUsername string `protobuf:"bytes,31,opt,name=master_username,json=masterUsername,proto3" json:"master_username,omitempty"`+ MasterObfuscatedPassword string `protobuf:"bytes,32,opt,name=master_obfuscated_password,json=masterObfuscatedPassword,proto3" json:"master_obfuscated_password,omitempty"`+ RedisType DataSource_RedisType `protobuf:"varint,33,opt,name=redis_type,json=redisType,proto3,enum=bytebase.store.DataSource_RedisType" json:"redis_type,omitempty"`+ // Use SSL to connect to the data source. By default, we use system default SSL configuration.+ UseSsl bool `protobuf:"varint,34,opt,name=use_ssl,json=useSsl,proto3" json:"use_ssl,omitempty"`+ // Cluster is the cluster name for the data source. Used by CockroachDB.+ Cluster string `protobuf:"bytes,35,opt,name=cluster,proto3" json:"cluster,omitempty"`+ // Extra connection parameters for the database connection.+ // For PostgreSQL HA, this can be used to set target_session_attrs=read-write+ ExtraConnectionParameters map[string]string `protobuf:"bytes,36,rep,name=extra_connection_parameters,json=extraConnectionParameters,proto3" json:"extra_connection_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}-var file_store_instance_proto_rawDesc = string([]byte{- 0x0a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,- 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x02, 0x0a, 0x10, 0x49, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x1c,- 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x73, 0x65,- 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01,- 0x28, 0x05, 0x52, 0x18, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x61,- 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0e,- 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02,- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,- 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32,- 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x49,- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c,- 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72,- 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61,- 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76,- 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6f,- 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,- 0x12, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,- 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x79, 0x6e,- 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x22, 0xce, 0x01, 0x0a, 0x0c, 0x49,- 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,- 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,- 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69,- 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e,- 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12,- 0x24, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x03,- 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74,- 0x69, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,- 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72,- 0x69, 0x62, 0x75, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x63, 0x6f, 0x6e,- 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0e, 0x0a,- 0x0c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x42, 0x0c, 0x0a,- 0x0a, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 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,-})+func (x *DataSource) Reset() {+ *x = DataSource{}+ mi := &file_store_instance_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}-var (- file_store_instance_proto_rawDescOnce sync.Once- file_store_instance_proto_rawDescData []byte-)+func (x *DataSource) String() string {+ return protoimpl.X.MessageStringOf(x)+}-func file_store_instance_proto_rawDescGZIP() []byte {- file_store_instance_proto_rawDescOnce.Do(func() {- file_store_instance_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_instance_proto_rawDesc), len(file_store_instance_proto_rawDesc)))- })- return file_store_instance_proto_rawDescData+func (*DataSource) ProtoMessage() {}++func (x *DataSource) ProtoReflect() protoreflect.Message {+ mi := &file_store_instance_proto_msgTypes[2]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)}-var file_store_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 2)-var file_store_instance_proto_goTypes = []any{- (*InstanceMetadata)(nil), // 0: bytebase.store.InstanceMetadata- (*InstanceRole)(nil), // 1: bytebase.store.InstanceRole- (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp- (*durationpb.Duration)(nil), // 3: google.protobuf.Duration+// Deprecated: Use DataSource.ProtoReflect.Descriptor instead.+func (*DataSource) Descriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{2}}-var file_store_instance_proto_depIdxs = []int32{- 2, // 0: bytebase.store.InstanceMetadata.last_sync_time:type_name -> google.protobuf.Timestamp- 1, // 1: bytebase.store.InstanceMetadata.roles:type_name -> bytebase.store.InstanceRole- 3, // 2: bytebase.store.InstanceMetadata.sync_interval:type_name -> google.protobuf.Duration- 3, // [3:3] is the sub-list for method output_type- 3, // [3:3] is the sub-list for method input_type- 3, // [3:3] is the sub-list for extension type_name- 3, // [3:3] is the sub-list for extension extendee- 0, // [0:3] is the sub-list for field type_name++func (x *DataSource) GetId() string {+ if x != nil {+ return x.Id+ }+ return ""}-func init() { file_store_instance_proto_init() }-func file_store_instance_proto_init() {- if File_store_instance_proto != nil {- return+func (x *DataSource) GetType() DataSourceType {+ if x != nil {+ return x.Type+ }+ return DataSourceType_DATA_SOURCE_UNSPECIFIED+}++func (x *DataSource) GetHost() string {+ if x != nil {+ return x.Host+ }+ return ""+}++func (x *DataSource) GetPort() string {+ if x != nil {+ return x.Port+ }+ return ""+}++func (x *DataSource) GetUsername() string {+ if x != nil {+ return x.Username+ }+ return ""+}++func (x *DataSource) GetObfuscatedPassword() string {+ if x != nil {+ return x.ObfuscatedPassword+ }+ return ""+}++func (x *DataSource) GetDatabase() string {+ if x != nil {+ return x.Database+ }+ return ""+}++func (x *DataSource) GetObfuscatedSslKey() string {+ if x != nil {+ return x.ObfuscatedSslKey+ }+ return ""+}++func (x *DataSource) GetObfuscatedSslCert() string {+ if x != nil {+ return x.ObfuscatedSslCert+ }+ return ""+}++func (x *DataSource) GetObfuscatedSslCa() string {+ if x != nil {+ return x.ObfuscatedSslCa+ }+ return ""+}++func (x *DataSource) GetSrv() bool {+ if x != nil {+ return x.Srv+ }+ return false+}++func (x *DataSource) GetAuthenticationDatabase() string {+ if x != nil {+ return x.AuthenticationDatabase+ }+ return ""+}++func (x *DataSource) GetSid() string {+ if x != nil {+ return x.Sid+ }+ return ""+}++func (x *DataSource) GetServiceName() string {+ if x != nil {+ return x.ServiceName+ }+ return ""+}++func (x *DataSource) GetSshHost() string {+ if x != nil {+ return x.SshHost+ }+ return ""+}++func (x *DataSource) GetSshPort() string {+ if x != nil {+ return x.SshPort+ }+ return ""+}++func (x *DataSource) GetSshUser() string {+ if x != nil {+ return x.SshUser+ }+ return ""+}++func (x *DataSource) GetSshObfuscatedPassword() string {+ if x != nil {+ return x.SshObfuscatedPassword+ }+ return ""+}++func (x *DataSource) GetSshObfuscatedPrivateKey() string {+ if x != nil {+ return x.SshObfuscatedPrivateKey+ }+ return ""+}++func (x *DataSource) GetAuthenticationPrivateKeyObfuscated() string {+ if x != nil {+ return x.AuthenticationPrivateKeyObfuscated+ }+ return ""+}++func (x *DataSource) GetExternalSecret() *DataSourceExternalSecret {+ if x != nil {+ return x.ExternalSecret+ }+ return nil+}++func (x *DataSource) GetAuthenticationType() DataSource_AuthenticationType {+ if x != nil {+ return x.AuthenticationType+ }+ return DataSource_AUTHENTICATION_UNSPECIFIED+}++func (x *DataSource) GetIamExtension() isDataSource_IamExtension {+ if x != nil {+ return x.IamExtension+ }+ return nil+}++func (x *DataSource) GetClientSecretCredential() *DataSource_ClientSecretCredential {+ if x != nil {+ if x, ok := x.IamExtension.(*DataSource_ClientSecretCredential_); ok {+ return x.ClientSecretCredential+ }+ }+ return nil+}++func (x *DataSource) GetSaslConfig() *SASLConfig {+ if x != nil {+ return x.SaslConfig+ }+ return nil+}++func (x *DataSource) GetAdditionalAddresses() []*DataSource_Address {+ if x != nil {+ return x.AdditionalAddresses+ }+ return nil+}++func (x *DataSource) GetReplicaSet() string {+ if x != nil {+ return x.ReplicaSet+ }+ return ""+}++func (x *DataSource) GetDirectConnection() bool {+ if x != nil {+ return x.DirectConnection+ }+ return false+}++func (x *DataSource) GetRegion() string {+ if x != nil {+ return x.Region+ }+ return ""+}++func (x *DataSource) GetWarehouseId() string {+ if x != nil {+ return x.WarehouseId+ }+ return ""+}++func (x *DataSource) GetMasterName() string {+ if x != nil {+ return x.MasterName+ }+ return ""+}++func (x *DataSource) GetMasterUsername() string {+ if x != nil {+ return x.MasterUsername+ }+ return ""+}++func (x *DataSource) GetMasterObfuscatedPassword() string {+ if x != nil {+ return x.MasterObfuscatedPassword+ }+ return ""+}++func (x *DataSource) GetRedisType() DataSource_RedisType {+ if x != nil {+ return x.RedisType+ }+ return DataSource_REDIS_TYPE_UNSPECIFIED+}++func (x *DataSource) GetUseSsl() bool {+ if x != nil {+ return x.UseSsl+ }+ return false+}++func (x *DataSource) GetCluster() string {+ if x != nil {+ return x.Cluster+ }+ return ""+}++func (x *DataSource) GetExtraConnectionParameters() map[string]string {+ if x != nil {+ return x.ExtraConnectionParameters+ }+ return nil+}++type isDataSource_IamExtension interface {+ isDataSource_IamExtension()+}++type DataSource_ClientSecretCredential_ struct {+ ClientSecretCredential *DataSource_ClientSecretCredential `protobuf:"bytes,23,opt,name=client_secret_credential,json=clientSecretCredential,proto3,oneof"`+}++func (*DataSource_ClientSecretCredential_) isDataSource_IamExtension() {}++type SASLConfig struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // Types that are valid to be assigned to Mechanism:+ //+ // *SASLConfig_KrbConfig+ Mechanism isSASLConfig_Mechanism `protobuf_oneof:"mechanism"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *SASLConfig) Reset() {+ *x = SASLConfig{}+ mi := &file_store_instance_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *SASLConfig) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SASLConfig) ProtoMessage() {}++func (x *SASLConfig) ProtoReflect() protoreflect.Message {+ mi := &file_store_instance_proto_msgTypes[3]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use SASLConfig.ProtoReflect.Descriptor instead.+func (*SASLConfig) Descriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{3}+}++func (x *SASLConfig) GetMechanism() isSASLConfig_Mechanism {+ if x != nil {+ return x.Mechanism+ }+ return nil+}++func (x *SASLConfig) GetKrbConfig() *KerberosConfig {+ if x != nil {+ if x, ok := x.Mechanism.(*SASLConfig_KrbConfig); ok {+ return x.KrbConfig+ }+ }+ return nil+}++type isSASLConfig_Mechanism interface {+ isSASLConfig_Mechanism()+}++type SASLConfig_KrbConfig struct {+ KrbConfig *KerberosConfig `protobuf:"bytes,1,opt,name=krb_config,json=krbConfig,proto3,oneof"`+}++func (*SASLConfig_KrbConfig) isSASLConfig_Mechanism() {}++type KerberosConfig struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Primary string `protobuf:"bytes,1,opt,name=primary,proto3" json:"primary,omitempty"`+ Instance string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"`+ Realm string `protobuf:"bytes,3,opt,name=realm,proto3" json:"realm,omitempty"`+ Keytab []byte `protobuf:"bytes,4,opt,name=keytab,proto3" json:"keytab,omitempty"`+ KdcHost string `protobuf:"bytes,5,opt,name=kdc_host,json=kdcHost,proto3" json:"kdc_host,omitempty"`+ KdcPort string `protobuf:"bytes,6,opt,name=kdc_port,json=kdcPort,proto3" json:"kdc_port,omitempty"`+ KdcTransportProtocol string `protobuf:"bytes,7,opt,name=kdc_transport_protocol,json=kdcTransportProtocol,proto3" json:"kdc_transport_protocol,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *KerberosConfig) Reset() {+ *x = KerberosConfig{}+ mi := &file_store_instance_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *KerberosConfig) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*KerberosConfig) ProtoMessage() {}++func (x *KerberosConfig) ProtoReflect() protoreflect.Message {+ mi := &file_store_instance_proto_msgTypes[4]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use KerberosConfig.ProtoReflect.Descriptor instead.+func (*KerberosConfig) Descriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{4}+}++func (x *KerberosConfig) GetPrimary() string {+ if x != nil {+ return x.Primary+ }+ return ""+}++func (x *KerberosConfig) GetInstance() string {+ if x != nil {+ return x.Instance+ }+ return ""+}++func (x *KerberosConfig) GetRealm() string {+ if x != nil {+ return x.Realm+ }+ return ""+}++func (x *KerberosConfig) GetKeytab() []byte {+ if x != nil {+ return x.Keytab+ }+ return nil+}++func (x *KerberosConfig) GetKdcHost() string {+ if x != nil {+ return x.KdcHost+ }+ return ""+}++func (x *KerberosConfig) GetKdcPort() string {+ if x != nil {+ return x.KdcPort+ }+ return ""+}++func (x *KerberosConfig) GetKdcTransportProtocol() string {+ if x != nil {+ return x.KdcTransportProtocol+ }+ return ""+}++type DataSourceExternalSecret struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ SecretType DataSourceExternalSecret_SecretType `protobuf:"varint,1,opt,name=secret_type,json=secretType,proto3,enum=bytebase.store.DataSourceExternalSecret_SecretType" json:"secret_type,omitempty"`+ Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`+ AuthType DataSourceExternalSecret_AuthType `protobuf:"varint,3,opt,name=auth_type,json=authType,proto3,enum=bytebase.store.DataSourceExternalSecret_AuthType" json:"auth_type,omitempty"`+ // Types that are valid to be assigned to AuthOption:+ //+ // *DataSourceExternalSecret_AppRole+ // *DataSourceExternalSecret_Token+ AuthOption isDataSourceExternalSecret_AuthOption `protobuf_oneof:"auth_option"`+ // engine name is the name for secret engine.+ EngineName string `protobuf:"bytes,6,opt,name=engine_name,json=engineName,proto3" json:"engine_name,omitempty"`+ // the secret name in the engine to store the password.+ SecretName string `protobuf:"bytes,7,opt,name=secret_name,json=secretName,proto3" json:"secret_name,omitempty"`+ // the key name for the password.+ PasswordKeyName string `protobuf:"bytes,8,opt,name=password_key_name,json=passwordKeyName,proto3" json:"password_key_name,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DataSourceExternalSecret) Reset() {+ *x = DataSourceExternalSecret{}+ mi := &file_store_instance_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DataSourceExternalSecret) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DataSourceExternalSecret) ProtoMessage() {}++func (x *DataSourceExternalSecret) ProtoReflect() protoreflect.Message {+ mi := &file_store_instance_proto_msgTypes[5]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DataSourceExternalSecret.ProtoReflect.Descriptor instead.+func (*DataSourceExternalSecret) Descriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{5}+}++func (x *DataSourceExternalSecret) GetSecretType() DataSourceExternalSecret_SecretType {+ if x != nil {+ return x.SecretType+ }+ return DataSourceExternalSecret_SAECRET_TYPE_UNSPECIFIED+}++func (x *DataSourceExternalSecret) GetUrl() string {+ if x != nil {+ return x.Url+ }+ return ""+}++func (x *DataSourceExternalSecret) GetAuthType() DataSourceExternalSecret_AuthType {+ if x != nil {+ return x.AuthType+ }+ return DataSourceExternalSecret_AUTH_TYPE_UNSPECIFIED+}++func (x *DataSourceExternalSecret) GetAuthOption() isDataSourceExternalSecret_AuthOption {+ if x != nil {+ return x.AuthOption+ }+ return nil+}++func (x *DataSourceExternalSecret) GetAppRole() *DataSourceExternalSecret_AppRoleAuthOption {+ if x != nil {+ if x, ok := x.AuthOption.(*DataSourceExternalSecret_AppRole); ok {+ return x.AppRole+ }+ }+ return nil+}++func (x *DataSourceExternalSecret) GetToken() string {+ if x != nil {+ if x, ok := x.AuthOption.(*DataSourceExternalSecret_Token); ok {+ return x.Token+ }+ }+ return ""+}++func (x *DataSourceExternalSecret) GetEngineName() string {+ if x != nil {+ return x.EngineName+ }+ return ""+}++func (x *DataSourceExternalSecret) GetSecretName() string {+ if x != nil {+ return x.SecretName+ }+ return ""+}++func (x *DataSourceExternalSecret) GetPasswordKeyName() string {+ if x != nil {+ return x.PasswordKeyName+ }+ return ""+}++type isDataSourceExternalSecret_AuthOption interface {+ isDataSourceExternalSecret_AuthOption()+}++type DataSourceExternalSecret_AppRole struct {+ AppRole *DataSourceExternalSecret_AppRoleAuthOption `protobuf:"bytes,4,opt,name=app_role,json=appRole,proto3,oneof"`+}++type DataSourceExternalSecret_Token struct {+ Token string `protobuf:"bytes,5,opt,name=token,proto3,oneof"`+}++func (*DataSourceExternalSecret_AppRole) isDataSourceExternalSecret_AuthOption() {}++func (*DataSourceExternalSecret_Token) isDataSourceExternalSecret_AuthOption() {}++type DataSource_ClientSecretCredential struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`+ ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`+ ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DataSource_ClientSecretCredential) Reset() {+ *x = DataSource_ClientSecretCredential{}+ mi := &file_store_instance_proto_msgTypes[6]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DataSource_ClientSecretCredential) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DataSource_ClientSecretCredential) ProtoMessage() {}++func (x *DataSource_ClientSecretCredential) ProtoReflect() protoreflect.Message {+ mi := &file_store_instance_proto_msgTypes[6]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DataSource_ClientSecretCredential.ProtoReflect.Descriptor instead.+func (*DataSource_ClientSecretCredential) Descriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{2, 0}+}++func (x *DataSource_ClientSecretCredential) GetTenantId() string {+ if x != nil {+ return x.TenantId+ }+ return ""+}++func (x *DataSource_ClientSecretCredential) GetClientId() string {+ if x != nil {+ return x.ClientId+ }+ return ""+}++func (x *DataSource_ClientSecretCredential) GetClientSecret() string {+ if x != nil {+ return x.ClientSecret+ }+ return ""+}++type DataSource_Address struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`+ Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DataSource_Address) Reset() {+ *x = DataSource_Address{}+ mi := &file_store_instance_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DataSource_Address) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DataSource_Address) ProtoMessage() {}++func (x *DataSource_Address) ProtoReflect() protoreflect.Message {+ mi := &file_store_instance_proto_msgTypes[7]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DataSource_Address.ProtoReflect.Descriptor instead.+func (*DataSource_Address) Descriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{2, 1}+}++func (x *DataSource_Address) GetHost() string {+ if x != nil {+ return x.Host+ }+ return ""+}++func (x *DataSource_Address) GetPort() string {+ if x != nil {+ return x.Port+ }+ return ""+}++type DataSourceExternalSecret_AppRoleAuthOption struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"`+ // the secret id for the role without ttl.+ SecretId string `protobuf:"bytes,2,opt,name=secret_id,json=secretId,proto3" json:"secret_id,omitempty"`+ Type DataSourceExternalSecret_AppRoleAuthOption_SecretType `protobuf:"varint,3,opt,name=type,proto3,enum=bytebase.store.DataSourceExternalSecret_AppRoleAuthOption_SecretType" json:"type,omitempty"`+ // The path where the approle auth method is mounted.+ MountPath string `protobuf:"bytes,4,opt,name=mount_path,json=mountPath,proto3" json:"mount_path,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *DataSourceExternalSecret_AppRoleAuthOption) Reset() {+ *x = DataSourceExternalSecret_AppRoleAuthOption{}+ mi := &file_store_instance_proto_msgTypes[9]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *DataSourceExternalSecret_AppRoleAuthOption) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DataSourceExternalSecret_AppRoleAuthOption) ProtoMessage() {}++func (x *DataSourceExternalSecret_AppRoleAuthOption) ProtoReflect() protoreflect.Message {+ mi := &file_store_instance_proto_msgTypes[9]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DataSourceExternalSecret_AppRoleAuthOption.ProtoReflect.Descriptor instead.+func (*DataSourceExternalSecret_AppRoleAuthOption) Descriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{5, 0}+}++func (x *DataSourceExternalSecret_AppRoleAuthOption) GetRoleId() string {+ if x != nil {+ return x.RoleId+ }+ return ""+}++func (x *DataSourceExternalSecret_AppRoleAuthOption) GetSecretId() string {+ if x != nil {+ return x.SecretId+ }+ return ""+}++func (x *DataSourceExternalSecret_AppRoleAuthOption) GetType() DataSourceExternalSecret_AppRoleAuthOption_SecretType {+ if x != nil {+ return x.Type+ }+ return DataSourceExternalSecret_AppRoleAuthOption_SECRET_TYPE_UNSPECIFIED+}++func (x *DataSourceExternalSecret_AppRoleAuthOption) GetMountPath() string {+ if x != nil {+ return x.MountPath+ }+ return ""+}++var File_store_instance_proto protoreflect.FileDescriptor++var file_store_instance_proto_rawDesc = string([]byte{+ 0x0a, 0x14, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,+ 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x03, 0x0a, 0x10, 0x49, 0x6e, 0x73, 0x74,+ 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x1c,+ 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x63, 0x61, 0x73, 0x65,+ 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01,+ 0x28, 0x05, 0x52, 0x18, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x61,+ 0x73, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0e,+ 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,+ 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x32,+ 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x49,+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c,+ 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72,+ 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61,+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76,+ 0x61, 0x6c, 0x12, 0x2f, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6f,+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,+ 0x12, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,+ 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x61, 0x74, 0x61,+ 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x79, 0x6e,+ 0x63, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x61,+ 0x74, 0x61, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,+ 0x32, 0x1a, 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, 0x52, 0x0b, 0x64, 0x61,+ 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0xce, 0x01, 0x0a, 0x0c, 0x49, 0x6e,+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e,+ 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d,+ 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x6e,+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x24,+ 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x03, 0x20,+ 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69,+ 0x6c, 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,+ 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69,+ 0x62, 0x75, 0x74, 0x65, 0x88, 0x01, 0x01, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x63, 0x6f, 0x6e, 0x6e,+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x0e, 0x0a, 0x0c,+ 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x42, 0x0c, 0x0a, 0x0a,+ 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x9b, 0x11, 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, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70,+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 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, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a,+ 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73,+ 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,+ 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f,+ 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12,+ 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,+ 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x07,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2c,+ 0x0a, 0x12, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x73, 0x6c,+ 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x62, 0x66, 0x75,+ 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x73, 0x6c, 0x4b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x13,+ 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x63,+ 0x65, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x62, 0x66, 0x75, 0x73,+ 0x63, 0x61, 0x74, 0x65, 0x64, 0x53, 0x73, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x12, 0x2a, 0x0a, 0x11,+ 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x63,+ 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61,+ 0x74, 0x65, 0x64, 0x53, 0x73, 0x6c, 0x43, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72, 0x76, 0x18,+ 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x73, 0x72, 0x76, 0x12, 0x37, 0x0a, 0x17, 0x61, 0x75,+ 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74,+ 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x75, 0x74,+ 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x62,+ 0x61, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x03, 0x73, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72,+ 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f,+ 0x68, 0x6f, 0x73, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x73, 0x68, 0x48,+ 0x6f, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18,+ 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x73, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x19,+ 0x0a, 0x08, 0x73, 0x73, 0x68, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x07, 0x73, 0x73, 0x68, 0x55, 0x73, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x73, 0x68,+ 0x5f, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x73, 0x73,+ 0x77, 0x6f, 0x72, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x73, 0x68, 0x4f,+ 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,+ 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x73, 0x73, 0x68, 0x5f, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61,+ 0x74, 0x65, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18,+ 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x73, 0x73, 0x68, 0x4f, 0x62, 0x66, 0x75, 0x73, 0x63,+ 0x61, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x51,+ 0x0a, 0x25, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,+ 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6f, 0x62, 0x66,+ 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x22, 0x61,+ 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x69,+ 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65,+ 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x65,+ 0x63, 0x72, 0x65, 0x74, 0x18, 0x15, 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, 0x12, 0x5e, 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, 0x2d, 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, 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, 0x12, 0x6d, 0x0a, 0x18, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73,+ 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,+ 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 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, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43,+ 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x16, 0x63, 0x6c, 0x69,+ 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,+ 0x69, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x61, 0x73, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66,+ 0x69, 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x41, 0x53, 0x4c, 0x43, 0x6f,+ 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x73, 0x61, 0x73, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,+ 0x12, 0x55, 0x0a, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x61,+ 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22,+ 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, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65,+ 0x73, 0x73, 0x52, 0x13, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x64,+ 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6c, 0x69,+ 0x63, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65,+ 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x69, 0x72, 0x65,+ 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1b, 0x20,+ 0x01, 0x28, 0x08, 0x52, 0x10, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65,+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18,+ 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a,+ 0x0c, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1d, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x0b, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x49, 0x64,+ 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,+ 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d,+ 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72,+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x73, 0x74,+ 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x6d, 0x61,+ 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f,+ 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18,+ 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x62, 0x66, 0x75, 0x73, 0x63, 0x61, 0x74, 0x65, 0x64,+ 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x43, 0x0a, 0x0a, 0x72, 0x65, 0x64, 0x69,+ 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 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, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x54, 0x79,+ 0x70, 0x65, 0x52, 0x09, 0x72, 0x65, 0x64, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a,+ 0x07, 0x75, 0x73, 0x65, 0x5f, 0x73, 0x73, 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,+ 0x75, 0x73, 0x65, 0x53, 0x73, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,+ 0x72, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,+ 0x12, 0x79, 0x0a, 0x1b, 0x65, 0x78, 0x74, 0x72, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18,+ 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 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, 0x2e, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,+ 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,+ 0x52, 0x19, 0x65, 0x78, 0x74, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,+ 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x77, 0x0a, 0x16, 0x43,+ 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65,+ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f,+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74,+ 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12,+ 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65,+ 0x63, 0x72, 0x65, 0x74, 0x1a, 0x31, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12,+ 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68,+ 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x4c, 0x0a, 0x1e, 0x45, 0x78, 0x74, 0x72, 0x61,+ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,+ 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,+ 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7c, 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, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x57, 0x53, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x49,+ 0x41, 0x4d, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x49, 0x41,+ 0x4d, 0x10, 0x04, 0x22, 0x52, 0x0a, 0x09, 0x52, 0x65, 0x64, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65,+ 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x44, 0x49, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a,+ 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x4c, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08,+ 0x53, 0x45, 0x4e, 0x54, 0x49, 0x4e, 0x45, 0x4c, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4c,+ 0x55, 0x53, 0x54, 0x45, 0x52, 0x10, 0x03, 0x42, 0x0f, 0x0a, 0x0d, 0x69, 0x61, 0x6d, 0x5f, 0x65,+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5a, 0x0a, 0x0a, 0x53, 0x41, 0x53, 0x4c,+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0a, 0x6b, 0x72, 0x62, 0x5f, 0x63, 0x6f,+ 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x4b, 0x65, 0x72, 0x62,+ 0x65, 0x72, 0x6f, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x6b, 0x72,+ 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0b, 0x0a, 0x09, 0x6d, 0x65, 0x63, 0x68, 0x61,+ 0x6e, 0x69, 0x73, 0x6d, 0x22, 0xe0, 0x01, 0x0a, 0x0e, 0x4b, 0x65, 0x72, 0x62, 0x65, 0x72, 0x6f,+ 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61,+ 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72,+ 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a,+ 0x05, 0x72, 0x65, 0x61, 0x6c, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x72, 0x65,+ 0x61, 0x6c, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x18, 0x04, 0x20,+ 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x12, 0x19, 0x0a, 0x08, 0x6b,+ 0x64, 0x63, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b,+ 0x64, 0x63, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x64, 0x63, 0x5f, 0x70, 0x6f,+ 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x64, 0x63, 0x50, 0x6f, 0x72,+ 0x74, 0x12, 0x34, 0x0a, 0x16, 0x6b, 0x64, 0x63, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,+ 0x72, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x14, 0x6b, 0x64, 0x63, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50,+ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x81, 0x07, 0x0a, 0x18, 0x44, 0x61, 0x74, 0x61,+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65,+ 0x63, 0x72, 0x65, 0x74, 0x12, 0x54, 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x74,+ 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 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, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a,+ 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,+ 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x4e, 0x0a, 0x09,+ 0x61, 0x75, 0x74, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,+ 0x31, 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, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79,+ 0x70, 0x65, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x57, 0x0a, 0x08,+ 0x61, 0x70, 0x70, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a,+ 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, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65,+ 0x41, 0x75, 0x74, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x61, 0x70,+ 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05,+ 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x0a,+ 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f,+ 0x0a, 0x0b, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12,+ 0x2a, 0x0a, 0x11, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f,+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x73, 0x73,+ 0x77, 0x6f, 0x72, 0x64, 0x4b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x8a, 0x02, 0x0a, 0x11,+ 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f,+ 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65,+ 0x63, 0x72, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73,+ 0x65, 0x63, 0x72, 0x65, 0x74, 0x49, 0x64, 0x12, 0x59, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,+ 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 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, 0x2e,+ 0x41, 0x70, 0x70, 0x52, 0x6f, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f,+ 0x6e, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,+ 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68,+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74,+ 0x68, 0x22, 0x45, 0x0a, 0x0a, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12,+ 0x1b, 0x0a, 0x17, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,+ 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x4e, 0x56, 0x49, 0x52,+ 0x4f, 0x4e, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x22, 0x6c, 0x0a, 0x0a, 0x53, 0x65, 0x63, 0x72,+ 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x41, 0x45, 0x43, 0x52, 0x45,+ 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x56, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x4b, 0x56,+ 0x5f, 0x56, 0x32, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x57, 0x53, 0x5f, 0x53, 0x45, 0x43,+ 0x52, 0x45, 0x54, 0x53, 0x5f, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x52, 0x10, 0x02, 0x12, 0x16,+ 0x0a, 0x12, 0x47, 0x43, 0x50, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x5f, 0x4d, 0x41, 0x4e,+ 0x41, 0x47, 0x45, 0x52, 0x10, 0x03, 0x22, 0x44, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79,+ 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x48, 0x5f, 0x54, 0x59, 0x50, 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, 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, 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 (+ file_store_instance_proto_rawDescOnce sync.Once+ file_store_instance_proto_rawDescData []byte+)++func file_store_instance_proto_rawDescGZIP() []byte {+ file_store_instance_proto_rawDescOnce.Do(func() {+ file_store_instance_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_instance_proto_rawDesc), len(file_store_instance_proto_rawDesc)))+ })+ return file_store_instance_proto_rawDescData+}++var file_store_instance_proto_enumTypes = make([]protoimpl.EnumInfo, 6)+var file_store_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 10)+var file_store_instance_proto_goTypes = []any{+ (DataSourceType)(0), // 0: bytebase.store.DataSourceType+ (DataSource_AuthenticationType)(0), // 1: bytebase.store.DataSource.AuthenticationType+ (DataSource_RedisType)(0), // 2: bytebase.store.DataSource.RedisType+ (DataSourceExternalSecret_SecretType)(0), // 3: bytebase.store.DataSourceExternalSecret.SecretType+ (DataSourceExternalSecret_AuthType)(0), // 4: bytebase.store.DataSourceExternalSecret.AuthType+ (DataSourceExternalSecret_AppRoleAuthOption_SecretType)(0), // 5: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ (*InstanceMetadata)(nil), // 6: bytebase.store.InstanceMetadata+ (*InstanceRole)(nil), // 7: bytebase.store.InstanceRole+ (*DataSource)(nil), // 8: bytebase.store.DataSource+ (*SASLConfig)(nil), // 9: bytebase.store.SASLConfig+ (*KerberosConfig)(nil), // 10: bytebase.store.KerberosConfig+ (*DataSourceExternalSecret)(nil), // 11: bytebase.store.DataSourceExternalSecret+ (*DataSource_ClientSecretCredential)(nil), // 12: bytebase.store.DataSource.ClientSecretCredential+ (*DataSource_Address)(nil), // 13: bytebase.store.DataSource.Address+ nil, // 14: bytebase.store.DataSource.ExtraConnectionParametersEntry+ (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 15: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption+ (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp+ (*durationpb.Duration)(nil), // 17: google.protobuf.Duration+}+var file_store_instance_proto_depIdxs = []int32{+ 16, // 0: bytebase.store.InstanceMetadata.last_sync_time:type_name -> google.protobuf.Timestamp+ 7, // 1: bytebase.store.InstanceMetadata.roles:type_name -> bytebase.store.InstanceRole+ 17, // 2: bytebase.store.InstanceMetadata.sync_interval:type_name -> google.protobuf.Duration+ 8, // 3: bytebase.store.InstanceMetadata.data_sources:type_name -> bytebase.store.DataSource+ 0, // 4: bytebase.store.DataSource.type:type_name -> bytebase.store.DataSourceType+ 11, // 5: bytebase.store.DataSource.external_secret:type_name -> bytebase.store.DataSourceExternalSecret+ 1, // 6: bytebase.store.DataSource.authentication_type:type_name -> bytebase.store.DataSource.AuthenticationType+ 12, // 7: bytebase.store.DataSource.client_secret_credential:type_name -> bytebase.store.DataSource.ClientSecretCredential+ 9, // 8: bytebase.store.DataSource.sasl_config:type_name -> bytebase.store.SASLConfig+ 13, // 9: bytebase.store.DataSource.additional_addresses:type_name -> bytebase.store.DataSource.Address+ 2, // 10: bytebase.store.DataSource.redis_type:type_name -> bytebase.store.DataSource.RedisType+ 14, // 11: bytebase.store.DataSource.extra_connection_parameters:type_name -> bytebase.store.DataSource.ExtraConnectionParametersEntry+ 10, // 12: bytebase.store.SASLConfig.krb_config:type_name -> bytebase.store.KerberosConfig+ 3, // 13: bytebase.store.DataSourceExternalSecret.secret_type:type_name -> bytebase.store.DataSourceExternalSecret.SecretType+ 4, // 14: bytebase.store.DataSourceExternalSecret.auth_type:type_name -> bytebase.store.DataSourceExternalSecret.AuthType+ 15, // 15: bytebase.store.DataSourceExternalSecret.app_role:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption+ 5, // 16: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ 17, // [17:17] is the sub-list for method output_type+ 17, // [17:17] is the sub-list for method input_type+ 17, // [17:17] is the sub-list for extension type_name+ 17, // [17:17] is the sub-list for extension extendee+ 0, // [0:17] is the sub-list for field type_name+}++func init() { file_store_instance_proto_init() }+func file_store_instance_proto_init() {+ if File_store_instance_proto != nil {+ return+ }+ file_store_instance_proto_msgTypes[1].OneofWrappers = []any{}+ file_store_instance_proto_msgTypes[2].OneofWrappers = []any{+ (*DataSource_ClientSecretCredential_)(nil),+ }+ file_store_instance_proto_msgTypes[3].OneofWrappers = []any{+ (*SASLConfig_KrbConfig)(nil),+ }+ file_store_instance_proto_msgTypes[5].OneofWrappers = []any{+ (*DataSourceExternalSecret_AppRole)(nil),+ (*DataSourceExternalSecret_Token)(nil),}- file_store_instance_proto_msgTypes[1].OneofWrappers = []any{}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_instance_proto_rawDesc), len(file_store_instance_proto_rawDesc)),- NumEnums: 0,- NumMessages: 2,+ NumEnums: 6,+ NumMessages: 10,NumExtensions: 0,NumServices: 0,},GoTypes: file_store_instance_proto_goTypes,DependencyIndexes: file_store_instance_proto_depIdxs,+ EnumInfos: file_store_instance_proto_enumTypes,MessageInfos: file_store_instance_proto_msgTypes,}.Build()File_store_instance_proto = out.Filediff --git a/proto/store/data_source.proto b/proto/store/data_source.protoindex d7f982dcf7..23767848cf 100644--- a/proto/store/data_source.proto+++ b/proto/store/data_source.proto@@ -3,181 +3,3 @@ syntax = "proto3";package bytebase.store;option go_package = "generated-go/store";--message DataSourceOptions {- string id = 1;- DataSourceType type = 2;- string host = 3;- string port = 4;- string username = 5;- string obfuscated_password = 6;- string database = 7;- string obfuscated_ssl_key = 8;- string obfuscated_ssl_cert = 9;- string obfuscated_ssl_ca = 10;-- // srv is a boolean flag that indicates whether the host is a DNS SRV record.- bool srv = 11;-- // authentication_database is the database name to authenticate against, which stores the user credentials.- string authentication_database = 12;-- // sid and service_name are used for Oracle.- string sid = 13;- string service_name = 14;- // SSH related- // The hostname of the SSH server agent.- string ssh_host = 15;- // The port of the SSH server agent. It's 22 typically.- string ssh_port = 16;- // The user to login the server.- string ssh_user = 17;- // The password to login the server. If it's empty string, no password is required.- string ssh_obfuscated_password = 18;- // 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").- string ssh_obfuscated_private_key = 19;-- // 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.- string authentication_private_key_obfuscated = 20;-- DataSourceExternalSecret external_secret = 21;-- enum AuthenticationType {- AUTHENTICATION_UNSPECIFIED = 0;- PASSWORD = 1;- GOOGLE_CLOUD_SQL_IAM = 2;- AWS_RDS_IAM = 3;- AZURE_IAM = 4;- }-- AuthenticationType authentication_type = 22;-- message ClientSecretCredential {- string tenant_id = 1;- string client_id = 2;- string client_secret = 3;- }- oneof iam_extension {- ClientSecretCredential client_secret_credential = 23;- }-- SASLConfig sasl_config = 24;-- message Address {- string host = 1;- string port = 2;- }- // additional_addresses is used for MongoDB replica set.- repeated Address additional_addresses = 25;- // replica_set is used for MongoDB replica set.- string replica_set = 26;-- // direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.- bool direct_connection = 27;-- // region is the location of where the DB is, works for AWS RDS. For example, us-east-1.- string region = 28;-- // warehouse_id is used by Databricks.- string warehouse_id = 29;-- // master_name is the master name used by connecting redis-master via redis sentinel.- string master_name = 30;-- // master_username and master_obfuscated_password are master credentials used by redis sentinel mode.- string master_username = 31;- string master_obfuscated_password = 32;-- enum RedisType {- REDIS_TYPE_UNSPECIFIED = 0;- STANDALONE = 1;- SENTINEL = 2;- CLUSTER = 3;- }- RedisType redis_type = 33;-- // Use SSL to connect to the data source. By default, we use system default SSL configuration.- bool use_ssl = 34;-- // Cluster is the cluster name for the data source. Used by CockroachDB.- string cluster = 35;-- // Extra connection parameters for the database connection.- // For PostgreSQL HA, this can be used to set target_session_attrs=read-write- map<string, string> extra_connection_parameters = 36;-}--message SASLConfig {- oneof mechanism {- KerberosConfig krb_config = 1;- }-}--message KerberosConfig {- string primary = 1;- string instance = 2;- string realm = 3;- bytes keytab = 4;- string kdc_host = 5;- string kdc_port = 6;- string kdc_transport_protocol = 7;-}--enum DataSourceType {- DATA_SOURCE_UNSPECIFIED = 0;- ADMIN = 1;- READ_ONLY = 2;-}--message DataSourceExternalSecret {- enum SecretType {- SAECRET_TYPE_UNSPECIFIED = 0;- // ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2- VAULT_KV_V2 = 1;- // ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html- AWS_SECRETS_MANAGER = 2;- // ref: https://cloud.google.com/secret-manager/docs- GCP_SECRET_MANAGER = 3;- }- SecretType secret_type = 1;- string url = 2;-- enum AuthType {- AUTH_TYPE_UNSPECIFIED = 0;- // ref: https://developer.hashicorp.com/vault/docs/auth/token- TOKEN = 1;- // ref: https://developer.hashicorp.com/vault/docs/auth/approle- VAULT_APP_ROLE = 2;- }- AuthType auth_type = 3;-- message AppRoleAuthOption {- string role_id = 1;- // the secret id for the role without ttl.- string secret_id = 2;-- enum SecretType {- SECRET_TYPE_UNSPECIFIED = 0;- PLAIN = 1;- ENVIRONMENT = 2;- }-- SecretType type = 3;-- // The path where the approle auth method is mounted.- string mount_path = 4;- }-- oneof auth_option {- AppRoleAuthOption app_role = 4;- string token = 5;- }-- // engine name is the name for secret engine.- string engine_name = 6;- // the secret name in the engine to store the password.- string secret_name = 7;- // the key name for the password.- string password_key_name = 8;-}diff --git a/proto/store/instance.proto b/proto/store/instance.protoindex 087c6ffa4c..a3c01bd48e 100644--- a/proto/store/instance.proto+++ b/proto/store/instance.proto@@ -27,6 +27,8 @@ message InstanceMetadata {// Enable sync for following databases.// Default empty, means sync all schemas & databases.repeated string sync_databases = 6;++ repeated DataSource data_sources = 7;}// InstanceRole is the API message for instance role.@@ -45,3 +47,181 @@ message InstanceRole {// For MySQL, it's the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.htmloptional string attribute = 4;}++message DataSource {+ string id = 1;+ DataSourceType type = 2;+ string host = 3;+ string port = 4;+ string username = 5;+ string obfuscated_password = 6;+ string database = 7;+ string obfuscated_ssl_key = 8;+ string obfuscated_ssl_cert = 9;+ string obfuscated_ssl_ca = 10;++ // srv is a boolean flag that indicates whether the host is a DNS SRV record.+ bool srv = 11;++ // authentication_database is the database name to authenticate against, which stores the user credentials.+ string authentication_database = 12;++ // sid and service_name are used for Oracle.+ string sid = 13;+ string service_name = 14;+ // SSH related+ // The hostname of the SSH server agent.+ string ssh_host = 15;+ // The port of the SSH server agent. It's 22 typically.+ string ssh_port = 16;+ // The user to login the server.+ string ssh_user = 17;+ // The password to login the server. If it's empty string, no password is required.+ string ssh_obfuscated_password = 18;+ // 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").+ string ssh_obfuscated_private_key = 19;++ // 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.+ string authentication_private_key_obfuscated = 20;++ DataSourceExternalSecret external_secret = 21;++ enum AuthenticationType {+ AUTHENTICATION_UNSPECIFIED = 0;+ PASSWORD = 1;+ GOOGLE_CLOUD_SQL_IAM = 2;+ AWS_RDS_IAM = 3;+ AZURE_IAM = 4;+ }++ AuthenticationType authentication_type = 22;++ message ClientSecretCredential {+ string tenant_id = 1;+ string client_id = 2;+ string client_secret = 3;+ }+ oneof iam_extension {+ ClientSecretCredential client_secret_credential = 23;+ }++ SASLConfig sasl_config = 24;++ message Address {+ string host = 1;+ string port = 2;+ }+ // additional_addresses is used for MongoDB replica set.+ repeated Address additional_addresses = 25;+ // replica_set is used for MongoDB replica set.+ string replica_set = 26;++ // direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.+ bool direct_connection = 27;++ // region is the location of where the DB is, works for AWS RDS. For example, us-east-1.+ string region = 28;++ // warehouse_id is used by Databricks.+ string warehouse_id = 29;++ // master_name is the master name used by connecting redis-master via redis sentinel.+ string master_name = 30;++ // master_username and master_obfuscated_password are master credentials used by redis sentinel mode.+ string master_username = 31;+ string master_obfuscated_password = 32;++ enum RedisType {+ REDIS_TYPE_UNSPECIFIED = 0;+ STANDALONE = 1;+ SENTINEL = 2;+ CLUSTER = 3;+ }+ RedisType redis_type = 33;++ // Use SSL to connect to the data source. By default, we use system default SSL configuration.+ bool use_ssl = 34;++ // Cluster is the cluster name for the data source. Used by CockroachDB.+ string cluster = 35;++ // Extra connection parameters for the database connection.+ // For PostgreSQL HA, this can be used to set target_session_attrs=read-write+ map<string, string> extra_connection_parameters = 36;+}++message SASLConfig {+ oneof mechanism {+ KerberosConfig krb_config = 1;+ }+}++message KerberosConfig {+ string primary = 1;+ string instance = 2;+ string realm = 3;+ bytes keytab = 4;+ string kdc_host = 5;+ string kdc_port = 6;+ string kdc_transport_protocol = 7;+}++enum DataSourceType {+ DATA_SOURCE_UNSPECIFIED = 0;+ ADMIN = 1;+ READ_ONLY = 2;+}++message DataSourceExternalSecret {+ enum SecretType {+ SAECRET_TYPE_UNSPECIFIED = 0;+ // ref: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2+ VAULT_KV_V2 = 1;+ // ref: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html+ AWS_SECRETS_MANAGER = 2;+ // ref: https://cloud.google.com/secret-manager/docs+ GCP_SECRET_MANAGER = 3;+ }+ SecretType secret_type = 1;+ string url = 2;++ enum AuthType {+ AUTH_TYPE_UNSPECIFIED = 0;+ // ref: https://developer.hashicorp.com/vault/docs/auth/token+ TOKEN = 1;+ // ref: https://developer.hashicorp.com/vault/docs/auth/approle+ VAULT_APP_ROLE = 2;+ }+ AuthType auth_type = 3;++ message AppRoleAuthOption {+ string role_id = 1;+ // the secret id for the role without ttl.+ string secret_id = 2;++ enum SecretType {+ SECRET_TYPE_UNSPECIFIED = 0;+ PLAIN = 1;+ ENVIRONMENT = 2;+ }++ SecretType type = 3;++ // The path where the approle auth method is mounted.+ string mount_path = 4;+ }++ oneof auth_option {+ AppRoleAuthOption app_role = 4;+ string token = 5;+ }++ // engine name is the name for secret engine.+ string engine_name = 6;+ // the secret name in the engine to store the password.+ string secret_name = 7;+ // the key name for the password.+ string password_key_name = 8;+}