services

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpenseCategoryService

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

func NewExpenseCategoryService

func NewExpenseCategoryService(repo category2.Repository, publisher event.Publisher) *ExpenseCategoryService

func (*ExpenseCategoryService) Count

func (s *ExpenseCategoryService) Count(ctx context.Context) (uint, error)

func (*ExpenseCategoryService) Create

func (*ExpenseCategoryService) Delete

func (*ExpenseCategoryService) GetAll

func (*ExpenseCategoryService) GetByID

func (*ExpenseCategoryService) GetPaginated

func (s *ExpenseCategoryService) GetPaginated(
	ctx context.Context,
	limit, offset int,
	sortBy []string,
) ([]*category2.ExpenseCategory, error)

func (*ExpenseCategoryService) Update

type ExpenseService

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

func NewExpenseService

func NewExpenseService(
	repo expense.Repository,
	publisher event.Publisher,
	accountService *MoneyAccountService,
) *ExpenseService

func (*ExpenseService) Count

func (s *ExpenseService) Count(ctx context.Context) (uint, error)

func (*ExpenseService) Create

func (s *ExpenseService) Create(ctx context.Context, data *expense.CreateDTO) error

func (*ExpenseService) Delete

func (s *ExpenseService) Delete(ctx context.Context, id uint) (*expense.Expense, error)

func (*ExpenseService) GetAll

func (s *ExpenseService) GetAll(ctx context.Context) ([]*expense.Expense, error)

func (*ExpenseService) GetByID

func (s *ExpenseService) GetByID(ctx context.Context, id uint) (*expense.Expense, error)

func (*ExpenseService) GetPaginated

func (s *ExpenseService) GetPaginated(
	ctx context.Context,
	limit, offset int,
	sortBy []string,
) ([]*expense.Expense, error)

func (*ExpenseService) Update

func (s *ExpenseService) Update(ctx context.Context, id uint, data *expense.UpdateDTO) error

type MoneyAccountService

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

func NewMoneyAccountService

func NewMoneyAccountService(repo moneyaccount.Repository, publisher event.Publisher) *MoneyAccountService

func (*MoneyAccountService) Count

func (s *MoneyAccountService) Count(ctx context.Context) (uint, error)

func (*MoneyAccountService) Create

func (*MoneyAccountService) Delete

func (*MoneyAccountService) GetAll

func (*MoneyAccountService) GetByID

func (*MoneyAccountService) GetPaginated

func (s *MoneyAccountService) GetPaginated(
	ctx context.Context,
	limit, offset int,
	sortBy []string,
) ([]*moneyaccount.Account, error)

func (*MoneyAccountService) RecalculateBalance

func (s *MoneyAccountService) RecalculateBalance(ctx context.Context, id uint) error

func (*MoneyAccountService) Update

type PaymentService

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

func NewPaymentService

func NewPaymentService(
	repo payment.Repository,
	publisher event.Publisher,
	accountService *MoneyAccountService,
) *PaymentService

func (*PaymentService) Count

func (s *PaymentService) Count(ctx context.Context) (uint, error)

func (*PaymentService) Create

func (s *PaymentService) Create(ctx context.Context, data *payment.CreateDTO) error

func (*PaymentService) Delete

func (s *PaymentService) Delete(ctx context.Context, id uint) (*payment.Payment, error)

func (*PaymentService) GetAll

func (s *PaymentService) GetAll(ctx context.Context) ([]*payment.Payment, error)

func (*PaymentService) GetByID

func (s *PaymentService) GetByID(ctx context.Context, id uint) (*payment.Payment, error)

func (*PaymentService) GetPaginated

func (s *PaymentService) GetPaginated(
	ctx context.Context,
	limit, offset int,
	sortBy []string,
) ([]*payment.Payment, error)

func (*PaymentService) Update

func (s *PaymentService) Update(ctx context.Context, id uint, data *payment.UpdateDTO) error

type TransactionService

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

func NewTransactionService

func NewTransactionService(repo transaction2.Repository, eventPublisher *event.Publisher) *TransactionService

func (*TransactionService) Count

func (s *TransactionService) Count(ctx context.Context) (int64, error)

func (*TransactionService) Create

func (*TransactionService) Delete

func (s *TransactionService) Delete(ctx context.Context, id int64) error

func (*TransactionService) GetAll

func (*TransactionService) GetByID

func (*TransactionService) GetPaginated

func (s *TransactionService) GetPaginated(
	ctx context.Context,
	limit, offset int,
	sortBy []string,
) ([]*transaction2.Transaction, error)

func (*TransactionService) Update

Jump to

Keyboard shortcuts

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