repo

package
v0.0.0-...-edd34d3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WalletRepo

type WalletRepo interface {
	CreateAccount(ctx context.Context, accountID, initBalance int64, currency string) error
	GetAccounts(ctx context.Context, accountIDs []int64) ([]*model.Wallet, error)
	SubmitTransaction(ctx context.Context, sourceAccountID, destinationAccountID int64, amount float64) error
}

func CreateWalletRepo

func CreateWalletRepo(dbClient *gorm.DB) WalletRepo

type WalletRepoImpl

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

func (*WalletRepoImpl) CreateAccount

func (r *WalletRepoImpl) CreateAccount(ctx context.Context, accountID, initBalance int64, currency string) error

func (*WalletRepoImpl) GetAccounts

func (r *WalletRepoImpl) GetAccounts(ctx context.Context, accountIDs []int64) ([]*model.Wallet, error)

func (*WalletRepoImpl) SubmitTransaction

func (r *WalletRepoImpl) SubmitTransaction(ctx context.Context, sourceAccountID, destinationAccountID int64, amount float64) error

Jump to

Keyboard shortcuts

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