diff --git a/.gitignore b/.gitignore index b2d6de30..41d83e21 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +# Jetbrain IDE +.idea +*.iml diff --git a/docs/go-storage/services/bos.md b/docs/go-storage/services/bos.md new file mode 100644 index 00000000..41d4bc84 --- /dev/null +++ b/docs/go-storage/services/bos.md @@ -0,0 +1,60 @@ +[Baidu Object Storage](https://cloud.baidu.com/product/bos.html) + +## Project + + + +## Config + +### Servicer + +| Name | Required | Comments | +| ---- | -------- | -------- | +| [credential](../pairs/credential.md) | Y | only support `hmac` protocol | +| [endpoint](../pairs/endpoint.md) | Y | specific domain to access this storager | + +### Storager + +| Name | Required | Comments | +| ---- | -------- | -------- | +| [name](../pairs/name.md) | Y | bucket name | +| [work_dir](../pairs/work_dir.md) | N | work dir | + +## Example + +Init servicer (see [this page](../operations/index.md) for details) + +```go +import ( + _ "github.com/beyondstorage/go-service-bos" + "github.com/beyondstorage/go-storage/v4/services" +) + +srv, err := services.NewServicerFromString("bos://?credential=hmac:access_key_id:secret_access_key&endpoint=https:.bcebos.com") +if err != nil { + log.Fatalf("bos new service: %v", err) +} +``` + +Init storager (see [this page](../operations/index.md) for details) + +```go +import ( + _ "github.com/beyondstorage/go-service-bos" + "github.com/beyondstorage/go-storage/v4/services" +) + +store, err := services.NewStoragerFromString("bos:///path/to/workdir?credential=hmac:access_key_id:secret_access_key&endpoint=https:.bcebos.com") +if err != nil { + log.Fatalf("bos new service: %v", err) +} +``` + +## Implementation + +This service implements following interfaces: + +- [Servicer](../operations/servicer/index.md) + +- [Storager](../operations/storager/index.md) + diff --git a/docs/go-storage/services/obs.md b/docs/go-storage/services/obs.md new file mode 100644 index 00000000..d07cbf98 --- /dev/null +++ b/docs/go-storage/services/obs.md @@ -0,0 +1,60 @@ +[Huawei Object Storage Service](https://www.huaweicloud.com/product/obs.html) + +## Project + + + +## Config + +### Servicer + +| Name | Required | Comments | +| ---- | -------- | -------- | +| [credential](../pairs/credential.md) | Y | only support `hmac` protocol | +| [endpoint](../pairs/endpoint.md) | Y | specific domain to access this storager | + +### Storager + +| Name | Required | Comments | +| ---- | -------- | -------- | +| [name](../pairs/name.md) | Y | bucket name | +| [work_dir](../pairs/work_dir.md) | N | work dir | + +## Example + +Init servicer (see [this page](../operations/index.md) for details) + +```go +import ( + _ "github.com/beyondstorage/go-service-obs" + "github.com/beyondstorage/go-storage/v4/services" +) + +srv, err := services.NewServicerFromString("obs://?credential=hmac:access_key_id:secret_access_key&endpoint=https:obs..myhuaweicloud.com") +if err != nil { + log.Fatalf("obs new service: %v", err) +} +``` + +Init storager (see [this page](../operations/index.md) for details) + +```go +import ( + _ "github.com/beyondstorage/go-service-obs" + "github.com/beyondstorage/go-storage/v4/services" +) + +store, err := services.NewStoragerFromString("obs:///path/to/workdir?credential=hmac:access_key_id:secret_access_key&endpoint=https:obs..myhuaweicloud.com") +if err != nil { + log.Fatalf("obs new service: %v", err) +} +``` + +## Implementation + +This service implements following interfaces: + +- [Servicer](../operations/servicer/index.md) + +- [Storager](../operations/storager/index.md) +