Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUserExists = grpc.NewServiceError(codes.AlreadyExists, us.ErrorCode_ERROR_CODE_USER_ALREADY_EXISTS, "user already exists") ErrUserDoesNotExist = grpc.NewServiceError(codes.FailedPrecondition, us.ErrorCode_ERROR_CODE_USER_DOES_NOT_EXIST, "user does not exist") ErrIncorrectUserPassword = grpc.NewServiceError(codes.FailedPrecondition, us.ErrorCode_ERROR_CODE_INCORRECT_USER_PASSWORD, "incorrect user password") )
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct { fx.In Repository userservice.Repository Log *log.Log }
type Usecase ¶
type Usecase interface { CreateUser(ctx context.Context, username, password string) (user *User, err error) LoginUser(ctx context.Context, username, password string) (user *User, err error) DeleteUser(ctx context.Context, username, password string) (err error) GetUser(ctx context.Context, username string) (user *User, err error) }
func NewUsecase ¶
Click to show internal directories.
Click to hide internal directories.