user

package
v0.0.0-...-48b49ba Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MIT Imports: 4 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 {
	database.Model
	UserName string `gorm:"uniqueIndex;not null" json:"username"`
	Email    string `gorm:"uniqueIndex;not null" json:"email"`
	Password string `gorm:"not null" json:"password,omitempty"`
}

func Create

func Create(u *User) (*User, error)

func GetByEmail

func GetByEmail(e string) (*User, error)

func GetByID

func GetByID(uid uuid.UUID) (*User, error)

func GetByUserName

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

func (User) Safe

func (u User) Safe() User

Jump to

Keyboard shortcuts

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