users

package
v0.0.0-...-6723153 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegistrationRequest

type RegistrationRequest struct {
	FirstName string `json:"first_name" validate:"required,len=50"`
	LastName  string `json:"last_name" validate:"required,len=50"`
	Email     string `json:"email" validate:"required,emaillen=255"`
	Password  string `json:"password" validate:"required"`
}

type User

type User struct {
	FirstName string `json:"firstName" db:"first_name"`
	LastName  string `json:"lastName" db:"last_name"`
	Email     string `json:"email"`
	Password  string `json:"password"`
	Verified  bool   `json:"verified"`
}

func NewUserForRegistration

func NewUserForRegistration(firstName string, lastName string, email string, password string) *User

type UserHandler

type UserHandler interface {
	Routes() chi.Router
	Registration(w http.ResponseWriter, r *http.Request)
	Verify(w http.ResponseWriter, r *http.Request)
}

func NewUserHandler

func NewUserHandler(r chi.Router, db *sqlx.DB) UserHandler

type UserService

type UserService interface {
	Registration(firstName string, lastName string, email string, password string) error
	Verify(email string) error
}

func NewUserService

func NewUserService(db *sqlx.DB) UserService

Jump to

Keyboard shortcuts

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