项目作者: beyondstorage

项目描述 :
QingStor Object Storage support for go-storage.
高级语言: Go
项目地址: git://github.com/beyondstorage/go-service-qingstor.git
创建时间: 2020-07-01T09:29:09Z
项目社区:https://github.com/beyondstorage/go-service-qingstor

开源协议:Apache License 2.0

下载


go-services-qingstor

QingStor Object Storage service support for go-storage.

Notes

This package has been moved to go-storage.

  1. go get go.beyondstorage.io/services/qingstor/v4

Install

  1. go get github.com/beyondstorage/go-service-qingstor/v3

Usage

  1. import (
  2. "log"
  3. _ "github.com/beyondstorage/go-service-qingstor/v3"
  4. "github.com/beyondstorage/go-storage/v4/services"
  5. )
  6. func main() {
  7. store, err := services.NewStoragerFromString("qingstor://bucket_name/path/to/workdir?credential=hmac:access_key_id:secret_access_key&endpoint=https:qingstor.com")
  8. if err != nil {
  9. log.Fatal(err)
  10. }
  11. // Write data from io.Reader into hello.txt
  12. n, err := store.Write("hello.txt", r, length)
  13. }