repositories

package
v0.0.0-...-1bf86c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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) Conn

func (r *UserRepository) Conn(...string) Base.IDatabase

func (*UserRepository) Create

func (r *UserRepository) Create(user models.User) int64

func (*UserRepository) Exists

func (r *UserRepository) Exists(user *models.User) bool

func (*UserRepository) GetByEmail

func (r *UserRepository) GetByEmail(email string) (*models.User, bool)

func (*UserRepository) GetById

func (r *UserRepository) GetById(id int64) (*models.User, error)

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) Tags

func (r *UserRepository) Tags(...string) map[string]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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL