service

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserDuplicateEmail    = repository.ErrUserDuplicateEmail
	ErrInvalidUserOrPassword = errors.New("账号/邮箱或密码不对")
)

Functions

This section is empty.

Types

type UserService

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

func NewUserService

func NewUserService(repo *repository.UserRepository) *UserService

func (*UserService) CheckLoginStatus

func (svc *UserService) CheckLoginStatus(ctx *gin.Context, id int64) (domain.User, error)

func (*UserService) Edit

func (svc *UserService) Edit(ctx *gin.Context, id int64, user domain.User) error

func (*UserService) Login

func (svc *UserService) Login(ctx *gin.Context, email string, password string) (domain.User, error)

func (*UserService) Profile

func (svc *UserService) Profile(ctx *gin.Context, id int64) (domain.User, error)

func (*UserService) SignUp

func (svc *UserService) SignUp(ctx context.Context, u domain.User) error

Directories

Path Synopsis
sms

Jump to

Keyboard shortcuts

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