model

package
v0.0.0-...-6907fd9 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(db *gorm.DB, ctx context.Context, user *User) error

Types

type Base

type Base struct {
	ID        int `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

type User

type User struct {
	Base
	Email          string `gorm:"unique"`
	PasswordHashed string
}

func GetByEmail

func GetByEmail(db *gorm.DB, ctx context.Context, email string) (user *User, err error)

func (User) TableName

func (u User) TableName() string

Jump to

Keyboard shortcuts

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