Commit Graph

220 Commits

Author SHA1 Message Date
Brian Tiger Chow
440c90be24 extract unpin
@mappum
2014-11-14 03:17:30 -08:00
Brian Tiger Chow
92d20e429d add slice utils
ToStrings and ToReaders
2014-11-14 03:17:30 -08:00
Brian Tiger Chow
4c029a8617 extract toStrings method 2014-11-14 03:17:30 -08:00
Brian Tiger Chow
86f0aac88c refac(commands2/pin) loop 2014-11-14 03:17:29 -08:00
Brian Tiger Chow
353cb39921 refac(commands2/ls) split loop
@mappum
2014-11-14 03:17:29 -08:00
Brian Tiger Chow
6d89094d41 rename -> OnlineMode()
because this method doesn't check actual network status
2014-11-14 03:17:29 -08:00
Brian Tiger Chow
8b6931cb02 check mode with use func node.OnlineMode() bool 2014-11-14 03:17:29 -08:00
Brian Tiger Chow
772f657fcd add online method to node 2014-11-14 03:17:29 -08:00
Brian Tiger Chow
e096060b90 refactor(core/commands2/add) split loop
@mappum
2014-11-14 03:17:29 -08:00
Brian Tiger Chow
8cc1f67f76 fmt 2014-11-14 03:17:29 -08:00
Matt Bell
18cce63ab6 core/commands2: Added 'block' command 2014-11-14 03:17:29 -08:00
Matt Bell
1c5979e549 core/commands2: Added 'mount' command 2014-11-14 03:17:29 -08:00
Matt Bell
16c584ce93 core/commands2: Added 'bootstrap' command 2014-11-14 03:17:28 -08:00
Matt Bell
7228c8fe48 core/commands2: Added 'config' command 2014-11-14 03:17:28 -08:00
Matt Bell
b6aad53d86 core/commands2: Added 'version' command 2014-11-14 03:17:28 -08:00
Matt Bell
af65eec2fc core/commands2: Output error when trying to run 'publish' or 'resolve' in offline mode 2014-11-14 03:17:28 -08:00
Brian Tiger Chow
51c6a1c552 refactor(resolve) separate argument marshalling from the operation
@mappum see how the unpacking of arguments happens separately from the
resolve loop?

It's a bit more verbose, but much clearer.

However, doing two different things in one loop is less clear than doing
them separately.

It also causes problems for further refactoring as it introduces temps
that get in the way of further refactorings.

Plus, there will be 50+ commands, so it's important that we stay
framework agnostic as much as possible.

So, this is the style we prefer. It'll keep us nimble in the long run.
2014-11-14 03:17:28 -08:00
Matt Bell
a7accecc8e core/commands2: Moved 'resolve' and 'publish' into subcommands of 'name' 2014-11-14 03:17:28 -08:00
Matt Bell
bbca445298 core/commands2: Added 'resolve' command 2014-11-14 03:17:28 -08:00
Matt Bell
109af01396 core/commands2: Added 'pin' and 'unpin' commands 2014-11-14 03:17:28 -08:00
Matt Bell
61e8ad9990 core/commands2: Added 'diag' command 2014-11-14 03:17:27 -08:00
Matt Bell
79b88ee028 core/commands2: Added argument definitions to 'publish' 2014-11-14 03:17:27 -08:00
Matt Bell
4765a1d660 core/commands2: Made 'cat' require object argument 2014-11-14 03:17:27 -08:00
Brian Tiger Chow
e86e7d875e extract publish func 2014-11-14 03:17:26 -08:00
Brian Tiger Chow
d2d29a80dc docs(commands2/cat) help text 2014-11-14 03:17:24 -08:00
Brian Tiger Chow
2a15fe8e1e refactor(commands2/cat) readability 2014-11-14 03:17:24 -08:00
Juan Batiz-Benet
fd1cd99556 restore add.go from master 2014-11-14 03:17:24 -08:00
Matt Bell
f95476c19a commands: Allow overriding marshaller for any encoding type 2014-11-14 03:17:24 -08:00
Matt Bell
0afd3391a8 commands: Replaced 'Formatter' with 'Marshaller' 2014-11-14 03:17:23 -08:00
Matt Bell
15cd24a6d1 commands: Renamed Response#Value to Response#Output 2014-11-14 03:17:23 -08:00
Matt Bell
f1209d0912 core/commands2: Added argument definition for 'ls' 2014-11-14 03:17:23 -08:00
Matt Bell
ff987cffae core/commands2: Added 'log' command 2014-11-14 03:17:23 -08:00
Matt Bell
3c4e7bf9a1 core/commands2: Added a simple 'message' output/formatter 2014-11-14 03:17:23 -08:00
Matt Bell
92e308f32b core/commands2: Added logging 2014-11-14 03:17:22 -08:00
Matt Bell
38318a6c28 core/commands2: Added output for 'add' command 2014-11-14 03:17:22 -08:00
Matt Bell
77fea8928a Added argument definition to 'cat' command 2014-11-14 03:17:22 -08:00
Matt Bell
b420ba1e49 core/commands2: Added preliminary 'add' command 2014-11-14 03:17:22 -08:00
Matt Bell
26c2164c35 core/commands2: Removed 'echo' test command 2014-11-14 03:17:22 -08:00
Matt Bell
2915007c4f commands: Changed Request arguments to a []interface{} 2014-11-14 03:17:22 -08:00
Matt Bell
c70ca4dd51 core/commands2: Added 'publish' command 2014-11-14 03:17:22 -08:00
Matt Bell
cac8844b8d cmd/ipfs: Reverted back to secondary CLI root command 2014-11-14 03:17:21 -08:00
Matt Bell
24814a411f core/commands2: Set root subcommands in init to prevent initialization loops 2014-11-14 03:17:21 -08:00
Matt Bell
6ae09b167d core/commands: Moved commands that were rebased into the wrong directory 2014-11-14 03:17:21 -08:00
Matt Bell
0c205f56cb core/commands2: Added 'commands' command 2014-11-14 03:17:21 -08:00
Matt Bell
921d3a51ab commands/http: Pass root command in as field instead of statically depending on core/commands 2014-11-14 03:17:21 -08:00
Matt Bell
9356e1a0a1 cmd/ipfs: Moved private commands to core/commands2 2014-11-14 03:17:21 -08:00
Matt Bell
17c6907e1f core/command2: Fixed ls output for XML marshalling 2014-11-14 03:17:21 -08:00
Matt Bell
f2271356f5 core/commands2: Added 'ls' command 2014-11-14 03:17:20 -08:00
Brian Tiger Chow
b3e7cbb9a5 refactor(commands) swap argument order to match Http(w, r) idiom 2014-11-14 03:17:20 -08:00
Brian Tiger Chow
1dd0ade3ab fix(commands2/cat) rm extraneous print in output 2014-11-14 03:17:20 -08:00