Skip to content

Commit

Permalink
docs: Add docs for IPFS (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
zu1k authored Jul 12, 2021
1 parent 342d642 commit 8ada4c3
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion docs/go-storage/services/ipfs.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
[InterPlanetary File System(IPFS)](https://ipfs.io/)

## Project

<https://github.com/beyondstorage/go-service-ipfs>
<https://github.com/beyondstorage/go-service-ipfs>

## Config

### Storager

#### Available Pairs

| Name | Required | Comments |
| ---- | -------- | -------- |
| [endpoint](go-storage/pairs/endpoint.md) | Y | endpoint |
| [work_dir](go-storage/pairs/work_dir.md) | N | work dir |

#### Examples

Init storager (see [this page](go-storage/operations/index.md#how-to-initialize-a-servicerstorager) for details)

```go
import (
_ "github.com/beyondstorage/go-service-ipfs"
"github.com/beyondstorage/go-storage/v4/services"
)

store, err := services.NewStoragerFromString("ipfs:///<work_dir>?endpoint=<ipfs_http_api_endpoint>") // endpoint example: http:127.0.0.1:5001
if err != nil {
log.Fatalf("ipfs new service: %v", err)
}

```

## Implementation

This service implements following interfaces:

- [Storager](../operations/storager/index.md)

- [Copier](../operations/copy.md)

- [Mover](../operations/move.md)

1 comment on commit 8ada4c3

@vercel
Copy link

@vercel vercel bot commented on 8ada4c3 Jul 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.