repository

package
v0.0.0-...-47cfc89 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bid

type Bid interface {
	CreateBid(ctx context.Context, investor *BidEntity, tx *sqlx.Tx) (*BidEntity, error)
	ListBids(ctx context.Context, invoiceID uuid.UUID) ([]BidEntity, error)
}

Bid is a interface that contains the methods for the Bidding services

type BidEntity

type BidEntity struct {
	ID         uuid.UUID
	InvoiceID  uuid.UUID
	InvestorID uuid.UUID
	Amount     int64
	Currency   string
	Created    time.Time
	Updated    time.Time
}

BidEntity represents a bid entity

type Investor

type Investor interface {
	CreateInvestor(ctx context.Context, investor *InvestorEntity, tx *sqlx.Tx) (*InvestorEntity, error)
	GetInvestor(ctx context.Context, id uuid.UUID) (*InvestorWithWalletEntity, error)
	ListInvestor(ctx context.Context, paging *Paging) ([]InvestorWithWalletEntity, error)
	DeleteInvestor(ctx context.Context, id uuid.UUID, tx *sqlx.Tx) error
}

Investor is a interface that contains the methods for the investor services

type InvestorEntity

type InvestorEntity struct {
	ID        uuid.UUID
	VatNumber string
	Name      string
	Created   time.Time
	Updated   time.Time
}

InvestorEntity entity

type InvestorWithWalletEntity

type InvestorWithWalletEntity struct {
	InvestorEntity
	Wallet *WalletEntity
}

InvestorWithWalletEntity entity

type InvestorsRepo

type InvestorsRepo interface {
	Investor
	Wallet
	TransactionProvider
}

InvestorsRepo is a interface that contains the methods for the Investor and its wallets services

type Invoice

type Invoice interface {
	CreateInvoice(ctx context.Context, invoice *InvoiceEntity, tx *sqlx.Tx) (*InvoiceEntity, error)
	GetInvoice(ctx context.Context, id uuid.UUID) (*InvoiceEntity, error)
	UpdateInvoice(ctx context.Context, invoice *InvoiceEntity, tx *sqlx.Tx) error
	ListInvoice(ctx context.Context, paging *Paging) ([]InvoiceEntity, error)
	DeleteInvoice(ctx context.Context, id uuid.UUID, tx *sqlx.Tx) error
}

Invoice is a interface that contains the methods for the invoice services

type InvoiceEntity

type InvoiceEntity struct {
	ID          uuid.UUID
	IssuerID    uuid.UUID
	Number      string
	Description string
	Status      string
	Amount      int64
	Currency    string
	Created     time.Time
	Updated     time.Time
}

InvoiceEntity entity

type InvoicesRepo

type InvoicesRepo interface {
	Investor
	Invoice
	Issuer
	Wallet
	Bid
	TransactionProvider
}

InvoicesRepo is a interface that contains the methods for the various invoices services

type Issuer

type Issuer interface {
	CreateIssuer(ctx context.Context, investor *IssuerEntity, tx *sqlx.Tx) (*IssuerEntity, error)
	GetIssuer(ctx context.Context, id uuid.UUID) (*IssuerWithWalletEntity, error)
	ListIssuer(ctx context.Context, paging *Paging) ([]IssuerWithWalletEntity, error)
	DeleteIssuer(ctx context.Context, id uuid.UUID, tx *sqlx.Tx) error
}

Issuer is a interface that contains the methods for the issuer services

type IssuerEntity

type IssuerEntity struct {
	ID      uuid.UUID
	Name    string
	Created time.Time
	Updated time.Time
}

IssuerEntity model

type IssuerWithWalletEntity

type IssuerWithWalletEntity struct {
	IssuerEntity
	Wallet *WalletEntity
}

IssuerWithWalletEntity entity

type IssuersRepo

type IssuersRepo interface {
	Issuer
	Wallet
	TransactionProvider
}

IssuersRepo is a interface that contains the methods for the Issuer and its wallets services

type Paging

type Paging struct {
	Page  int
	Limit int
}

Paging entity

type TransactionProvider

type TransactionProvider interface {
	NewTransaction(ctx context.Context) (*sqlx.Tx, error)
}

TransactionProvider is a interface that contains the methods for transactions

type Wallet

type Wallet interface {
	CreateWallet(ctx context.Context, investor *WalletEntity, tx *sqlx.Tx) (*WalletEntity, error)
	GetWallet(ctx context.Context, id uuid.UUID) (*WalletEntity, error)
	UpdateWallet(ctx context.Context, investor *WalletEntity, tx *sqlx.Tx) (*WalletEntity, error)
	ListWallets(ctx context.Context, paging *Paging) ([]WalletEntity, error)
}

Wallet is a interface that contains the methods for the wallet services

type WalletEntity

type WalletEntity struct {
	ID       uuid.UUID
	RefID    uuid.UUID
	Currency string
	Amount   int64
	Created  time.Time
	Updated  time.Time
}

WalletEntity entity

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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