repo

package
v0.0.0-...-0eef1dd Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserRepo

type UserRepo struct {
	Ent *ent.Client
}

func NewUserRepo

func NewUserRepo(client *ent.Client) *UserRepo

func (*UserRepo) CreateNewUser

func (u *UserRepo) CreateNewUser(ctx context.Context, username string, email string, password string) (*ent.User, error)

CreateNewUser creates a new user with the minimum information

func (*UserRepo) FindByEmail

func (u *UserRepo) FindByEmail(ctx context.Context, email string) (*ent.User, error)

FindByEmail returns a User matching the given email

func (*UserRepo) FindByName

func (u *UserRepo) FindByName(ctx context.Context, name string) (*ent.User, error)

FindByName returns a user matching the given name

func (*UserRepo) FindByNameOrMail

func (u *UserRepo) FindByNameOrMail(ctx context.Context, name string) (*ent.User, error)

FindByNameOrMail returns a User matching the given name or email

func (*UserRepo) UpdateOnePassword

func (u *UserRepo) UpdateOnePassword(ctx context.Context, id int, password string) (*ent.User, error)

UpdateOnePassword updates the user password with specified email

Jump to

Keyboard shortcuts

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