user

package
v0.0.0-...-1ba7c6d Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UniqueConstraintUserEmail = "users_email_key"
)

Variables

This section is empty.

Functions

func Create

func Create(db *gorm.DB, user *models.User) (uint, error)

func ExtractToken

func ExtractToken(c *gin.Context) string

func ExtractTokenID

func ExtractTokenID(c *gin.Context) (uint, error)

func FindByEmail

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

func FindById

func FindById(db *gorm.DB, id uint) (*models.User, error)

func TokenValid

func TokenValid(tokenString string) error

Types

type EmailAlreadyExistsError

type EmailAlreadyExistsError struct {
	Email string
}

func (*EmailAlreadyExistsError) Error

func (e *EmailAlreadyExistsError) Error() string

type EmailNotFoundError

type EmailNotFoundError struct{}

func (*EmailNotFoundError) Error

func (e *EmailNotFoundError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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