Documentation
¶
Index ¶
- Variables
- type UserRepo
- type UserRepoDynamoDB
- func (u *UserRepoDynamoDB) Add(user *entity.User) (*string, error)
- func (u *UserRepoDynamoDB) Delete(userId string) error
- func (u *UserRepoDynamoDB) GetAll() ([]entity.User, error)
- func (u *UserRepoDynamoDB) GetAllTables()
- func (u *UserRepoDynamoDB) GetByEmail(email string) (*entity.User, error)
- func (u *UserRepoDynamoDB) GetById(userId string) (*entity.User, error)
- func (u *UserRepoDynamoDB) UpdateAddress(userId string, addresses []entity.Address) error
- func (u *UserRepoDynamoDB) UpdateBirthday(userId, birthday string) error
- type UserRepoMongoDB
- func (repo *UserRepoMongoDB) Add(user *entity.User) (*string, error)
- func (repo *UserRepoMongoDB) Delete(userId string) error
- func (repo *UserRepoMongoDB) GetAll() ([]entity.User, error)
- func (repo *UserRepoMongoDB) GetAllTables()
- func (repo *UserRepoMongoDB) GetByEmail(email string) (*entity.User, error)
- func (repo *UserRepoMongoDB) GetById(userId string) (*entity.User, error)
- func (repo *UserRepoMongoDB) UpdateAddress(userId string, addresses []entity.Address) error
- func (repo *UserRepoMongoDB) UpdateBirthday(userId, birthday string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MongoRepoSet = wire.NewSet(ProvideUserRepoMongoDB, wire.Bind(new(UserRepo), new(*UserRepoMongoDB)))
View Source
var RepoSet = wire.NewSet(ProvideUserRepoDynamoDB, wire.Bind(new(UserRepo), new(*UserRepoDynamoDB)))
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 ¶
func ProvideUserRepoDynamoDB ¶
func ProvideUserRepoDynamoDB(awsService *config.AWSService) *UserRepoDynamoDB
func (*UserRepoDynamoDB) Delete ¶
func (u *UserRepoDynamoDB) Delete(userId string) 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) Delete ¶
func (repo *UserRepoMongoDB) Delete(userId string) 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
Click to show internal directories.
Click to hide internal directories.