service

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountService

func NewAccountService(
	accountRepo domain.AccountRepository,
	userRepo domain.UserRepository,
	auditRepo domain.AuditRepository,
) domain.AccountService

NewAccountService creates a new instance of AccountService.

func NewAdminService

func NewAdminService(
	tenantRepo domain.AdminTenantRepository,
	userRepo domain.AdminUserRepository,
	adminAudit domain.AdminAuditRepository,
	auditRepo domain.AuditRepository,
) domain.AdminService

NewAdminService creates a new system-wide administrative service.

func NewAuthService

func NewAuthService(
	authRepo domain.AuthRepository,
	userRepo domain.UserRepository,
	auditRepo domain.AuditRepository,
	mailer domain.Mailer,
	pasetoKey paseto.V4SymmetricKey,
) domain.AuthService

NewAuthService creates a new authentication service.

func NewCategoryService

func NewCategoryService(categoryRepo domain.CategoryRepository, auditRepo domain.AuditRepository) domain.CategoryService

NewCategoryService creates a new instance of CategoryService.

func NewMasterPurchaseService added in v1.10.0

func NewMasterPurchaseService(
	mpRepo domain.MasterPurchaseRepository,
	accountRepo domain.AccountRepository,
	catRepo domain.CategoryRepository,
) domain.MasterPurchaseService

NewMasterPurchaseService creates a new MasterPurchaseService implementation.

func NewTenantService

func NewTenantService(
	tenantRepo domain.TenantRepository,
	userRepo domain.UserRepository,
	auditRepo domain.AuditRepository,
) domain.TenantService

NewTenantService creates a new instance of TenantService.

func NewTransactionService

func NewTransactionService(
	txRepo domain.TransactionRepository,
	accountRepo domain.AccountRepository,
	categoryRepo domain.CategoryRepository,
	auditRepo domain.AuditRepository,
) domain.TransactionService

NewTransactionService creates a new instance of TransactionService.

Types

type InvoiceCloser added in v1.10.0

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

InvoiceCloser materializes installment transactions at invoice-close time.

func NewInvoiceCloser added in v1.10.0

NewInvoiceCloser creates a new InvoiceCloser.

func (*InvoiceCloser) CloseInvoice added in v1.10.0

func (c *InvoiceCloser) CloseInvoice(
	ctx context.Context,
	tenantID string,
	accountID string,
	closingDate time.Time,
) (domain.CloseInvoiceResult, error)

CloseInvoice finds all open master purchases for the account due on or before closingDate, materializes the current installment as a transaction, and advances paid_installments. Runs each master purchase in its own DB transaction.

Jump to

Keyboard shortcuts

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