storage

package
v0.0.0-...-71bfedf Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListInvoicesFilter

type ListInvoicesFilter struct {
	IDIn        []uuid.UUID
	AddressIn   []string
	ClientIDIn  []uuid.UUID
	StatusIn    []desc.InvoiceStatus
	CreatedAtLt *time.Time
}

type Model

type Model interface {
	TableName() string
}

type Storage

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

func New

func New(pool *pgxpool.Pool) *Storage

func (*Storage) CreateInvoice

func (s *Storage) CreateInvoice(ctx context.Context, invoice *models.Invoice) (*models.Invoice, error)

func (*Storage) CreateInvoiceOutbox

func (s *Storage) CreateInvoiceOutbox(ctx context.Context, invoice *models.Invoice) (*models.InvoiceOutbox, error)

func (*Storage) DeleteInvoicesOutbox

func (s *Storage) DeleteInvoicesOutbox(ctx context.Context, ids []int) error

func (*Storage) ListInvoices

func (s *Storage) ListInvoices(ctx context.Context, filter ListInvoicesFilter) ([]*models.Invoice, error)

func (*Storage) ListInvoicesOutbox

func (s *Storage) ListInvoicesOutbox(ctx context.Context, limit uint64) ([]*models.InvoiceOutbox, error)

func (*Storage) UpdateInvoice

func (s *Storage) UpdateInvoice(ctx context.Context, invoice *models.Invoice) (*models.Invoice, error)

Jump to

Keyboard shortcuts

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