Versions in this module Expand all Collapse all v1 v1.7.5 May 29, 2022 Changes in this version + type MaxIDResponse struct + MaxID int64 + type MockUserDao struct + func (m *MockUserDao) DeleteById(id int64) error + func (m *MockUserDao) Get(id int64) (*structs.User, error) + func (m *MockUserDao) GetAll() (*[]structs.User, error) + func (m *MockUserDao) GetByEmail(uname string) (*structs.User, error) + func (m *MockUserDao) GetByUsername(uname string) (*structs.User, error) + func (m *MockUserDao) GetRecoveryCode(id int64) (string, error) + func (m *MockUserDao) GetResettingCode(id int64) (string, error) + func (m *MockUserDao) ResetPassword(id int64, passwordHash string) error + func (m *MockUserDao) Save(u *structs.User) int64 + func (m *MockUserDao) SetRecoveryCode(id int64, code string) error + func (m *MockUserDao) SetResettingCode(id int64, code string) error + func (m *MockUserDao) Update(u *structs.User) error + type MongoUserDao struct + Client *mongo.Client + Ctx context.Context + DatabaseName string + func NewMongoUserDao(URL string, databaseName string) *MongoUserDao + func (d *MongoUserDao) DeleteById(id int64) error + func (d *MongoUserDao) Get(id int64) (*s.User, error) + func (d *MongoUserDao) GetAll() (*[]s.User, error) + func (d *MongoUserDao) GetByEmail(email string) (*s.User, error) + func (d *MongoUserDao) GetByUsername(username string) (*s.User, error) + func (d *MongoUserDao) GetRecoveryCode(id int64) (string, error) + func (d *MongoUserDao) GetResettingCode(id int64) (string, error) + func (d *MongoUserDao) ResetPassword(id int64, passwordHash string) error + func (d *MongoUserDao) Save(u *s.User) int64 + func (d *MongoUserDao) SetRecoveryCode(id int64, code string) error + func (d *MongoUserDao) SetResettingCode(id int64, code string) error + func (d *MongoUserDao) Update(u *s.User) error + type MysqlUserDao struct + Ctx context.Context + DatabaseName string + Db *xorm.Engine + func NewMysqlUserDao(driverUrl string, databaseName string) *MysqlUserDao + func (d *MysqlUserDao) DeleteById(id int64) error + func (d *MysqlUserDao) Get(id int64) (*s.User, error) + func (d *MysqlUserDao) GetAll() (*[]s.User, error) + func (d *MysqlUserDao) GetByEmail(email string) (*s.User, error) + func (d *MysqlUserDao) GetByUsername(username string) (*s.User, error) + func (d *MysqlUserDao) GetRecoveryCode(id int64) (string, error) + func (d *MysqlUserDao) GetResettingCode(id int64) (string, error) + func (d *MysqlUserDao) ResetPassword(id int64, passwordHash string) error + func (d *MysqlUserDao) Save(u *s.User) int64 + func (d *MysqlUserDao) SetRecoveryCode(id int64, code string) error + func (d *MysqlUserDao) SetResettingCode(id int64, code string) error + func (d *MysqlUserDao) Update(u *s.User) error + type UserDao interface + DeleteById func(int64) error + Get func(int64) (*structs.User, error) + GetAll func() (*[]structs.User, error) + GetByEmail func(string) (*structs.User, error) + GetByUsername func(string) (*structs.User, error) + GetRecoveryCode func(int64) (string, error) + GetResettingCode func(int64) (string, error) + ResetPassword func(int64, string) error + Save func(*structs.User) int64 + SetRecoveryCode func(int64, string) error + SetResettingCode func(int64, string) error + Update func(*structs.User) error