types

package
v0.0.0-...-f37d448 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID        uint64  `json:"id" gorm:"primaryKey;autoIncrement"`
	UserName  string  `json:"username" gorm:"type:varchar(255);not null"`
	Email     string  `json:"email" gorm:"type:varchar(255);unique; not null"`
	Password  string  `json:"password" gorm:"type:varchar(60); not null"`
	CreatedAt *string `json:"created_at,omitempty" gorm:"type:varchar(10)"`
}

func (*User) CheckPassword

func (u *User) CheckPassword(hashedPassword string, password string) error

func (*User) Create

func (u *User) Create(db *gorm.DB) (*User, error)

func (*User) Delete

func (u *User) Delete(db *gorm.DB, id uint64) error

func (*User) FindAll

func (u *User) FindAll(db *gorm.DB) (*[]User, error)

func (*User) FindByEmail

func (u *User) FindByEmail(db *gorm.DB, email string) (*User, error)

func (*User) FindById

func (u *User) FindById(db *gorm.DB, id uint64) (*User, error)

func (*User) GetJwtToken

func (u *User) GetJwtToken() (string, error)

func (*User) Update

func (u *User) Update(db *gorm.DB, id uint64) (*User, error)

Jump to

Keyboard shortcuts

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