repository

package
v0.0.0-...-11f987e Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserDuplicateEmail = dao.ErrUserDuplicateEmail
	ErrUserNotFound       = gorm.ErrRecordNotFound
)

Functions

This section is empty.

Types

type CodeRepository

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

func NewCodeRepository

func NewCodeRepository(cache cache.CodeCache) *CodeRepository

func (*CodeRepository) Store

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

func (*CodeRepository) Verify

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

type UserRepository

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

func NewUserRepository

func NewUserRepository(d *dao.UserDao, c *cache.UserCache) *UserRepository

func (*UserRepository) Create

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

func (*UserRepository) Edit

func (r *UserRepository) Edit(ctx *gin.Context, id int64, u domain.User) error

func (*UserRepository) FindByEmail

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

func (*UserRepository) FindById

func (r *UserRepository) FindById(ctx *gin.Context, id int64) (domain.User, error)

func (*UserRepository) FindProfileById

func (r *UserRepository) FindProfileById(ctx *gin.Context, id int64) (domain.User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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