Skip to content

Commit d2d8182

Browse files
committed
packageify
This commit was moved from ipfs/go-blockservice@1f90737
1 parent 6972bc8 commit d2d8182

File tree

6 files changed

+78
-24
lines changed

6 files changed

+78
-24
lines changed

blockservice/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014-2018 Juan Batiz-Benet
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

blockservice/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
go-blockservice
2+
==================
3+
4+
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
5+
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
6+
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
7+
[![Coverage Status](https://codecov.io/gh/ipfs/go-block-format/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/go-block-format/branch/master)
8+
[![Travis CI](https://travis-ci.org/ipfs/go-block-format.svg?branch=master)](https://travis-ci.org/ipfs/go-block-format)
9+
10+
> go-blockservice provides a seamless interface to both local and remote storage backends.
11+
12+
13+
## Table of Contents
14+
15+
- [TODO](#todo)
16+
- [Contribute](#contribute)
17+
- [License](#license)
18+
19+
## TODO
20+
21+
The interfaces here really would like to be merged with the blockstore interfaces.
22+
The 'dagservice' constructor currently takes a blockservice, but it would be really nice
23+
if it could just take a blockstore, and have this package implement a blockstore.
24+
25+
## Contribute
26+
27+
PRs are welcome!
28+
29+
Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
30+
31+
## License
32+
33+
MIT © Juan Batiz-Benet

blockservice/blockservice.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111

1212
"github.com/ipfs/go-ipfs/thirdparty/verifcid"
1313

14-
blocks "gx/ipfs/QmVzK524a2VWLqyvtBeiHKsUAWYgeAk4DBeZoY7vpNPNRx/go-block-format"
15-
cid "gx/ipfs/QmYVNvtQkeZ6AKSwDrjQTs432QtL6umrrK41EBq3cu7iSP/go-cid"
16-
blockstore "gx/ipfs/QmadMhXJLHMFjpRmh85XjpmVDkEtQpNYEZNRpWRvYVLrvb/go-ipfs-blockstore"
17-
exchange "gx/ipfs/Qmc2faLf7URkHpsbfYM4EMbr8iSAcGAe8VPgVi64HVnwji/go-ipfs-exchange-interface"
18-
logging "gx/ipfs/QmcVVHfdyv15GVPk7NrxdWjh2hLVccXnoD8j2tyQShiXJb/go-log"
14+
blocks "github.com/ipfs/go-block-format"
15+
cid "github.com/ipfs/go-cid"
16+
blockstore "github.com/ipfs/go-ipfs-blockstore"
17+
exchange "github.com/ipfs/go-ipfs-exchange-interface"
18+
logging "github.com/ipfs/go-log"
1919
)
2020

2121
var log = logging.Logger("blockservice")

blockservice/blockservice_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package blockservice
33
import (
44
"testing"
55

6-
offline "gx/ipfs/QmS6mo1dPpHdYsVkm27BRZDLxpKBCiJKUH8fHX15XFfMez/go-ipfs-exchange-offline"
7-
blocks "gx/ipfs/QmVzK524a2VWLqyvtBeiHKsUAWYgeAk4DBeZoY7vpNPNRx/go-block-format"
8-
butil "gx/ipfs/QmYqPGpZ9Yemr55xus9DiEztkns6Jti5XJ7hC94JbvkdqZ/go-ipfs-blocksutil"
9-
blockstore "gx/ipfs/QmadMhXJLHMFjpRmh85XjpmVDkEtQpNYEZNRpWRvYVLrvb/go-ipfs-blockstore"
10-
ds "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore"
11-
dssync "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore/sync"
6+
blocks "github.com/ipfs/go-block-format"
7+
ds "github.com/ipfs/go-datastore"
8+
dssync "github.com/ipfs/go-datastore/sync"
9+
blockstore "github.com/ipfs/go-ipfs-blockstore"
10+
butil "github.com/ipfs/go-ipfs-blocksutil"
11+
offline "github.com/ipfs/go-ipfs-exchange-offline"
1212
)
1313

1414
func TestWriteThroughWorks(t *testing.T) {

blockservice/test/blocks_test.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import (
77
"testing"
88
"time"
99

10-
. "github.com/ipfs/go-ipfs/blockservice"
10+
. "github.com/ipfs/go-blockservice"
1111

12-
u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util"
13-
offline "gx/ipfs/QmS6mo1dPpHdYsVkm27BRZDLxpKBCiJKUH8fHX15XFfMez/go-ipfs-exchange-offline"
14-
blocks "gx/ipfs/QmVzK524a2VWLqyvtBeiHKsUAWYgeAk4DBeZoY7vpNPNRx/go-block-format"
15-
cid "gx/ipfs/QmYVNvtQkeZ6AKSwDrjQTs432QtL6umrrK41EBq3cu7iSP/go-cid"
16-
blockstore "gx/ipfs/QmadMhXJLHMFjpRmh85XjpmVDkEtQpNYEZNRpWRvYVLrvb/go-ipfs-blockstore"
17-
ds "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore"
18-
dssync "gx/ipfs/QmeiCcJfDW1GJnWUArudsv5rQsihpi4oyddPhdqo3CfX6i/go-datastore/sync"
12+
blocks "github.com/ipfs/go-block-format"
13+
cid "github.com/ipfs/go-cid"
14+
ds "github.com/ipfs/go-datastore"
15+
dssync "github.com/ipfs/go-datastore/sync"
16+
blockstore "github.com/ipfs/go-ipfs-blockstore"
17+
offline "github.com/ipfs/go-ipfs-exchange-offline"
18+
u "github.com/ipfs/go-ipfs-util"
1919
)
2020

2121
func newObject(data []byte) blocks.Block {

blockservice/test/mock.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package bstest
22

33
import (
4-
. "github.com/ipfs/go-ipfs/blockservice"
5-
bitswap "github.com/ipfs/go-ipfs/exchange/bitswap"
6-
tn "github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
4+
. "github.com/ipfs/go-blockservice"
75

8-
delay "gx/ipfs/QmRJVNatYJwTAHgdSM1Xef9QVQ1Ch3XHdmcrykjP5Y4soL/go-ipfs-delay"
9-
mockrouting "gx/ipfs/QmbFRJeEmEU16y3BmKKaD4a9fm5oHsEAMHe2vSB1UnfLMi/go-ipfs-routing/mock"
6+
bitswap "github.com/ipfs/go-bitswap"
7+
tn "github.com/ipfs/go-bitswap/testnet"
8+
delay "github.com/ipfs/go-ipfs-delay"
9+
mockrouting "github.com/ipfs/go-ipfs-routing/mock"
1010
)
1111

1212
// Mocks returns |n| connected mock Blockservices

0 commit comments

Comments
 (0)