Closed NicolasMahe closed 4 years ago
I would definitely not go with flags as it will be really complex/impossible for services/processes. Instead, just the JSON in argument or as a file will be more than enough. I would also normalize that and have this for the runner as well even if it can be simplified but instead of
go run ./cmd/mesg-cli tx runner create BFBCRiRqD8VEU1qPC47WMXPYK5qGJCw6cbX3H2cekdU7 --from engine -b block
I would have
go run ./cmd/mesg-cli tx runner create '{"serviceHash": "BFBCRiRqD8VEU1qPC47WMXPYK5qGJCw6cbX3H2cekdU7"}' --from engine -b block
I would definitely not go with flags as it will be really complex/impossible for services/processes. Instead, just the JSON in argument or as a file will be more than enough. I would also normalize that and have this for the runner as well even if it can be simplified but instead of
go run ./cmd/mesg-cli tx runner create BFBCRiRqD8VEU1qPC47WMXPYK5qGJCw6cbX3H2cekdU7 --from engine -b block
I would have
go run ./cmd/mesg-cli tx runner create '{"serviceHash": "BFBCRiRqD8VEU1qPC47WMXPYK5qGJCw6cbX3H2cekdU7"}' --from engine -b block
Only the command runner create, delete and process delete are not using the JSON definition. The reason is all other cosmos commands are using args and flags, I don't want to do something different except if I don't have a choice.
Add write commands for all modules
The commands
service create
,process create
,execution create
andexecution update
require the data to be passed as JSON because of the complexity of the data. It makes them hard to use as the JSON is also complicated to write. @antho1404 do you have a suggestion to improve this issue? Should I make a simple version based on flags but that can only fill the root keys?Example of use: