package
0.0.0-20240823223427-3354578212b1
Repository: https://github.com/depado/articles.git
Documentation: pkg.go.dev
# README
QOR Admin Example Code
This directory holds the code for the "QOR Admin Tutorial" article.
Most of the useful code is located in the admin package.
- Declaring a QOR Admin easily with a simple constructor
- Bind to an existing gin router and specify a prefix for all the admin related tasks (such as login, logout and admin interface itself)
- Initial migration and exported migration from the admin package to create the
admin_users
table - Manage admin users with a special setter for their password and bcrypt encryption in the database
- Authentication handled by Gin with gin-contrib/sessions and a cookie backend
- Separating admin-related structs (like admin user) and business structs (the models directory only has business structures)
- Simple login HTML template using spectre.css
# Packages
No description provided by the author