user_auth_mock.go
889 字节
package repository
import "opp/models"
var userAuth = &models.UserAuth{
AuthCode: "897ca746f46b11e98771000c29ad8d6d",
AccessToken: "897ca746f46b11e98771000c29ad8d7d",
RefreshToken: "897ca746f46b11e98771000c29ad8d8d",
}
type UserAuthMockRepository struct{}
func (r *UserAuthMockRepository) GetUserAuthByUserId(uid int64) (v *models.UserAuth, err error) {
v = userAuth
return
}
func (r *UserAuthMockRepository) UpdateUserAuthById(m *models.UserAuth) (err error) {
return
}
func (r *UserAuthMockRepository) GetUserAuthByAuthCode(authCode string) (v *models.UserAuth, err error) {
v = userAuth
return
}
func (r *UserAuthMockRepository) GetUserAuthByRefreshToken(refreshToken string) (v *models.UserAuth, err error) {
v = userAuth
return
}
func (r *UserAuthMockRepository) GetUserAuthByToken(refreshToken string) (v *models.UserAuth, err error) {
v = userAuth
return
}