model

package
v0.0.0-...-7e6a923 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(password, hash string) bool

func HashPassword

func HashPassword(password string) string

func ToReturnVO

func ToReturnVO(user User) vo.ReturnUserVO

Types

type Message

type Message struct {
	ID         string    `json:"_id,omitempty" bson:"_id,omitempty"`
	Body       string    `json:"body,omitempty" bson:"body"`
	SenderId   string    `json:"senderId,omitempty" bson:"senderId,omitempty"`
	ReceiverId string    `json:"receiverId,omitempty" bson:"receiverId,omitempty"`
	CreatedAt  time.Time `json:"-"`
	UpdatedAt  time.Time `json:"-"`
}

type User

type User struct {
	ID        string    `json:"_id,omitempty" bson:"_id,omitempty"`
	Username  string    `json:"username" bson:"username"`
	Email     string    `json:"email" bson:"email"`
	Hash      string    `json:"hash" bson:"hash,omitempty"`
	CreatedAt time.Time `json:"-"`
	UpdatedAt time.Time `json:"-"`
}

func FromCreateVO

func FromCreateVO(vo vo.CreateUserVO) User

func FromUpdateVO

func FromUpdateVO(vo vo.UpdateUserVO) User

Jump to

Keyboard shortcuts

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