Documentation ¶
Overview ¶
templ: version: v0.2.513
Index ¶
- type Repository
- type RepositoryImpl
- func (t *RepositoryImpl) Create(ctx context.Context, transaction *models.Transaction) error
- func (t *RepositoryImpl) Delete(ctx context.Context, id int) error
- func (t *RepositoryImpl) List(ctx context.Context, req *models.TransactionsListRequest) ([]*models.Transaction, int, error)
- func (t *RepositoryImpl) Update(ctx context.Context, transaction *models.Transaction) error
- type TagsRepository
- type Transactions
- type WalletRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { Create(ctx context.Context, transaction *models.Transaction) error Update(ctx context.Context, transaction *models.Transaction) error List(ctx context.Context, req *models.TransactionsListRequest) ([]*models.Transaction, int, error) Delete(ctx context.Context, id int) error }
type RepositoryImpl ¶
type RepositoryImpl struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db *sqlx.DB) *RepositoryImpl
func (*RepositoryImpl) Create ¶
func (t *RepositoryImpl) Create(ctx context.Context, transaction *models.Transaction) error
func (*RepositoryImpl) List ¶
func (t *RepositoryImpl) List(ctx context.Context, req *models.TransactionsListRequest) ([]*models.Transaction, int, error)
func (*RepositoryImpl) Update ¶
func (t *RepositoryImpl) Update(ctx context.Context, transaction *models.Transaction) error
type TagsRepository ¶
type Transactions ¶
type Transactions struct {
// contains filtered or unexported fields
}
func New ¶
func New( repository Repository, tagsRepository TagsRepository, walletRepository WalletRepository, log *slog.Logger, ) *Transactions
func (*Transactions) ExpandTags ¶
func (t *Transactions) ExpandTags(ctx context.Context, transactions []*models.Transaction) error
func (*Transactions) Mount ¶
func (t *Transactions) Mount(router chi.Router)
Click to show internal directories.
Click to hide internal directories.