1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00

43 Commits

Author SHA1 Message Date
c19bdf18b2 commands: Added Request#SetOptions 2014-11-18 02:13:57 -08:00
f8be26810a commands: Changed Request#Arguments to a []string 2014-11-18 02:13:55 -08:00
bfc83bd16a commands: Added SetArguments/SetFiles to Request 2014-11-18 02:13:54 -08:00
1c8d73f9ea commands: Added Request#Files() 2014-11-18 02:13:53 -08:00
abb8374d43 commands: NewRequest: Documented error case 2014-11-17 00:00:16 -08:00
5e16dfb111 commands: Improved option conversin error message 2014-11-16 18:05:13 -08:00
d1c50972f5 commands: Check for option errors when constructing Requests 2014-11-16 18:01:06 -08:00
5a9de188d7 fix(commands/request) return err when unable to load config/node due to
nil function

cc @jbenet @mappum

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-14 03:20:04 -08:00
d18902df27 cmds2: changed how the ctx.Node works 2014-11-14 03:20:02 -08:00
7116591351 docs(commands/request) 2014-11-14 03:19:59 -08:00
49792b2362 refactored cast errors to use a util 2014-11-14 03:19:56 -08:00
81dbb23602 commands: Cleanup Requests after command execution returns 2014-11-14 03:17:43 -08:00
8c9ee52a93 commands: Fixed value mutation bug in Request#SetOption 2014-11-14 03:17:42 -08:00
a9bd172414 commands: Fixed handling of int/uint option values 2014-11-14 03:17:38 -08:00
3e507f7c9f commands: Changed option accessor API (Request#Option now returns an OptionValue) 2014-11-14 03:17:38 -08:00
20591c7e64 commands: Made SetOption override existing values (even if they used a different alias) 2014-11-14 03:17:37 -08:00
eebb43753b commands: Added list of option definitions to Request, so Option can lookup values by all aliases 2014-11-14 03:17:37 -08:00
de170927ad fix(commands/request) cast safely
should be able to look at a function in isolation and prove it won't
panic. if that's not possible, should cast safely.
2014-11-05 10:15:17 -08:00
75649f3d49 commands: Moved argument checking into a Command method, fail early when parsing commands 2014-11-04 02:04:49 -08:00
586a019fbf commands: Fixed Request#CheckArguments not erroring when required arguments were missing 2014-11-04 02:04:49 -08:00
e8d0cbff1d commands: Check argument validity when running commands 2014-11-04 02:04:49 -08:00
3a8d60cc61 commands: Removed inpout stream from Request 2014-11-04 02:04:48 -08:00
827f1dd0b0 commands: Changed Request arguments to a []interface{} 2014-11-04 02:04:48 -08:00
81f29257a1 commands: Gave Requests a reference to the command they are being called on 2014-11-04 02:04:46 -08:00
289bce6bdb commands: Added Request#SetContext() 2014-11-04 02:04:45 -08:00
20f86c01ce commands: Added Context() to Request 2014-11-04 02:04:45 -08:00
53e1359871 commands: Silently skip unrecognized options, it should be up to the transport to decide if they cause an error 2014-11-04 02:04:44 -08:00
a65c99e71e commands: Added Request#Options so consumers can iterate through provided options 2014-11-04 02:04:44 -08:00
4303dccee9 commands: Added Request#SetStream 2014-10-21 18:27:39 -07:00
d464e3d143 commands: go fmt 2014-10-21 18:16:04 -07:00
c0b28dc19d commands: Added input stream field to Request 2014-10-20 14:38:09 -07:00
b10fc2cc50 turned req + res into interfaces 2014-10-20 11:49:07 -07:00
e5e121a6b1 commands: Made Request#Option also return an existence bool 2014-10-20 07:04:54 -07:00
4f06c6fdba commands: Formatted code 2014-10-20 07:04:54 -07:00
09311d4bab commands: Added 'NewEmptyRequest' 2014-10-20 07:04:54 -07:00
7a36278dbc commands: Allow setting Request fields in NewRequest 2014-10-20 07:04:53 -07:00
c575b5087a commands: Added option value conversion, and moved option validation logic into Request#convertOptions 2014-10-20 07:04:53 -07:00
e1a4b8d668 commands: Added Request#SetPath method 2014-10-20 07:04:53 -07:00
793a8de9c2 commands: Refactored to make Request contain command path 2014-10-20 07:04:53 -07:00
43670971d8 commands: Formatted code 2014-10-20 07:04:52 -07:00
308ee5c949 commands: Added Request#SetOption so we can set options with multiple names 2014-10-20 07:04:51 -07:00
d1595ce34c commands: Added basic methods to Request 2014-10-20 07:04:51 -07:00
15b7388c0e commands: Request struct 2014-10-20 07:04:49 -07:00