service

package
v0.0.0-...-fca9ab1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAccountOrPwd = errors.New("账号/邮箱/手机号或密码错误")
	ErrUserDuplicate       = repo.ErrUserDuplicate
	ErrUserNotFound        = repo.ErrUserNotFound
)

Functions

This section is empty.

Types

type UserService

type UserService interface {
	LoginEmailPwd(ctx context.Context, email, password string) (domain.User, error)
	LoginPhonePwd(ctx context.Context, phone, password string) (domain.User, error)
	LoginAccountPwd(ctx context.Context, account string, password string) (domain.User, error)
	UpdateNonSensitiveInfo(ctx context.Context, u domain.User) error
	UpdateAccountName(ctx context.Context, uid int64, accountName string) error

	FindById(ctx context.Context, uid int64) (domain.User, error)
	FindByIds(ctx context.Context, uids []int64) (map[int64]domain.User, error)
	FindByEmail(ctx context.Context, email string) (domain.User, error)
	FindByPhone(ctx context.Context, phone string) (domain.User, error)
	FindByAccount(ctx context.Context, accountName string) (domain.User, error)
	FindByGithubId(ctx context.Context, id int64) (domain.User, error)
	Create(ctx context.Context, user domain.User) (domain.User, error)

	ResetPwd(ctx context.Context, uid int64, newPwd string) error
	ChangePwd(ctx context.Context, uid int64, oldPwd, newPwd string) error
}

func NewUserService

func NewUserService(repo repo.UserRepo, producer event.UserProducer, l logx.Logger) UserService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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