-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ff3643
commit 92428b5
Showing
3 changed files
with
606 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} | ||
``` | ||
|
Oops, something went wrong.