Skip to content

Commit 9ae802b

Browse files
committed
PHP & Rust SDK docs alignment
1 parent 8daa625 commit 9ae802b

28 files changed

+957
-97
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Функциональность на данный момент не поддерживается.

ydb/docs/ru/core/_includes/work-in-progress.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

ydb/docs/ru/core/recipes/ydb-sdk/auth-access-token.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,16 @@
199199
await using var driver = await Driver.CreateInitialized(config);
200200
```
201201

202+
- Rust
203+
204+
```rust
205+
use ydb::{AccessTokenCredentials, ClientBuilder, YdbResult};
206+
207+
let client = ClientBuilder::new_from_connection_string("grpc://localhost:2136?database=local")?
208+
.with_credentials(AccessTokenCredentials::from(std::env::var("YDB_TOKEN")?))
209+
.client()?;
210+
```
211+
202212
- PHP
203213

204214
```php

ydb/docs/ru/core/recipes/ydb-sdk/auth-anonymous.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,16 @@
159159
await using var driver = await Driver.CreateInitialized(config);
160160
```
161161

162+
- Rust
163+
164+
```rust
165+
use ydb::{AnonymousCredentials, ClientBuilder, YdbResult};
166+
167+
let client = ClientBuilder::new_from_connection_string("grpc://localhost:2136?database=local")?
168+
.with_credentials(AnonymousCredentials::new())
169+
.client()?;
170+
```
171+
162172
- PHP
163173

164174
```php

ydb/docs/ru/core/recipes/ydb-sdk/auth-env.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,16 @@
168168

169169
{% endlist %}
170170

171+
- Rust
172+
173+
```rust
174+
use ydb::{ClientBuilder, FromEnvCredentials, YdbResult};
175+
176+
let client = ClientBuilder::new_from_connection_string(std::env::var("YDB_CONNECTION_STRING")?)?
177+
.with_credentials(FromEnvCredentials::new()?)
178+
.client()?;
179+
```
180+
171181
- PHP
172182

173183
```php

ydb/docs/ru/core/recipes/ydb-sdk/auth-metadata.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@
172172
await using var driver = await Driver.CreateInitialized(config);
173173
```
174174

175+
- Rust
176+
177+
```rust
178+
use ydb::{ClientBuilder, MetadataUrlCredentials, YdbResult};
179+
180+
let client = ClientBuilder::new_from_connection_string("grpc://localhost:2136?database=local")?
181+
.with_credentials(MetadataUrlCredentials::new())
182+
.client()?;
183+
```
184+
175185
- PHP
176186

177187
```php

ydb/docs/ru/core/recipes/ydb-sdk/auth-service-account.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,16 @@
188188
await using var driver = await Driver.CreateInitialized(config);
189189
```
190190

191+
- Rust
192+
193+
```rust
194+
use ydb::{ClientBuilder, ServiceAccountCredentials, YdbResult};
195+
196+
let client = ClientBuilder::new_from_connection_string(std::env::var("YDB_CONNECTION_STRING")?)?
197+
.with_credentials(ServiceAccountCredentials::from_env()?)
198+
.client()?;
199+
```
200+
191201
- PHP
192202

193203
```php

ydb/docs/ru/core/recipes/ydb-sdk/auth-static.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,21 @@
145145
await using var driver = await Driver.CreateInitialized(config);
146146
```
147147

148+
- Rust
149+
150+
```rust
151+
use ydb::{ClientBuilder, StaticCredentials, YdbResult};
152+
153+
let client = ClientBuilder::new_from_connection_string("grpc://localhost:2136?database=local")?
154+
.with_credentials(StaticCredentials::new(
155+
std::env::var("YDB_USER")?,
156+
std::env::var("YDB_PASSWORD")?,
157+
http::Uri::from_static("grpc://localhost:2136"),
158+
"local".into(),
159+
))
160+
.client()?;
161+
```
162+
148163
- PHP
149164

150165
```php

ydb/docs/ru/core/recipes/ydb-sdk/balancing-prefer-local.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170

171171
- JavaScript
172172

173-
{% include [work-in-progress](../../_includes/work-in-progress.md) %}
173+
{% include [feature-not-supported](../../_includes/feature-not-supported.md) %}
174174

175175
- Java
176176

@@ -197,4 +197,12 @@
197197

198198
{% endlist %}
199199

200+
- Rust
201+
202+
{% include [feature-not-supported](../../_includes/feature-not-supported.md) %}
203+
204+
- PHP
205+
206+
{% include [feature-not-supported](../../_includes/feature-not-supported.md) %}
207+
200208
{% endlist %}

ydb/docs/ru/core/recipes/ydb-sdk/balancing-prefer-location.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@
113113

114114
- Python
115115

116-
Функциональность на данный момент не поддерживается.
116+
{% include [feature-not-supported](../../_includes/feature-not-supported.md) %}
117117

118118
- JavaScript
119119

120-
{% include [work-in-progress](../../_includes/work-in-progress.md) %}
120+
{% include [feature-not-supported](../../_includes/feature-not-supported.md) %}
121121

122122
- Java
123123

@@ -146,4 +146,12 @@
146146

147147
{% endlist %}
148148

149+
- Rust
150+
151+
{% include [feature-not-supported](../../_includes/feature-not-supported.md) %}
152+
153+
- PHP
154+
155+
{% include [feature-not-supported](../../_includes/feature-not-supported.md) %}
156+
149157
{% endlist %}

0 commit comments

Comments
 (0)