Closed jchannon closed 2 years ago
As agreed, will apply some of those changes and merge it :)
This commit will be worth millions I tell you!
On Fri, 29 Jul 2022 at 18:46, Sérgio Silveira @.***> wrote:
As agreed, will apply some of those changes and merge it :)
— Reply to this email directly, view it on GitHub https://github.com/RagingKore/Krimson/pull/6#issuecomment-1199797903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZVJVQ265MHS3GUXQ7JCDVWQKI7ANCNFSM545MOVVA . You are receiving this because you authored the thread.Message ID: @.***>
specially now lol
This tidies some dependencies up and deletes the PushConnector.
It introduces a Connector.Http project that has a IWebhookHandler that exposes two methods to handle verification of the payload and to get the data.
The implementation of the webhooks maps a path to a POST request and then executes the IWebhookhandler methods and then passes the data in KrimsonProducer.
I tried to minimise dependencies and we could possible minimise some more and move the interface and extensions into Krimson.Connectors itself.
One thing to note is that this only supports one registration of a HTTP route and IWebhookHandler registration. I did start to look at the DI fun with multiple implementations of the interface but figured we'll cross that bridge if we need to.
I've added an example project but the API looks like: