37 lines
678 B
Go
37 lines
678 B
Go
|
package repository
|
||
|
|
||
|
import (
|
||
|
"codeword/internal/models"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type UserRepository struct {
|
||
|
//todo
|
||
|
}
|
||
|
|
||
|
func NewUserRepository() *UserRepository {
|
||
|
//todo
|
||
|
return &UserRepository{}
|
||
|
}
|
||
|
|
||
|
func (r *UserRepository) FindByEmail(email string) (*models.User, error) {
|
||
|
//todo
|
||
|
return &models.User{}, nil
|
||
|
}
|
||
|
|
||
|
func (r *UserRepository) StoreRecoveryRecord(userID, signature string, createdAt time.Time) error {
|
||
|
//todo
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (r *UserRepository) GetRecoveryRecord(signature string) (*models.RestoreRequest, error) {
|
||
|
//todo
|
||
|
|
||
|
return &models.RestoreRequest{UserID: "123", Sign: signature, CreatedAt: time.Now()}, nil
|
||
|
}
|
||
|
|
||
|
func (r *UserRepository) Ping() error {
|
||
|
return nil
|
||
|
}
|