This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
generated from beyondstorage/go-service-example
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Readme.md * Add integration test badge to readme * Integration test badge fix Co-authored-by: Xuanwo <[email protected]>
- Loading branch information
1 parent
84bde91
commit d2174ab
Showing
1 changed file
with
37 additions
and
2 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 |
---|---|---|
@@ -1,6 +1,41 @@ | ||
## go-service-storj | ||
[![Build Status](https://github.com/beyondstorage/go-service-storj/workflows/Unit%20Test/badge.svg?branch=master)](https://github.com/beyondstorage/go-service-storj/actions?query=workflow%3A%22Unit+Test%22) | ||
[![Integration Tests](https://teamcity.beyondstorage.io/app/rest/builds/buildType:(id:Services_Storj_IntegrationTest)/statusIcon)](https://teamcity.beyondstorage.io/buildConfiguration/Services_Storj_IntegrationTest) | ||
[![License](https://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/Xuanwo/storage/blob/master/LICENSE) | ||
[![](https://img.shields.io/matrix/beyondstorage@go-storage:matrix.org.svg?logo=matrix)](https://matrix.to/#/#beyondstorage@go-storage:matrix.org) | ||
|
||
# go-service-storj | ||
|
||
[Storj DCS] (Decentralized Cloud Storage) support for [go-storage]. | ||
|
||
[Storj DCS]: https://www.storj.io | ||
[go-storage]: https://github.com/beyondstorage/go-storage | ||
[go-storage]: https://github.com/beyondstorage/go-storage | ||
|
||
## Install | ||
|
||
```go | ||
go get github.com/beyondstorage/go-service-storj | ||
``` | ||
|
||
## Usage | ||
|
||
```go | ||
import ( | ||
"log" | ||
|
||
_ "github.com/beyondstorage/go-service-storj" | ||
"github.com/beyondstorage/go-storage/v4/services" | ||
) | ||
|
||
func main() { | ||
store, err := services.NewStoragerFromString("storj://bucket_name/path/to/workdir") | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
// Write data from io.Reader into hello.txt | ||
n, err := store.Write("hello.txt", r, length) | ||
} | ||
``` | ||
|
||
- See more examples in [go-storage-example](https://github.com/beyondstorage/go-storage-example). | ||
- Read [more docs](https://beyondstorage.io/docs/go-storage/services/storj) about go-service-storj. |