user

package
v0.0.0-...-9ed9871 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

func NewCore

func NewCore(log *zap.SugaredLogger, db *sqlx.DB) Core

func (Core) Authenticate

func (c Core) Authenticate(ctx context.Context, now time.Time, email string, password string) (auth.Claims, error)

func (Core) Create

func (c Core) Create(ctx context.Context, nu user.NewUser, now time.Time) (user.User, error)

func (Core) Delete

func (c Core) Delete(ctx context.Context, claims auth.Claims, userID string) error

func (Core) Query

func (c Core) Query(ctx context.Context, pageNumber int, rowsPerPage int) ([]user.User, error)

func (Core) QueryByEmail

func (c Core) QueryByEmail(ctx context.Context, claims auth.Claims, email string) (user.User, error)

func (Core) QueryById

func (c Core) QueryById(ctx context.Context, claims auth.Claims, userId string) (user.User, error)

func (Core) Update

func (c Core) Update(ctx context.Context, claims auth.Claims, userID string, uu user.UpdateUser, now time.Time) error

Jump to

Keyboard shortcuts

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