registerAuth

package
v0.0.0-...-9de6353 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepositoryRegister

func NewRepositoryRegister(db *gorm.DB) *repository

func NewServiceRegister

func NewServiceRegister(repository Repository) *service

Types

type InputRegister

type InputRegister struct {
	FirstName string `json:"firstname" validate:"required,lowercase"`
	LastName  string `json:"lastname" validate:"required,lowercase"`
	Email     string `json:"email" validate:"required,email"`
	Password  string `json:"password" validate:"required,gte=8"`
}

type Repository

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

type Service

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

type UserAlreadyExistsError

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

func (*UserAlreadyExistsError) Error

func (e *UserAlreadyExistsError) Error() string

type UserRegistrationError

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

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