1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 09:59:13 +08:00

4600 Commits

Author SHA1 Message Date
748d25f473 t0060-daemon: test transport is encrypted
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 23:36:42 -07:00
c9edbf359d Merge pull request #1403 from dylanPowers/object-new-templates
Object new templates
2015-06-26 04:23:26 -07:00
51aeb1216f Merge pull request #1266 from ipfs/add-circleci
add circleci support
2015-06-26 02:26:33 -07:00
15d9a5ccae add circleci support
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-26 02:07:58 -07:00
1a77297182 t0060: export IPFS_PATH
IPFS_PATH should really be exported to make sure it is
available to the ipfs binary.

It looks like sharness tests fail otherwise on CircleCi.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-26 02:07:57 -07:00
ac7d25c2cc Merge pull request #1423 from ipfs/test/only-hash
add test for only-hash to ensure no blocks are added to datastore
2015-06-25 14:07:03 -07:00
0332f3dbaa Merge pull request #1348 from ipfs/tk/unixfs-ls
Add 'ipfs file ls …'
2015-06-25 10:03:52 -07:00
53dee3c64d add test for only-hash to ensure no blocks are added to datastore
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-25 09:33:47 -07:00
aefdb4e0e1 Merge pull request #1417 from ipfs/feat/only-hash
add option to only hash input
2015-06-24 16:24:17 -07:00
65874eb0c1 Merge pull request #1378 from ipfs/feat/filter
add in basic address dial filtering
2015-06-24 15:12:16 -07:00
60ad7a5afc sharness tests for --only-hash
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 09:04:31 -07:00
0bf6b39caf filter incoming connections and add a test of functionality
- add extra check to dialblock test
- move filter to separate package
- also improved tests
- sunk filters down into p2p/net/conn/listener

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-23 01:30:16 -07:00
fbab2a7273 broke filters out into a struct
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 01:29:29 -07:00
e01f8e4f22 add in basic address dial filtering
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 01:29:29 -07:00
3f28663ff6 Merge pull request #1414 from ipfs/fix-verify-file
ipns_test: fix slice bounds out of range
2015-06-22 21:14:09 -07:00
e42c967297 add option to only hash input
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-22 15:21:53 -07:00
d18296045e ipns_test: fix slice bounds out of range
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-22 22:52:14 +02:00
4acab79d66 core/commands/unixfs/ls: Explicitily record stat in LsObject
Instead of abusing a LsLink for non-directory objects [1].

[1]: https://github.com/ipfs/go-ipfs/pull/1348#discussion_r32680669

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
5fd4812b20 core/commands/unixfs/ls.go: Fix (and test) single-directory listing
We don't want to prefix these results with the argument.  If there was
only one argument, the unprefixed results are still explicit.

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
7fc2410d95 core/commands/unixfs/ls: Hash-map for Objects
Discussion with Juan on IRC ([1] through [2]) lead to this adjusted
JSON output.  Benefits over the old output include:

* deduplication (we only check the children of a given Merkle node
  once, even if multiple arguments resolve to that hash)

