Documentation ¶
Index ¶
- type UserRepoMysql
- func (u *UserRepoMysql) Create(user *model.User) (*model.User, error)
- func (u *UserRepoMysql) DeleteByID(id int) (*model.User, error)
- func (u UserRepoMysql) Find(start, count int) ([]model.User, error)
- func (u UserRepoMysql) FindByEmail(email string) (*model.User, error)
- func (u *UserRepoMysql) FindByID(id int) (*model.User, error)
- func (u *UserRepoMysql) Update(user *model.User) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserRepoMysql ¶
type UserRepoMysql struct {
// contains filtered or unexported fields
}
func NewUserRepoMysql ¶
func NewUserRepoMysql(user, password, dbname string) *UserRepoMysql
func (*UserRepoMysql) DeleteByID ¶
func (u *UserRepoMysql) DeleteByID(id int) (*model.User, error)
DeleteById removes and returns user with specified ID or error otherwise
func (UserRepoMysql) FindByEmail ¶
func (u UserRepoMysql) FindByEmail(email string) (*model.User, error)
Click to show internal directories.
Click to hide internal directories.