Documentation ¶
Index ¶
- Constants
- Variables
- func Bind(c *fiber.Ctx, user *model.User) error
- func Exit(c *fiber.Ctx) error
- func ExitWx(c *fiber.Ctx) error
- func GetCurrentUser(c *fiber.Ctx) error
- func GetUser(c *fiber.Ctx) error
- func Login(c *fiber.Ctx) error
- func Register(c *fiber.Ctx) error
- func Update(c *fiber.Ctx) error
- type UserDao
- func (us UserDao) ExistsByID(uid uint) error
- func (us UserDao) GetByID(uid uint) (*model.User, error)
- func (us UserDao) Login(username, password string) error
- func (us UserDao) LoginJWT(username, token string) error
- func (us UserDao) Register(username, password, ip string) (error, uint)
- func (us UserDao) Update(user *body.User) error
Constants ¶
View Source
const ( KeyPostDB = "user.gorm.db" KeyPostNoCheckRouter = "user.router.nocheck" KeyPostCheckRouter = "user.router.check" )
View Source
const (
SqlQueryUserByID = `SELECT *
FROM users
WHERE id = ? AND deleted_at IS NULL`
)
Variables ¶
View Source
var Dao = new(UserDao)
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.