You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys,
I may be wrong, please help me to understand !
In the docs there are example code of how we can setup a mysql connection but i can't find any docs of how should i use those connection in the handler function.
Although i find this text "Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares."
So is it only to used in middleware ? If i can use those in middleware then why not in handler as i understand middleware is nothing but stack of handler function.
initialize the storage outside the handler and use the storage instance in the middlewares or simply in the handler to use the functionality of our key value store
you can also do more complex things with the connection, which you get via the Conn method
Question Description
Hi guys,
I may be wrong, please help me to understand !
In the docs there are example code of how we can setup a mysql connection but i can't find any docs of how should i use those connection in the handler function.
Although i find this text "Premade storage drivers that implement the Storage interface, designed to be used with various Fiber middlewares."
So is it only to used in middleware ? If i can use those in middleware then why not in handler as i understand middleware is nothing but stack of handler function.
Thanks
Code Snippet (optional)
No response
Checklist:
The text was updated successfully, but these errors were encountered: