dashboard

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

templ: version: v0.2.513

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dashboard

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

func New

func New(
	repository Repository,
	walletRepository WalletRepository,
	transactionsService TransactionsService,
	log *slog.Logger,
) *Dashboard

func (*Dashboard) Mount

func (d *Dashboard) Mount(router chi.Router)

type Repository

type Repository interface {
	GetTransactions(ctx context.Context, walletId, year int, mont time.Month) ([]*models.Transaction, error)
}

type RepositoryImpl

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

func NewRepository

func NewRepository(db *sqlx.DB) *RepositoryImpl

func (*RepositoryImpl) GetTransactions

func (r *RepositoryImpl) GetTransactions(ctx context.Context, walletId, year int, month time.Month) ([]*models.Transaction, error)

type TransactionsService

type TransactionsService interface {
	ExpandTags(ctx context.Context, transactions []*models.Transaction) error
}

type WalletRepository

type WalletRepository interface {
	ForUser(ctx context.Context, userId int) ([]*models.Wallet, error)
	HasPermission(ctx context.Context, walletId, userId int) (bool, error)
}

Jump to

Keyboard shortcuts

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