Skip to content

Commit

Permalink
feat:add synology NAS in oss
Browse files Browse the repository at this point in the history
  • Loading branch information
xiao-kong-long committed Jan 14, 2024
1 parent 3ff3643 commit 100dbff
Show file tree
Hide file tree
Showing 3 changed files with 606 additions and 0 deletions.
36 changes: 36 additions & 0 deletions synology/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Synology

[Synology](https://www.synology.com) backend for [QOR OSS](https://github.com/qor/oss)

## Usage

```go
import "github.com/qor/oss/synology"

func main() {
storage := synology.New(&synology.Config{
AccessID: "access_id",
AccessKey: "access_key",
Endpoint: "your endpoint",
})

// Save a reader interface into storage
storage.Put("/sample.txt", reader)

// Get file with path
storage.Get("/sample.txt")

// Get object as io.ReadCloser
storage.GetStream("/sample.txt")

// Delete file with path
storage.Delete("/sample.txt")

// List all objects under path
storage.List("/")

// Get Public Accessible URL (useful if current file saved privately)
storage.GetURL("/sample.txt")
}
```

Loading

0 comments on commit 100dbff

Please sign in to comment.