diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/swarm/feeds.go | 22 | ||||
-rw-r--r-- | cmd/swarm/feeds_test.go | 14 |
2 files changed, 18 insertions, 18 deletions
diff --git a/cmd/swarm/feeds.go b/cmd/swarm/feeds.go index 4b34d6d95..6806c6cf4 100644 --- a/cmd/swarm/feeds.go +++ b/cmd/swarm/feeds.go @@ -27,15 +27,15 @@ import ( "github.com/ethereum/go-ethereum/cmd/utils" swarm "github.com/ethereum/go-ethereum/swarm/api/client" - "github.com/ethereum/go-ethereum/swarm/storage/feeds" + "github.com/ethereum/go-ethereum/swarm/storage/feed" "gopkg.in/urfave/cli.v1" ) -func NewGenericSigner(ctx *cli.Context) feeds.Signer { - return feeds.NewGenericSigner(getPrivKey(ctx)) +func NewGenericSigner(ctx *cli.Context) feed.Signer { + return feed.NewGenericSigner(getPrivKey(ctx)) } -func getTopic(ctx *cli.Context) (topic feeds.Topic) { +func getTopic(ctx *cli.Context) (topic feed.Topic) { var name = ctx.String(SwarmFeedNameFlag.Name) var relatedTopic = ctx.String(SwarmFeedTopicFlag.Name) var relatedTopicBytes []byte @@ -48,7 +48,7 @@ func getTopic(ctx *cli.Context) (topic feeds.Topic) { } } - topic, err = feeds.NewTopic(name, relatedTopicBytes) + topic, err = feed.NewTopic(name, relatedTopicBytes) if err != nil { utils.Fatalf("Error parsing topic: %s", err) } @@ -65,7 +65,7 @@ func feedCreateManifest(ctx *cli.Context) { client = swarm.NewClient(bzzapi) ) - newFeedUpdateRequest := feeds.NewFirstRequest(getTopic(ctx)) + newFeedUpdateRequest := feed.NewFirstRequest(getTopic(ctx)) newFeedUpdateRequest.Feed.User = feedGetUser(ctx) manifestAddress, err := client.CreateFeedWithManifest(newFeedUpdateRequest) @@ -100,11 +100,11 @@ func feedUpdate(ctx *cli.Context) { return } - var updateRequest *feeds.Request - var query *feeds.Query + var updateRequest *feed.Request + var query *feed.Query if manifestAddressOrDomain == "" { - query = new(feeds.Query) + query = new(feed.Query) query.User = signer.Address() query.Topic = getTopic(ctx) @@ -139,9 +139,9 @@ func feedInfo(ctx *cli.Context) { manifestAddressOrDomain = ctx.String(SwarmFeedManifestFlag.Name) ) - var query *feeds.Query + var query *feed.Query if manifestAddressOrDomain == "" { - query = new(feeds.Query) + query = new(feed.Query) query.Topic = getTopic(ctx) query.User = feedGetUser(ctx) } diff --git a/cmd/swarm/feeds_test.go b/cmd/swarm/feeds_test.go index dd0651a25..46727c21d 100644 --- a/cmd/swarm/feeds_test.go +++ b/cmd/swarm/feeds_test.go @@ -26,11 +26,11 @@ import ( "testing" "github.com/ethereum/go-ethereum/swarm/api" - "github.com/ethereum/go-ethereum/swarm/storage/feeds/lookup" + "github.com/ethereum/go-ethereum/swarm/storage/feed/lookup" "github.com/ethereum/go-ethereum/swarm/testutil" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/swarm/storage/feeds" + "github.com/ethereum/go-ethereum/swarm/storage/feed" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/log" @@ -65,7 +65,7 @@ func TestCLIFeedUpdate(t *testing.T) { } // compose a topic. We'll be doing quotes about Miguel de Cervantes - var topic feeds.Topic + var topic feed.Topic subject := []byte("Miguel de Cervantes") copy(topic[:], subject[:]) name := "quotes" @@ -95,19 +95,19 @@ func TestCLIFeedUpdate(t *testing.T) { // build the same topic as before, this time // we use NewTopic to create a topic automatically. - topic, err = feeds.NewTopic(name, subject) + topic, err = feed.NewTopic(name, subject) if err != nil { t.Fatal(err) } // Feed configures whose updates we will be looking up. - fd := feeds.Feed{ + fd := feed.Feed{ Topic: topic, User: address, } // Build a query to get the latest update - query := feeds.NewQueryLatest(&fd, lookup.NoClue) + query := feed.NewQueryLatest(&fd, lookup.NoClue) // retrieve content! reader, err := client.QueryFeed(query, "") @@ -139,7 +139,7 @@ func TestCLIFeedUpdate(t *testing.T) { cmd.ExpectExit() // verify we can deserialize the result as a valid JSON - var request feeds.Request + var request feed.Request err = json.Unmarshal([]byte(matches[0]), &request) if err != nil { t.Fatal(err) |