account_uc

package
v0.0.0-...-e3f2f01 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountUseCase

func NewAccountUseCase(connect *sql.DB, logger *zap.SugaredLogger) domain.AccountUseCase

NewAccountUseCase - constructor function

Types

type AccountUseCase

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

AccountUseCase is a implementation of domain.AccountUseCase

func (AccountUseCase) CreateAccount

func (a AccountUseCase) CreateAccount(ctx context.Context, dto domain.CreateAccountDto) (uuid.UUID, error)

CreateAccount - method to create user's account

func (AccountUseCase) GetAccount

func (a AccountUseCase) GetAccount(ctx context.Context, email string) (*domain.Account, error)

GetAccount returns joined data from "accounts" and "authenticators" tables

func (AccountUseCase) SetLastLogin

func (a AccountUseCase) SetLastLogin(ctx context.Context, userID uuid.UUID) error

func (AccountUseCase) UpdateAccount

func (a AccountUseCase) UpdateAccount(ctx context.Context, account *domain.Account) error

UpdateAccount is a update account and authenticator method

Jump to

Keyboard shortcuts

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