Conversation
|
Hi @cozyGalvinism, |
|
Looking at the Nfty API1 it seems quite simple so I'm wondering if we really need a dedicate middleware for it. Instead I'm wondering maybe building generic HTTP middleware with examples on how to use specific services will be better long term. Similar for: Footnotes |
Oh, that's for Nifty. The middleware targets ntfy. But I agree, a generic HTTP middleware might provide more benefits and covers more use-cases |
|
I am not very knowledgeable in Go, though I can give a shot at composing an HTTP middleware for this purpose. |
@cozyGalvinism if you have time to do so - would be great. I imagine HTTP Middleware to work based on custom Go templates which can be provided by users as request body with bunch of execution related variables from ofelia (like execution status, duration, error, etc). Something else to consider, is that I'm planning a bit of code refactoring to make following work: So maybe it may make sense to wait a bit, even though I don't think that refactoring will touch Middlewares much. |
Implemented ntfy middleware using
gotfy.Tested using my own ntfy instance:
