registerController

package
v0.0.0-...-0673085 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegisterRepository

func NewRegisterRepository(db *mongo.Database) *repository

func NewRegisterService

func NewRegisterService(repository Repository) *service

Types

type RegisterInput

type RegisterInput struct {
	FirstName string `json:"firstName" validate:"required,alpha"`
	LastName  string `json:"lastName" validate:"required,alpha"`
	Email     string `json:"email" validate:"required,email"`
	Password  string `json:"password" validate:"required,min=8"`
}

type Repository

type Repository interface {
	RegisterRepository(user *model.User) (*model.User, error)
}

type Service

type Service interface {
	RegisterService(input *RegisterInput) (*model.User, error)
}

type UserAlreadyExistsError

type UserAlreadyExistsError struct {
	*util.BaseError
}

func (*UserAlreadyExistsError) Error

func (e *UserAlreadyExistsError) Error() string

type UserRegistrationError

type UserRegistrationError struct {
	*util.BaseError
}

func (*UserRegistrationError) Error

func (e *UserRegistrationError) Error() string

Jump to

Keyboard shortcuts

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