entityuser

package
v0.0.0-...-be30c67 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserEntity

type UserEntity struct {
	Id        uint      `db:"id" gorm:"primaryKey" json:"id"`
	Email     string    `db:"email" gorm:"uniqueIndex" json:"email"`
	FirstName string    `db:"first_name" json:"first_name"`
	LastName  string    `db:"last_name" json:"last_name"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`
	UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
}

type UserLoginRequest

type UserLoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type UserLoginResponse

type UserLoginResponse struct {
	User  *UserEntity      `json:"user"`
	Token *UserTokenEntity `json:"token"`
}

type UserRefreshTokenRequest

type UserRefreshTokenRequest struct {
	RefreshToken string `json:"refresh_token"`
}

type UserRegisterRequest

type UserRegisterRequest struct {
	Email     string `json:"email"`
	Password  string `json:"password"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
}

func (*UserRegisterRequest) BcryptHashing

func (r *UserRegisterRequest) BcryptHashing() error

func (*UserRegisterRequest) IsEmail

func (r *UserRegisterRequest) IsEmail() bool

type UserTokenClaimsEntity

type UserTokenClaimsEntity struct {
	Id uint `json:"id"`
}

type UserTokenEntity

type UserTokenEntity struct {
	Access  string `json:"access"`
	Refresh string `json:"refresh"`
}

Jump to

Keyboard shortcuts

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