storage

package
v0.0.0-...-fca3b85 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 11 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) ListInvoices

func (s *Storage) ListInvoices(ctx context.Context, filter ListInvoicesFilter, pagination postgres.Pagination) ([]*models.Invoice, 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