persistence

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExpenseCategoryRepository

func NewExpenseCategoryRepository() category.Repository

func NewExpenseRepository

func NewExpenseRepository() expense.Repository

func NewMoneyAccountRepository

func NewMoneyAccountRepository() moneyaccount.Repository

func NewPaymentRepository

func NewPaymentRepository() payment.Repository

func NewTransactionRepository

func NewTransactionRepository() transaction.Repository

Types

type GormExpenseCategoryRepository

type GormExpenseCategoryRepository struct{}

func (*GormExpenseCategoryRepository) Count

func (*GormExpenseCategoryRepository) Create

func (*GormExpenseCategoryRepository) Delete

func (*GormExpenseCategoryRepository) GetAll

func (*GormExpenseCategoryRepository) GetByID

func (*GormExpenseCategoryRepository) GetPaginated

func (g *GormExpenseCategoryRepository) GetPaginated(
	ctx context.Context, limit, offset int,
	sortBy []string,
) ([]*category.ExpenseCategory, error)

func (*GormExpenseCategoryRepository) Update

type GormExpenseRepository

type GormExpenseRepository struct{}

func (*GormExpenseRepository) Count

func (g *GormExpenseRepository) Count(ctx context.Context) (uint, error)

func (*GormExpenseRepository) Create

func (g *GormExpenseRepository) Create(ctx context.Context, data *expense.Expense) error

func (*GormExpenseRepository) Delete

func (g *GormExpenseRepository) Delete(ctx context.Context, id uint) error

func (*GormExpenseRepository) GetAll

func (*GormExpenseRepository) GetByID

func (g *GormExpenseRepository) GetByID(ctx context.Context, id uint) (*expense.Expense, error)

func (*GormExpenseRepository) GetPaginated

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

func (*GormExpenseRepository) Update

func (g *GormExpenseRepository) Update(ctx context.Context, data *expense.Expense) error

type GormMoneyAccountRepository

type GormMoneyAccountRepository struct{}

func (*GormMoneyAccountRepository) Count

func (*GormMoneyAccountRepository) Create

func (g *GormMoneyAccountRepository) Create(ctx context.Context, data *moneyaccount.Account) error

func (*GormMoneyAccountRepository) Delete

func (*GormMoneyAccountRepository) GetAll

func (g *GormMoneyAccountRepository) GetAll(ctx context.Context) ([]*moneyaccount.Account, error)

func (*GormMoneyAccountRepository) GetByID

func (g *GormMoneyAccountRepository) GetByID(ctx context.Context, id uint) (*moneyaccount.Account, error)

func (*GormMoneyAccountRepository) GetPaginated

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

func (*GormMoneyAccountRepository) RecalculateBalance

func (g *GormMoneyAccountRepository) RecalculateBalance(ctx context.Context, id uint) error

func (*GormMoneyAccountRepository) Update

func (g *GormMoneyAccountRepository) Update(ctx context.Context, data *moneyaccount.Account) error

type GormPaymentRepository

type GormPaymentRepository struct{}

func (*GormPaymentRepository) Count

func (g *GormPaymentRepository) Count(ctx context.Context) (uint, error)

func (*GormPaymentRepository) Create

func (g *GormPaymentRepository) Create(ctx context.Context, data *payment.Payment) error

func (*GormPaymentRepository) Delete

func (g *GormPaymentRepository) Delete(ctx context.Context, id uint) error

func (*GormPaymentRepository) GetAll

func (*GormPaymentRepository) GetByID

func (g *GormPaymentRepository) GetByID(ctx context.Context, id uint) (*payment.Payment, error)

func (*GormPaymentRepository) GetPaginated

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

func (*GormPaymentRepository) Update

func (g *GormPaymentRepository) Update(ctx context.Context, data *payment.Payment) error

type GormTransactionRepository

type GormTransactionRepository struct{}

func (*GormTransactionRepository) Count

func (*GormTransactionRepository) Create

func (*GormTransactionRepository) Delete

func (*GormTransactionRepository) GetAll

func (*GormTransactionRepository) GetByID

func (*GormTransactionRepository) GetPaginated

func (g *GormTransactionRepository) GetPaginated(
	ctx context.Context,
	limit, offset int,
	sortBy []string,
) ([]*transaction.Transaction, error)

func (*GormTransactionRepository) Update

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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