Documentation ¶
Index ¶
- Variables
- type CachedCodeRepository
- type CachedUserRepository
- func (r *CachedUserRepository) Create(ctx context.Context, u domain.User) error
- func (r *CachedUserRepository) FindByEmail(ctx context.Context, email string) (domain.User, error)
- func (r *CachedUserRepository) FindById(ctx context.Context, id int64) (domain.User, error)
- func (r *CachedUserRepository) FindByPhone(ctx context.Context, phone string) (domain.User, error)
- func (r *CachedUserRepository) FindProfileByEmail(ctx context.Context, email string) (domain.Profile, error)
- func (r *CachedUserRepository) UpdateProfile(ctx context.Context, profile domain.Profile) error
- type CodeRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCodeSendTooMany = cache.ErrCodeSendTooMany ErrCodeVerifyTooManyTimes = cache.ErrCodeVerifyTooManyTimes )
View Source
var ( ErrUserDuplicateEmail = dao.ErrUserDuplicateEmail ErrUserNotFound = dao.ErrUserNotFound ErrUserDuplicate = dao.ErrUserDuplicate )
Functions ¶
This section is empty.
Types ¶
type CachedCodeRepository ¶
type CachedCodeRepository struct {
// contains filtered or unexported fields
}
type CachedUserRepository ¶
type CachedUserRepository struct {
// contains filtered or unexported fields
}
func (*CachedUserRepository) FindByEmail ¶
func (*CachedUserRepository) FindByPhone ¶
func (*CachedUserRepository) FindProfileByEmail ¶
func (*CachedUserRepository) UpdateProfile ¶
type CodeRepository ¶
type CodeRepository interface { Store(ctx context.Context, biz string, phone string, code string) error Verify(ctx context.Context, biz, phone, inputCode string) (bool, error) }
func NewCodeRepository ¶
func NewCodeRepository(c cache.CodeCache) CodeRepository
type UserRepository ¶
type UserRepository interface { FindByEmail(ctx context.Context, email string) (domain.User, error) FindByPhone(ctx context.Context, phone string) (domain.User, error) Create(ctx context.Context, u domain.User) error FindById(ctx context.Context, id int64) (domain.User, error) UpdateProfile(ctx context.Context, profile domain.Profile) error FindProfileByEmail(ctx context.Context, email string) (domain.Profile, error) }
func NewUserRepository ¶
func NewUserRepository(userDao dao.UserDAO, profileDao dao.ProfileDAO, userProfile dao.UserWithProfileDAO, c cache.UserCache) UserRepository
Click to show internal directories.
Click to hide internal directories.