https://github.com/blakeliafk/aos
aos is abstract object storage
https://github.com/blakeliafk/aos
Last synced: 3 months ago
JSON representation
aos is abstract object storage
- Host: GitHub
- URL: https://github.com/blakeliafk/aos
- Owner: BlakeLiAFK
- Created: 2019-06-04T03:57:25.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-10T14:16:42.000Z (over 4 years ago)
- Last Synced: 2025-02-07T08:23:28.971Z (4 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aos is (是什么)
aos is abstract object storage
aos是一个抽象的对象存储库# support list (支持列表)
* qcloud
* aliyun
* local# usage (使用方式)
```go
// import
import (
"github.com/DGHeroin/aos"
_ "github.com/DGHeroin/aos/qcloud" // import the vender what you want to use
// _ "github.com/DGHeroin/aos/aliyun"
// _ "github.com/DGHeroin/aos/local"
)func new() {
cli, err := aos.New("qcloud", "xxx", "id=111&key=222")
}func put() {
reader := bytes.NewReader([]byte("helloworld!"))
err = cli.Put("some-folder/filename", reader)
}func get() {
resp, err := cli.Get("some-folder/filename")
data, err := ioutil.ReadAll(resp)
resp.Close()
}func delete() {
err = cli.Delete("some-folder/filename")
}```
# Args (参数)
## qcloud
| name | Desc | Example |
|----------|:-------------:|------:|
| id | SecretID | xxxx |
| key | SecretKey | xxx |## aliyun
| name | Desc | Example |
|----------|:-------------:|------:|
| id | SecretID | xxxx |
| key | SecretKey | xxx |
| bucket | BucketName | my-bucket |## local
no args