Skip to content

Commit 4ff94c4

Browse files
sync upstream
1 parent 17b8be9 commit 4ff94c4

8 files changed

Lines changed: 268 additions & 11 deletions

File tree

gen/gitlab/instance.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/loadbalancer/networkloadbalancer.go

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/ytsaurus/cluster.go

Lines changed: 191 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/ytsaurus/ytsaurus_group.go

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/hashicorp/go-multierror v1.1.1
1313
github.com/mitchellh/go-testing-interface v1.14.1
1414
github.com/stretchr/testify v1.9.0
15-
github.com/yandex-cloud/go-genproto v0.11.0
15+
github.com/yandex-cloud/go-genproto v0.12.0
1616
golang.org/x/net v0.28.0
1717
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1
1818
google.golang.org/grpc v1.66.2

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ github.com/yandex-cloud/go-genproto v0.6.0 h1:Q5rSpuD0FhNrbWnlyHhMWDyLoniC4vzVDk
3232
github.com/yandex-cloud/go-genproto v0.6.0/go.mod h1:0LDD/IZLIUIV4iPH+YcF+jysO3jkSvADFGm4dCAuwQo=
3333
github.com/yandex-cloud/go-genproto v0.7.0 h1:f44FPYCcTpTNnWkOm0/x78vyPq22vm0fvxZbyUGLYMA=
3434
github.com/yandex-cloud/go-genproto v0.7.0/go.mod h1:0LDD/IZLIUIV4iPH+YcF+jysO3jkSvADFGm4dCAuwQo=
35-
github.com/yandex-cloud/go-genproto v0.9.0 h1:22xkDy3bOSIFlKz02EPRPo6hSLychAHuF5ag833yRbg=
36-
github.com/yandex-cloud/go-genproto v0.9.0/go.mod h1:0LDD/IZLIUIV4iPH+YcF+jysO3jkSvADFGm4dCAuwQo=
37-
github.com/yandex-cloud/go-genproto v0.11.0 h1:TOyaUQxRE+xRuZqk48GVIPxUsIaD9z/6A0rCZifDhOw=
38-
github.com/yandex-cloud/go-genproto v0.11.0/go.mod h1:0LDD/IZLIUIV4iPH+YcF+jysO3jkSvADFGm4dCAuwQo=
35+
github.com/yandex-cloud/go-genproto v0.12.0 h1:jg8UhoVs0+XpZW9cttdyOTFsCSmhyB1Qsf962UW1/Qg=
36+
github.com/yandex-cloud/go-genproto v0.12.0/go.mod h1:0LDD/IZLIUIV4iPH+YcF+jysO3jkSvADFGm4dCAuwQo=
3937
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
4038
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
4139
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=

sdkresolvers/bucket_resolver.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77

88
storage "github.com/yandex-cloud/go-genproto/yandex/cloud/storage/v1"
99
ycsdk "github.com/yandex-cloud/go-sdk"
10+
"github.com/yandex-cloud/go-sdk/pkg/sdkerrors"
1011
)
1112

1213
type bucketResolver struct {
@@ -20,13 +21,16 @@ func BucketResolver(name string, opts ...ResolveOption) ycsdk.Resolver {
2021
}
2122

2223
func (r *bucketResolver) Run(ctx context.Context, sdk *ycsdk.SDK, opts ...grpc.CallOption) error {
23-
err := r.ensureFolderID()
24+
resp, err := sdk.StorageAPI().Bucket().Get(ctx, &storage.GetBucketRequest{
25+
Name: r.Name,
26+
View: storage.GetBucketRequest_VIEW_BASIC,
27+
}, opts...)
28+
2429
if err != nil {
25-
return err
30+
return sdkerrors.WithMessagef(err, "failed to find %v with name \"%v\" %v", r.resolvingObjectType, r.Name, r.coordinates())
2631
}
2732

28-
resp, err := sdk.StorageAPI().Bucket().List(ctx, &storage.ListBucketsRequest{
29-
FolderId: r.FolderID(),
30-
}, opts...)
31-
return r.findName(resp.GetBuckets(), err)
33+
r.SetID(resp.ResourceId)
34+
35+
return nil
3236
}

ytsaurus.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package ycsdk
2+
3+
import (
4+
"github.com/yandex-cloud/go-sdk/gen/ytsaurus"
5+
)
6+
7+
const (
8+
YTsaurusServiceID Endpoint = "ytsaurus"
9+
)
10+
11+
func (sdk *SDK) YTsaurus() *ytsaurus.YTsaurus {
12+
return ytsaurus.NewYTsaurus(sdk.getConn(YTsaurusServiceID))
13+
}

0 commit comments

Comments
 (0)