Backend struct structure? #163
Answered
by
maxcountryman
HosMercury
asked this question in
Q&A
-
what should I add ( more ) in that struct suppose I have posts routes/types I see adding this struct makes it overwhelming somewhat |
Beta Was this translation helpful? Give feedback.
Answered by
maxcountryman
Jan 17, 2024
Replies: 1 comment 5 replies
-
Can you go into a little more detail here and maybe provide an example? For instance, are you referring to the overall structure of our backend code or do you mean the user backend that this crate uses? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm going to assume that's the
Backend
we define e.g. inusers.rs
from the SQLite example. If I'm right, then that is the definition of the user backend. In the SQLite example we use a struct to encapsulate the necessary things to authenticate and get a user from our user backend store (in this case, that's SQLite and in particular we need some way to talk to SQLite which is the pool, but it could be anything we like provided it can implement theAuthnBackend
trait).