service

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpendingService

type SpendingService interface {
	Create(ctx context.Context, request web.SpendingCreateRequest) web.SpendingResponse
	Update(ctx context.Context, request web.SpendingUpdateRequest) web.SpendingResponse
	Delete(ctx context.Context, spendingId string)
	FindById(ctx context.Context, spendingId string) web.SpendingResponse
	FindByUserId(ctx context.Context, userId string) []web.SpendingResponse
}

func NewSpendingService

func NewSpendingService(spendingRepository repository.SpendingRepository, DB *helper.DynamoDB, validator *validator.Validate) SpendingService

type SpendingServiceImpl

type SpendingServiceImpl struct {
	SpendingRepository repository.SpendingRepository
	DB                 *helper.DynamoDB
	Validator          *validator.Validate
}

func (*SpendingServiceImpl) Create

func (*SpendingServiceImpl) Delete

func (service *SpendingServiceImpl) Delete(ctx context.Context, spendingId string)

func (*SpendingServiceImpl) FindById

func (service *SpendingServiceImpl) FindById(ctx context.Context, spendingId string) web.SpendingResponse

func (*SpendingServiceImpl) FindByUserId

func (service *SpendingServiceImpl) FindByUserId(ctx context.Context, userId string) []web.SpendingResponse

func (*SpendingServiceImpl) Update

type UserService

type UserService interface {
	Create(ctx context.Context, request web.UserCreateRequest) web.UserResponse
	Update(ctx context.Context, request web.UserUpdateRequest) web.UserResponse
	Delete(ctx context.Context, userId string)
	FindById(ctx context.Context, userId string) web.UserResponse
}

func NewUserService

func NewUserService(userRepository repository.UserRepository, DB *helper.DynamoDB, validate *validator.Validate) UserService

type UserServiceImpl

type UserServiceImpl struct {
	UserRepository repository.UserRepository
	DB             *helper.DynamoDB
	Validate       *validator.Validate
}

func (*UserServiceImpl) Create

func (service *UserServiceImpl) Create(ctx context.Context, request web.UserCreateRequest) web.UserResponse

func (*UserServiceImpl) Delete

func (service *UserServiceImpl) Delete(ctx context.Context, userId string)

func (*UserServiceImpl) FindById

func (service *UserServiceImpl) FindById(ctx context.Context, userId string) web.UserResponse

func (*UserServiceImpl) Update

func (service *UserServiceImpl) Update(ctx context.Context, request web.UserUpdateRequest) web.UserResponse

Jump to

Keyboard shortcuts

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