domain

package
v0.0.0-...-92a3c75 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUserNotFound = errors.New("wrong email or password")
View Source
var TokenExpired = errors.New("token expired")

Functions

This section is empty.

Types

type RefreshSession

type RefreshSession struct {
	ID        int64
	UserID    int
	Token     string
	ExpiresAt time.Time
}

type SignIn

type SignIn struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,lte=64,gte=8"`
}

type SignUp

type SignUp struct {
	FirstName  string `json:"first_name" validate:"required,lte=20,gte=2"`
	SecondName string `json:"last_name" validate:"required,lte=25,gte=2"`
	Email      string `json:"email" validate:"required,email"`
	Birthday   string `json:"birthday" validate:"required"`
	Password   string `json:"password" validate:"required,lte=64,gte=8,containsany=.!@#$%,containsany=1234567890"`
}

func (SignUp) Validate

func (s SignUp) Validate() error

Jump to

Keyboard shortcuts

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