Why Nostr? What is Njump?
2024-02-17 13:53:51

Ariel Richtman on Nostr: npub129gva…e4kwg ✋ I made some amazing progress (for me) on my API thanks to you. ...

✋ I made some amazing progress (for me) on my API thanks to you. But I now have a question about Axum that I think is worthy of your attention. I have a single state, that I have dependency injected/gested with a client for a downstream API

This works fine, but to decouple the data access layer so we can do test mocking, I have to use a trait object
Defining a trait for the client struct is actually fine I think, it's where I have to do thia pass-through definition because it's a property that is smelling to me. If you've time I'd always appreciate any feedback.

https://github.com/arichtman/external-dns-opnsense/blob/e7c3fdd7c57597db3af1328a10fb36c511461ebe/src/appstate.rs#L49
Author Public Key
npub1gnkglyt5luatu7lskgdn0tc3k7crv4jd95xsluly3g6fdeddearqkm0zr4