repository

package
v0.0.0-...-c297032 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type UserRepo

type UserRepo interface {
	GetAllTables()
	GetAll() ([]entity.User, error)

	Add(user *entity.User) (*string, error)
	GetById(userId string) (*entity.User, error)
	GetByEmail(email string) (*entity.User, error)

	UpdateBirthday(userId, birthday string) error
	UpdateAddress(userId string, addresses []entity.Address) error

	Delete(userId string) error
}

type UserRepoDynamoDB

type UserRepoDynamoDB struct {
	TableName string
	Client    *dynamodb.DynamoDB
}

func ProvideUserRepoDynamoDB

func ProvideUserRepoDynamoDB(awsService *config.AWSService) *UserRepoDynamoDB

func (*UserRepoDynamoDB) Add

func (u *UserRepoDynamoDB) Add(user *entity.User) (*string, error)

func (*UserRepoDynamoDB) Delete

func (u *UserRepoDynamoDB) Delete(userId string) error

func (*UserRepoDynamoDB) GetAll

func (u *UserRepoDynamoDB) GetAll() ([]entity.User, error)

func (*UserRepoDynamoDB) GetAllTables

func (u *UserRepoDynamoDB) GetAllTables()

func (*UserRepoDynamoDB) GetByEmail

func (u *UserRepoDynamoDB) GetByEmail(email string) (*entity.User, error)

func (*UserRepoDynamoDB) GetById

func (u *UserRepoDynamoDB) GetById(userId string) (*entity.User, error)

func (*UserRepoDynamoDB) UpdateAddress

func (u *UserRepoDynamoDB) UpdateAddress(userId string, addresses []entity.Address) error

func (*UserRepoDynamoDB) UpdateBirthday

func (u *UserRepoDynamoDB) UpdateBirthday(userId, birthday string) error

type UserRepoMongoDB

type UserRepoMongoDB struct {
	ClientOptions *options.ClientOptions
	// contains filtered or unexported fields
}

func ProvideUserRepoMongoDB

func ProvideUserRepoMongoDB(awsService *aws.AWSService) *UserRepoMongoDB

func (*UserRepoMongoDB) Add

func (repo *UserRepoMongoDB) Add(user *entity.User) (*string, error)

func (*UserRepoMongoDB) Delete

func (repo *UserRepoMongoDB) Delete(userId string) error

func (*UserRepoMongoDB) GetAll

func (repo *UserRepoMongoDB) GetAll() ([]entity.User, error)

func (*UserRepoMongoDB) GetAllTables

func (repo *UserRepoMongoDB) GetAllTables()

func (*UserRepoMongoDB) GetByEmail

func (repo *UserRepoMongoDB) GetByEmail(email string) (*entity.User, error)

func (*UserRepoMongoDB) GetById

func (repo *UserRepoMongoDB) GetById(userId string) (*entity.User, error)

func (*UserRepoMongoDB) UpdateAddress

func (repo *UserRepoMongoDB) UpdateAddress(userId string, addresses []entity.Address) error

func (*UserRepoMongoDB) UpdateBirthday

func (repo *UserRepoMongoDB) UpdateBirthday(userId, birthday string) error

Jump to

Keyboard shortcuts

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