user

package
v0.0.0-...-e6240ef Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	USER_ALREADY_AVAILABLE_ERROR = domain.NewErrorCode(4201, "USER_ALREADY_AVAILABLE_ERROR", "user already available")
)

Functions

This section is empty.

Types

type CreateUser

type CreateUser struct {
	Name     string `validate:"required,printascii,gte=1"`
	Email    string `validate:"required,email,gte=1"`
	Password string `validate:"required,gte=1"`
}

type GetUserByEmail

type GetUserByEmail struct {
	Email string `validate:"required,email"`
}

type UserUseCase

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

func NewUserUseCase

func NewUserUseCase(usersRepository repository.UserRepository) *UserUseCase

func (*UserUseCase) CreateUser

func (u *UserUseCase) CreateUser(ctx context.Context, data CreateUser) (err *domain.Error)

func (*UserUseCase) GetUserByEmail

func (u *UserUseCase) GetUserByEmail(ctx context.Context, data GetUserByEmail) (user entity.User, err *domain.Error)

Jump to

Keyboard shortcuts

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