update_invoice

package
v0.0.0-...-4d895cd Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalendarService

type CalendarService interface {
	Sync(ctx context.Context) error
}

type ContactsRepository

type ContactsRepository interface {
	GetByID(ctx context.Context, id uint64) (*entities.Contact, error)
}

type InvoicesRepository

type InvoicesRepository interface {
	GetByID(ctx context.Context, id uint64) (*entities.Invoice, error)
	GetByTemplateID(ctx context.Context, id uint64) ([]entities.Invoice, error)
}

type InvoicesService

type InvoicesService interface {
	GetScheduledInvoices(ctx context.Context, template entities.InvoiceTemplate) ([]entities.Invoice, error)
}

type Logger

type Logger interface {
	Warn(msg string, fields ...log.Field)
}

type PeriodsRepository

type PeriodsRepository interface {
	GetLast(ctx context.Context) (*entities.Period, error)
}

type UnitOfWork

type UnitOfWork interface {
	CreateInvoices(invoices []entities.Invoice, template entities.InvoiceTemplate)
	DeleteInvoice(id uint64)
	DeleteTemplate(id uint64)
	UpdateInvoice(invoice entities.Invoice)
	Commit(ctx context.Context) error
}

type UseCase

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

func NewUseCase

func NewUseCase(
	periods PeriodsRepository,
	invoices InvoicesRepository,
	contacts ContactsRepository,
	service InvoicesService,
	calendar CalendarService,
	logger Logger,
	uow UnitOfWork,
) *UseCase

func (*UseCase) Execute

func (u *UseCase) Execute(ctx context.Context, req port.UpdateInvoiceRequest) error

Jump to

Keyboard shortcuts

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