repository

package
v0.0.0-...-d13da26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCodeSendTooMany        = cache.ErrCodeSendTooMany
	ErrCodeVerifyTooManyTimes = cache.ErrCodeVerifyTooManyTimes
)
View Source
var (
	ErrUserDuplicateEmail = dao.ErrUserDuplicateEmail
	ErrUserNotFound       = dao.ErrUserNotFound
)

Functions

This section is empty.

Types

type CodeRepository

type CodeRepository struct {
	// contains filtered or unexported fields
}

func NewCodeRepository

func NewCodeRepository(c *cache.CodeCache) *CodeRepository

func (*CodeRepository) Store

func (repo *CodeRepository) Store(ctx context.Context, biz string,
	phone string, code string) error

func (*CodeRepository) Verify

func (repo *CodeRepository) Verify(ctx context.Context, biz, phone, inputCode string) (bool, error)

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

func NewUserRepository

func NewUserRepository(db *gorm.DB) *UserRepository

func (*UserRepository) Create

func (r *UserRepository) Create(ctx context.Context, u domain.User) error

func (*UserRepository) FindByEmail

func (r *UserRepository) FindByEmail(ctx context.Context, email string) (domain.User, error)

func (*UserRepository) FindProfileByEmail

func (r *UserRepository) FindProfileByEmail(ctx context.Context, email string) (domain.Profile, error)

func (*UserRepository) UpdateProfile

func (r *UserRepository) UpdateProfile(ctx context.Context, profile domain.Profile) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL