Skip to content

EventRequest needs to be rethought #12

@randomshinichi

Description

@randomshinichi

At first, all the event parameters were specified on the CLI args.
Then I moved them into config.yaml.
Then to prepare for the HTTP API, I moved it into a separate file called eventsample1.yml, with its definition in pkg/model/eventrequest.go. However, it isn't very useful for the API, because the client shouldn't have to specify
daemon_path: /tmp/workspace/bin/launchpayloadd and the same for cli_path and binary_path.

At the same time, these things are needed in the code.
Also, it seems "—provider" needs to go somewhere in EventRequest. It was previously specified only by a CLI argument.

in fact, given the similarity between EventRequest and pkg/model/model.go:Event, maybe one can throw away EventRequest altogether. I am not sure.

To test the HTTP API, convert the eventsample1.yml to eventsample1.json and run curl -H "Content-Type: application/json" -X POST --data @eventsample1.json localhost:8080/event (the @ is important otherwise curl won't read the file)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions