models

package
v0.0.0-...-2073f86 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSigninUser

func ValidateSigninUser(u *SigninUser) error

func ValidateSignupUser

func ValidateSignupUser(u *User) error

Types

type SigninUser

type SigninUser struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,min=8,max=256"`
}

type User

type User struct {
	gorm.Model
	ID       uuid.UUID `gorm:"type:uuid,unique"`
	Name     string    `json:"name" validate:"required,min=3,max=16,alpha"`
	Email    string    `json:"email" gorm:"unique" validate:"required,email"`
	Password string    `json:"password" validate:"required,min=8,max=256"`
}

Jump to

Keyboard shortcuts

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