Skip to content

Commit

Permalink
feat(docs): update docs
Browse files Browse the repository at this point in the history
Updates the Wing docs. See details in [workflow run].

[Workflow Run]: https://github.com/winglang/docsite/actions/runs/7709133937

------

*Automatically created via the "update-docs" workflow*

Signed-off-by: monabot <[email protected]>
  • Loading branch information
monadabot committed Jan 30, 2024
1 parent cb5c704 commit 42f3529
Showing 1 changed file with 116 additions and 4 deletions.
120 changes: 116 additions & 4 deletions versioned_docs/version-latest/04-standard-library/cloud/bucket.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ new cloud.Bucket(props?: BucketProps);
| <code><a href="#@winglang/sdk.cloud.IBucketClient.rename">rename</a></code> | Move an object to a new location in the bucket. |
| <code><a href="#@winglang/sdk.cloud.IBucketClient.signedUrl">signedUrl</a></code> | Returns a signed url to the given file. |
| <code><a href="#@winglang/sdk.cloud.IBucketClient.tryDelete">tryDelete</a></code> | Delete an object from the bucket if it exists. |
| <code><a href="#@winglang/sdk.cloud.IBucketClient.tryGet">tryGet</a></code> | Get an object from the bucket if it exists. |
| <code><a href="#@winglang/sdk.cloud.IBucketClient.tryGet">tryGet</a></code> | Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown. |
| <code><a href="#@winglang/sdk.cloud.IBucketClient.tryGetJson">tryGetJson</a></code> | Gets an object from the bucket if it exists, parsing it as Json. |

---
Expand Down Expand Up @@ -386,11 +386,13 @@ Key of the object.
##### `get` <a name="get" id="@winglang/sdk.cloud.IBucketClient.get"></a>

```wing
inflight get(key: str): str
inflight get(key: str, options?: BucketGetOptions): str
```

Retrieve an object from the bucket.

If the bytes returned are not a valid UTF-8 string, an error is thrown.

###### `key`<sup>Required</sup> <a name="key" id="@winglang/sdk.cloud.IBucketClient.get.parameter.key"></a>

- *Type:* str
Expand All @@ -399,6 +401,14 @@ Key of the object.

---

###### `options`<sup>Optional</sup> <a name="options" id="@winglang/sdk.cloud.IBucketClient.get.parameter.options"></a>

- *Type:* <a href="#@winglang/sdk.cloud.BucketGetOptions">BucketGetOptions</a>

Additional get options.

---

##### `getJson` <a name="getJson" id="@winglang/sdk.cloud.IBucketClient.getJson"></a>

```wing
Expand Down Expand Up @@ -587,10 +597,10 @@ Key of the object.
##### `tryGet` <a name="tryGet" id="@winglang/sdk.cloud.IBucketClient.tryGet"></a>

```wing
inflight tryGet(key: str): str
inflight tryGet(key: str, options?: BucketTryGetOptions): str
```

Get an object from the bucket if it exists.
Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.

###### `key`<sup>Required</sup> <a name="key" id="@winglang/sdk.cloud.IBucketClient.tryGet.parameter.key"></a>

Expand All @@ -600,6 +610,14 @@ Key of the object.

---

###### `options`<sup>Optional</sup> <a name="options" id="@winglang/sdk.cloud.IBucketClient.tryGet.parameter.options"></a>

- *Type:* <a href="#@winglang/sdk.cloud.BucketTryGetOptions">BucketTryGetOptions</a>

Additional get options.

---

##### `tryGetJson` <a name="tryGetJson" id="@winglang/sdk.cloud.IBucketClient.tryGetJson"></a>

```wing
Expand Down Expand Up @@ -754,6 +772,53 @@ Type of event.

---

### BucketGetOptions <a name="BucketGetOptions" id="@winglang/sdk.cloud.BucketGetOptions"></a>

Options for `Bucket.get()`.

#### Initializer <a name="Initializer" id="@winglang/sdk.cloud.BucketGetOptions.Initializer"></a>

```wing
bring cloud;
let BucketGetOptions = cloud.BucketGetOptions{ ... };
```

#### Properties <a name="Properties" id="Properties"></a>

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@winglang/sdk.cloud.BucketGetOptions.property.endByte">endByte</a></code> | <code>num</code> | The ending byte to read up to (including). |
| <code><a href="#@winglang/sdk.cloud.BucketGetOptions.property.startByte">startByte</a></code> | <code>num</code> | The starting byte to read from. |

---

##### `endByte`<sup>Optional</sup> <a name="endByte" id="@winglang/sdk.cloud.BucketGetOptions.property.endByte"></a>

```wing
endByte: num;
```

- *Type:* num
- *Default:* undefined

The ending byte to read up to (including).

---

##### `startByte`<sup>Optional</sup> <a name="startByte" id="@winglang/sdk.cloud.BucketGetOptions.property.startByte"></a>

```wing
startByte: num;
```

- *Type:* num
- *Default:* undefined

The starting byte to read from.

---

### BucketOnCreateOptions <a name="BucketOnCreateOptions" id="@winglang/sdk.cloud.BucketOnCreateOptions"></a>

`onCreate` event options.
Expand Down Expand Up @@ -921,6 +986,53 @@ The duration for the signed URL to expire.

---

### BucketTryGetOptions <a name="BucketTryGetOptions" id="@winglang/sdk.cloud.BucketTryGetOptions"></a>

Options for `Bucket.tryGet()`.

#### Initializer <a name="Initializer" id="@winglang/sdk.cloud.BucketTryGetOptions.Initializer"></a>

```wing
bring cloud;
let BucketTryGetOptions = cloud.BucketTryGetOptions{ ... };
```

#### Properties <a name="Properties" id="Properties"></a>

| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@winglang/sdk.cloud.BucketTryGetOptions.property.endByte">endByte</a></code> | <code>num</code> | The ending byte to read up to (including). |
| <code><a href="#@winglang/sdk.cloud.BucketTryGetOptions.property.startByte">startByte</a></code> | <code>num</code> | The starting byte to read from. |

---

##### `endByte`<sup>Optional</sup> <a name="endByte" id="@winglang/sdk.cloud.BucketTryGetOptions.property.endByte"></a>

```wing
endByte: num;
```

- *Type:* num
- *Default:* undefined

The ending byte to read up to (including).

---

##### `startByte`<sup>Optional</sup> <a name="startByte" id="@winglang/sdk.cloud.BucketTryGetOptions.property.startByte"></a>

```wing
startByte: num;
```

- *Type:* num
- *Default:* undefined

The starting byte to read from.

---

### ObjectMetadata <a name="ObjectMetadata" id="@winglang/sdk.cloud.ObjectMetadata"></a>

Metadata of a bucket object.
Expand Down

0 comments on commit 42f3529

Please sign in to comment.