user_mock.go
689 字节
package repository
import "opp/models"
type UserMockRepository struct{}
var userInfo = &models.UserAuth{
AuthCode: "897ca746f46b11e98771000c29ad8d6d",
AccessToken: "897ca746f46b11e98771000c29ad8d7d",
RefreshToken: "897ca746f46b11e98771000c29ad8d8d",
}
var user = &models.User{
Phone: "18065048389",
Passwd: "$2y$10$YWg7jPRVLBzc3kevokMkW.boswtCvhToqC.TappIwfqwJ.cI0efvy",
}
func (r *UserMockRepository) GetUsersById(uid int64) (v *models.User, err error) {
v = user
return
}
func (r *UserMockRepository) GetUsersByMobile(mobile string) (v *models.User, err error) {
v = user
return
}
func (r *UserMockRepository) UpdateUserInfo(m *models.User) (err error) {
return
}