Documentation ¶
Index ¶
- type IUserQuery
- type IUserRepository
- type UserRepository
- func (r *UserRepository) Conn(...string) Base.IDatabase
- func (r *UserRepository) Create(user models.User) int64
- func (r *UserRepository) Exists(user *models.User) bool
- func (r *UserRepository) GetByEmail(email string) (*models.User, bool)
- func (r *UserRepository) GetById(id int64) (*models.User, error)
- func (r *UserRepository) GetByMobile(mobile string) (*models.User, bool)
- func (r *UserRepository) GetByUserName(name string) (*models.User, error)
- func (r *UserRepository) GetPasswordByUserName(name string) (string, bool)
- func (r *UserRepository) Lists(conditions map[string]interface{}, result interface{}) error
- func (r *UserRepository) Model() interface{}
- func (r *UserRepository) Save(user *models.User, data map[string]interface{}) bool
- func (r *UserRepository) Search(conditions map[string]interface{}, result interface{}) error
- func (r *UserRepository) Table() string
- func (r *UserRepository) Tags(...string) map[string]string
- func (r *UserRepository) Update(user *models.User, update map[string]interface{}) bool
- func (r *UserRepository) UpdatePassword(id int64, password string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IUserQuery ¶
type IUserQuery interface { Create(user models.User) int64 GetById(id int64) (*models.User, error) Exists(user *models.User) bool GetPasswordByUserName(name string) (string, bool) UpdatePassword(id int64, password string) bool GetByUserName(name string) (*models.User, error) Update(user *models.User, update map[string]interface{}) bool Save(user *models.User, data map[string]interface{}) bool GetByMobile(mobile string) (*models.User, bool) GetByEmail(email string) (*models.User, bool) Lists(conditions map[string]interface{}, result interface{}) error Search(conditions map[string]interface{}, result interface{}) error }
type IUserRepository ¶
type IUserRepository interface { IUserQuery }
func NewUserUserRepository ¶
func NewUserUserRepository(ctx Base.ICtxContainer) IUserRepository
type UserRepository ¶
type UserRepository struct { Ctx Base.ICtxContainer Wrapper *models.UserWrapper }
func (*UserRepository) GetByEmail ¶
func (r *UserRepository) GetByEmail(email string) (*models.User, bool)
func (*UserRepository) GetByMobile ¶
func (r *UserRepository) GetByMobile(mobile string) (*models.User, bool)
func (*UserRepository) GetByUserName ¶
func (r *UserRepository) GetByUserName(name string) (*models.User, error)
func (*UserRepository) GetPasswordByUserName ¶
func (r *UserRepository) GetPasswordByUserName(name string) (string, bool)
func (*UserRepository) Lists ¶
func (r *UserRepository) Lists(conditions map[string]interface{}, result interface{}) error
func (*UserRepository) Model ¶
func (r *UserRepository) Model() interface{}
func (*UserRepository) Save ¶
func (r *UserRepository) Save(user *models.User, data map[string]interface{}) bool
func (*UserRepository) Search ¶
func (r *UserRepository) Search(conditions map[string]interface{}, result interface{}) error
func (*UserRepository) Table ¶
func (r *UserRepository) Table() string
func (*UserRepository) Update ¶
func (r *UserRepository) Update(user *models.User, update map[string]interface{}) bool
func (*UserRepository) UpdatePassword ¶
func (r *UserRepository) UpdatePassword(id int64, password string) bool
Click to show internal directories.
Click to hide internal directories.