diff --git a/examples/go.mod b/examples/go.mod index 939c841e2..7c55024f8 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -51,7 +51,7 @@ require ( github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/syndtr/goleveldb v1.0.0 // indirect github.com/yandex-cloud/go-genproto v0.0.0-20220815090733-4c139c0154e2 // indirect - github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77 // indirect + github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01 // indirect github.com/ydb-platform/ydb-go-yc-metadata v0.6.1 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/mod v0.17.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index 2cc93e36c..e4632eb8d 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -1840,8 +1840,8 @@ github.com/ydb-platform/gorm-driver v0.1.3 h1:uewwScbRuCixNPC0LF7gDKvWcB13/iLj76 github.com/ydb-platform/gorm-driver v0.1.3/go.mod h1:49cSoG5J18muQTiKj4StL2dHs1/dB94OitnHOvetK24= github.com/ydb-platform/xorm v0.0.3 h1:MXk42lANB6r/MMLg/XdJfyXJycGUDlCeLiMlLGDKVPw= github.com/ydb-platform/xorm v0.0.3/go.mod h1:hFsU7EUF0o3S+l5c0eyP2yPVjJ0d4gsFdqCsyazzwBc= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77 h1:LY6cI8cP4B9rrpTleZk95+08kl2gF4rixG7+V/dwL6Q= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01 h1:Cg+0iRsXj0Ig+SJHIXjgakqhO87/NEjqvLmC67NIka0= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= github.com/ydb-platform/ydb-go-sdk-auth-environ v0.3.0 h1:JxSvw+Moont8qCmibP2MjSEIHfkWJLkw0fHZemAk+d0= github.com/ydb-platform/ydb-go-sdk-auth-environ v0.3.0/go.mod h1:YzCPoNrTbrXZg9bO2YkbjI6eQLkaRIE9Bq8ponu0g8A= github.com/ydb-platform/ydb-go-sdk-prometheus/v2 v2.0.1 h1:Lsir3AC2VQOTlp8UjZY9zQdCVfWvBNHT3hZn+jSGoo0= diff --git a/go.mod b/go.mod index 3dd558c7c..248f764c1 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/golang-jwt/jwt/v4 v4.4.1 github.com/google/uuid v1.6.0 github.com/jonboulle/clockwork v0.3.0 - github.com/ydb-platform/ydb-go-genproto v0.0.0-20241202100959-d0974e7cf374 + github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01 golang.org/x/net v0.23.0 golang.org/x/sync v0.6.0 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 diff --git a/go.sum b/go.sum index 7b62a4c8c..c5cea7644 100644 --- a/go.sum +++ b/go.sum @@ -65,10 +65,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77 h1:LY6cI8cP4B9rrpTleZk95+08kl2gF4rixG7+V/dwL6Q= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20241202100959-d0974e7cf374 h1:c80Caaypv+t0KEs6oMHExBW4pKyaoq/zoRcSRPzMpoM= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20241202100959-d0974e7cf374/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01 h1:Cg+0iRsXj0Ig+SJHIXjgakqhO87/NEjqvLmC67NIka0= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= diff --git a/scheme/scheme.go b/scheme/scheme.go index 1aeac9777..8844cc4ca 100644 --- a/scheme/scheme.go +++ b/scheme/scheme.go @@ -70,6 +70,7 @@ type Entry struct { Type EntryType Permissions []Permissions EffectivePermissions []Permissions + ShardingInfo []ConsistencyShardingTablet } func (e *Entry) IsDirectory() bool { @@ -115,6 +116,7 @@ func (e *Entry) From(y *Ydb_Scheme.Entry) { Type: entryType(y.GetType()), Permissions: makePermissions(y.GetPermissions()), EffectivePermissions: makePermissions(y.GetEffectivePermissions()), + ShardingInfo: makeShardingInfo(y.GetShardingInfo()), } } @@ -160,6 +162,23 @@ func from(y *Ydb_Scheme.Permissions) (p Permissions) { } } +type ConsistencyShardingTablet struct { + TabletId uint64 + LeftClosed uint64 + RightOpen uint64 +} + +func makeShardingInfo(src []*Ydb_Scheme.ConsistencyShardingTablet) (dst []ConsistencyShardingTablet) { + for _, s := range src { + dst = append(dst, ConsistencyShardingTablet{ + TabletId: s.TabletId, + LeftClosed: s.LeftClosed, + RightOpen: s.RightOpened, + }) + } + return dst +} + type Permissions struct { Subject string PermissionNames []string diff --git a/tests/slo/go.mod b/tests/slo/go.mod index 010475fb6..0efe5db96 100644 --- a/tests/slo/go.mod +++ b/tests/slo/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/procfs v0.8.0 // indirect github.com/syndtr/goleveldb v1.0.0 // indirect github.com/yandex-cloud/go-genproto v0.0.0-20211115083454-9ca41db5ed9e // indirect - github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77 // indirect + github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01 // indirect github.com/ydb-platform/ydb-go-yc v0.12.1 // indirect github.com/ydb-platform/ydb-go-yc-metadata v0.6.1 // indirect golang.org/x/net v0.26.0 // indirect diff --git a/tests/slo/go.sum b/tests/slo/go.sum index e546a38d8..c278fb77c 100644 --- a/tests/slo/go.sum +++ b/tests/slo/go.sum @@ -1827,8 +1827,8 @@ github.com/ydb-platform/gorm-driver v0.1.3 h1:uewwScbRuCixNPC0LF7gDKvWcB13/iLj76 github.com/ydb-platform/gorm-driver v0.1.3/go.mod h1:49cSoG5J18muQTiKj4StL2dHs1/dB94OitnHOvetK24= github.com/ydb-platform/xorm v0.0.3 h1:MXk42lANB6r/MMLg/XdJfyXJycGUDlCeLiMlLGDKVPw= github.com/ydb-platform/xorm v0.0.3/go.mod h1:hFsU7EUF0o3S+l5c0eyP2yPVjJ0d4gsFdqCsyazzwBc= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77 h1:LY6cI8cP4B9rrpTleZk95+08kl2gF4rixG7+V/dwL6Q= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01 h1:Cg+0iRsXj0Ig+SJHIXjgakqhO87/NEjqvLmC67NIka0= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20241218140233-a2e4c5be4f01/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= github.com/ydb-platform/ydb-go-sdk-auth-environ v0.3.0 h1:JxSvw+Moont8qCmibP2MjSEIHfkWJLkw0fHZemAk+d0= github.com/ydb-platform/ydb-go-sdk-auth-environ v0.3.0/go.mod h1:YzCPoNrTbrXZg9bO2YkbjI6eQLkaRIE9Bq8ponu0g8A= github.com/ydb-platform/ydb-go-yc v0.12.1 h1:qw3Fa+T81+Kpu5Io2vYHJOwcrYrVjgJlT6t/0dOXJrA=