Skip to content

Commit

Permalink
docs: add file api tencent cloud oss english doc (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
stulzq authored Feb 25, 2022
1 parent cd5cf34 commit a4cd3ed
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ ignore:
- "pkg/wasm/watcher.go"
- "cmd/**/*"
- "components/lock/consul/consul_lock_task.go"
- "components/rpc/invoker/mosn/channel/xchannel.go"
48 changes: 48 additions & 0 deletions docs/en/component_specs/file/tencentcloud_oss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Tencent Cloud OSS

## metadata fields

Example:configs/config_file_tencentcloud_oss.json

| Field | Required | Description |
| --- |-----|---------------------------------|
| endpoint | Y | OSS server address |
| accessKeyID | Y | accessKeyID |
| accessKeySecret | Y | accessKeySecret |
| timeout | N | request timeout in milliseconds |

## Prepare

1. Login https://cloud.tencent.com/

2. Create Bucket

visit https://console.cloud.tencent.com/cos/bucket to create bucket

![](../../../img/file/create_tencent_oss_bucket.png)

3.Create AK and SK

visit https://console.cloud.tencent.com/cam/capi to create AK and SK

After the above operation steps are completed, configure endpoint, AK and SK to ` configs/config_file_tencentcloud_oss.JSON` file

## Run layotto

````shell
cd cmd/layotto_multiple_api/
go build -o layotto
./layotto start -c ../../configs/config_file_tencentcloud_oss.json
````

## Run Demo

````shell
cd demo/file/tencentcloud
go build -o oss

./oss put dir/a.txt aaa
./oss get dir/a.txt
./oss list dir/
./oss del dir/a.txt
````

0 comments on commit a4cd3ed

Please sign in to comment.