* alphabetized output (like POSIX's ls).  As a side-effect of this
  change, I'm also matching GNU Coreutils' ls output (maybe in POSIX?)
  by printing an alphabetized list of non-directories (one per line)
  first, with alphabetized directory lists afterwards.

[1]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41725570&page=5
[2]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41726547&page=5

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
ce0bf80368 core/commands/unixfs/ls: Replace TODO context with command context
Discussing this on IRC ([1] through [2]), Jeromy and I decided that
we'd really like a way to configure per-command [3] and per-action
timeouts, but until we have that we want to leave the minute limit
here.  We also decided that the use of TODO here instead of the
per-command req.Context().Context was a bug, which I'm fixing with
this commit.

[1]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41714126&page=4
[2]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41715618&page=4
[3]: https://github.com/ipfs/go-ipfs/issues/1325

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
f0a0ac1b83 core/commands/unixfs/ls: Use a stringified type name
This doesn't affect the text output, which was already using a
stringified name.  The earlier stringification does change the JSON
output from an enumeration integer (e.g. 2) to the string form
(e.g. "File").  If/when we transition to Merkle-object types named by
their hash, we will probably want to revisit this and pass both the
type hash and human-readable-but-collision-prone name on to clients.

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:47 -07:00
c9733c5da7 core/commands/unixfs/ls: Set Argument in JSON output
Change the approach to the directory-header control so we can set the
Argument value in the JSON response.

Stripping the trailing newline from the JSON output is annoying, but
looking over [1] I saw no easy way to add a newline to the JSON
output.  And with the general framework that commands/ attempts to be,
it feels a bit funny to customize the JSON output for a command-line
program.  Perhaps a workable solution is to have the command-line
client append newlines to any output that otherwise lacks them?  But
that seems like a change best left to a separate series.

[1]: http://golang.org/pkg/encoding/json/

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-20 13:34:44 -07:00
3a1c8d7a53 Merge pull request #1400 from dylanPowers/object-help
"object" added to the descriptions of object patch and object data
2015-06-19 23:47:21 -07:00
594c1bfa2a Merge pull request #1405 from ipfs/daemon-shutdown
close channels and allow daemon to shutdown
2015-06-19 23:03:51 -07:00
6211ee46c2 close channels and allow daemon to shutdown
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-19 22:40:38 -07:00
7d254aef20 Merge pull request #1404 from ipfs/feat/patch-path
allow patch add-link to add at a path
2015-06-19 22:01:57 -07:00
d585e20ebc allow patch add-link to add at a path
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-19 20:45:20 -07:00
09f16003d8 Merge pull request #1402 from dylanPowers/object-put-example
Object put examples in help text
2015-06-19 20:34:38 -07:00
9b89a3dd43 Merge pull request #1398 from ipfs/tk/publish-local-peer-id
core/commands/publish: Allow explicit local node ID
2015-06-19 20:18:01 -07:00
ed5374dad4 Merge pull request #1397 from ipfs/tk/public-name-commands
core/commands: Make IpnsCmd and PublishCmd public
2015-06-19 20:17:21 -07:00
1b283a733a Templates list in help text of object new
License: MIT
Signed-off-by: Dylan Powers <dylan.kyle.powers@gmail.com>
2015-06-19 17:18:48 -07:00
2f6f0f91c8 Examples for object put
License: MIT
Signed-off-by: Dylan Powers <dylan.kyle.powers@gmail.com>
2015-06-19 17:12:20 -07:00
3f22954f7c "object" added to the descriptions of object patch and object data
License: MIT
Signed-off-by: Dylan Powers <dylan.kyle.powers@gmail.com>
2015-06-19 14:14:53 -07:00
36a5281106 Merge pull request #1395 from ipfs/fix-nil-conn-bug
update go-multiaddr-net with a nil check
2015-06-19 13:24:57 -07:00
e700c02cbd core/commands/publish: Allow explicit local node ID
Instead of raising "keychains not yet implemented" whenever we have an
explicit node ID, only raise the error when the given node ID isn't
the local node.  This allows folks to use the more-general
explicit-node-ID form in scripts and such now, as long as they use the
local node name when calling those scripts.

Also add a test for this case, and update the comment for the
one-argument case to match the current syntax for extracting a
multihash name string.

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-19 04:08:43 -07:00
40c6ffd4fe core/commands: Make IpnsCmd and PublishCmd public
ipfs-shell [1] accesses the Command objects directly to construct
requests for an external IPFS daemon API.  This isn't a terribly
robust approach, because it doesn't handle version differences between
the version of go-ipfs used to build the daemon and the version used
to build the ipfs-shell-consuming application.  But for cases where
you can get those APIs to match it works well.  Making these two
commands public allows us to write ipfs-shell wrappers for them.
Until we figure out how to get ipfs-shell working without access to
core/commands, I think the best approach is to make future command
objects and their returned structures public, and to go back and
expose existing commands/structures on an as-needed basis.

In this case, I need the public PublishCmd for the Docker-registry
storage driver, and I made the IpnsCmd public at the same time to stay
consistent for both 'ipfs name ...' sub-commands.

[1]: https://github.com/whyrusleeping/ipfs-shell

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-19 02:44:03 -07:00
1c972fed0f updated go-multiaddr-net with tests
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-19 00:15:10 -07:00
1363790f70 remove duplicate Godeps.json entry
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-18 18:19:42 -07:00
6bbe575500 update go-multiaddr-net with a nil check
works around off nil conn failure:
- https://travis-ci.org/ipfs/go-ipfs/jobs/67385491

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-18 18:15:35 -07:00
370df8fc0c Merge pull request #1382 from ipfs/http-eventlog
move eventlogs to an http endpoint
2015-06-18 16:06:17 -07:00
96e98a8e13 add sharness test for log endpoint
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:02 -07:00
89cb430326 fix mirrorWriter write
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:02 -07:00
67be6bbd57 skip logs when no writers connected
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
90896f283f clean up unused log options
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
a676b5a8ac move eventlogs to an http endpoint
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-18 12:44:01 -07:00
152247dff2 Merge pull request #1359 from rht/cleanup-logging
Cleanup logging 1
2015-06-18 04:47:34 -07:00
e2601ebc28 Merge pull request #1392 from ipfs/update-goprocess-dep
update goprocess godep
2015-06-18 02:23:08 -07:00
c274a3f6e1 update goprocess dep
Learned proc.SetTeardown()

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-18 02:11:08 -07:00
c8abef059c godeps hack: chriscool/go-sleep remains vendored
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-18 02:10:54 -07:00