repository

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpendingRepository

type SpendingRepository interface {
	Save(ctx context.Context, db *helper.DynamoDB, spending domain.Spending) domain.Spending
	Update(ctx context.Context, db *helper.DynamoDB, spending domain.Spending) domain.Spending
	Delete(ctx context.Context, db *helper.DynamoDB, spending domain.Spending)
	FindById(ctx context.Context, db *helper.DynamoDB, spendingId string) (domain.Spending, error)
	FindByUserId(ctx context.Context, db *helper.DynamoDB, userId string) []domain.Spending
}

func NewSpendingRepository

func NewSpendingRepository() SpendingRepository

type SpendingRepositoryImpl

type SpendingRepositoryImpl struct {
}

func (*SpendingRepositoryImpl) Delete

func (repository *SpendingRepositoryImpl) Delete(ctx context.Context, db *helper.DynamoDB, spending domain.Spending)

func (*SpendingRepositoryImpl) FindById

func (repository *SpendingRepositoryImpl) FindById(ctx context.Context, db *helper.DynamoDB, spendingId string) (domain.Spending, error)

func (*SpendingRepositoryImpl) FindByUserId

func (repository *SpendingRepositoryImpl) FindByUserId(ctx context.Context, db *helper.DynamoDB, userId string) []domain.Spending

func (*SpendingRepositoryImpl) Save

func (repository *SpendingRepositoryImpl) Save(ctx context.Context, db *helper.DynamoDB, spending domain.Spending) domain.Spending

func (*SpendingRepositoryImpl) Update

func (repository *SpendingRepositoryImpl) Update(ctx context.Context, db *helper.DynamoDB, spending domain.Spending) domain.Spending

type UserRepository

type UserRepository interface {
	Save(ctx context.Context, db *helper.DynamoDB, user domain.User) domain.User
	Update(ctx context.Context, db *helper.DynamoDB, user domain.User) domain.User
	Delete(ctx context.Context, db *helper.DynamoDB, user domain.User)
	FindById(ctx context.Context, db *helper.DynamoDB, userId string) (domain.User, error)
}

func NewUserRepository

func NewUserRepository() UserRepository

type UserRepositoryImpl

type UserRepositoryImpl struct {
}

func (*UserRepositoryImpl) Delete

func (repository *UserRepositoryImpl) Delete(ctx context.Context, db *helper.DynamoDB, user domain.User)

func (*UserRepositoryImpl) FindById

func (repository *UserRepositoryImpl) FindById(ctx context.Context, db *helper.DynamoDB, userId string) (domain.User, error)

func (*UserRepositoryImpl) Save

func (repository *UserRepositoryImpl) Save(ctx context.Context, db *helper.DynamoDB, user domain.User) domain.User

func (*UserRepositoryImpl) Update

func (repository *UserRepositoryImpl) Update(ctx context.Context, db *helper.DynamoDB, user domain.User) domain.User

Jump to

Keyboard shortcuts

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