user

package
v0.0.0-...-9799b74 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: Apache-2.0 Imports: 9 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 {
	// contains filtered or unexported fields
}

func NewUserRepo

func NewUserRepo(db *gorm.DB) *User

func (*User) GetIdByEmail

func (u *User) GetIdByEmail(cred *models.Credentials, verification bool) (string, error)

func (*User) GetPasswordByEmail

func (u *User) GetPasswordByEmail(cred *models.Credentials, verification bool) (string, error)

func (*User) GetTokenByCred

func (u *User) GetTokenByCred(cred *models.Credentials) (string, error)

func (*User) GetTokenWithoutCred

func (u *User) GetTokenWithoutCred(cred *models.Credentials, verification bool) (string, error)

func (*User) GetUserByEmail

func (u *User) GetUserByEmail(cred *models.Credentials) (*models.User, error)

func (*User) Migrate

func (u *User) Migrate() error

func (*User) Save

func (u *User) Save(user *models.User) error

func (*User) Update

func (u *User) Update(user *models.User, id string, updatePassword bool) error

func (*User) Verification

func (u *User) Verification(cred *models.Credentials) error

type UserRepo

type UserRepo interface {
	Save(user *models.User) error
	GetPasswordByEmail(cred *models.Credentials, verification bool) (string, error)
	GetTokenByCred(cred *models.Credentials) (string, error)
	Migrate() error
	GetTokenWithoutCred(cred *models.Credentials, verification bool) (string, error)
	Update(user *models.User, id string, verification bool) error
	Verification(cred *models.Credentials) error
	GetUserByEmail(cred *models.Credentials) (*models.User, error)
	GetIdByEmail(cred *models.Credentials, verification bool) (string, error)
}

Jump to

Keyboard shortcuts

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