domain

package
v0.0.0-...-76b470b Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginRequest

type LoginRequest struct {
	Username           string `json:"username"`
	Password           string `json:"password"`
	AccessTokenExpired int    `json:"accessTokenExpired"`
}

LoginRequest represent user login payload

type LoginResponse

type LoginResponse struct {
	Email              string `json:"email"`
	AccessToken        string `json:"accessToken"`
	AccessTokenExpired int64  `json:"accessTokenExpired"`
}

LoginResponse represent user login response

type User

type User struct {
	ID        primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	FullName  string             `json:"fullName" bson:"fullName"`
	Email     string             `json:"email" bson:"email"`
	Password  string             `json:"password" bson:"password"`
	Salt      string             `json:"salt" bson:"salt"`
	CreatedAt string             `json:"createdAt" bson:"createdAt"`
	UpdatedAt string             `json:"updatedAt" bson:"updatedAt"`
	Photo     string             `json:"photo" bson:"photo"`
}

User model

func (*User) IsValidPassword

func (u *User) IsValidPassword(password string) bool

IsValidPassword function

Jump to

Keyboard shortcuts

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