service

package
v0.0.0-...-1a1045e Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCurService

func NewCurService(apiKey string) *curService

init service

Types

type FinanceService

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

func NewFinanceService

func NewFinanceService(repo IRepo) *FinanceService

func (*FinanceService) Close

func (f *FinanceService) Close(ctx context.Context) error

func (*FinanceService) GetBalance

func (f *FinanceService) GetBalance(ctx context.Context, inp *domain.BalanceInput) (float64, error)

func (*FinanceService) GetTransactionsList

func (*FinanceService) MakeRemittance

func (f *FinanceService) MakeRemittance(ctx context.Context, inp *domain.RemittanceInput) error

func (*FinanceService) MakeTransaction

func (f *FinanceService) MakeTransaction(ctx context.Context, inp *domain.TransactionInput) error

type IRepo

type IRepo interface {
	//main
	MakeTransaction(ctx context.Context, inp *domain.TransactionInput) error
	MakeRemittance(ctx context.Context, inp *domain.RemittanceInput) error
	GetBalance(ctx context.Context, inp *domain.BalanceInput) (float64, error)
	GetTransactionsList(ctx context.Context, inp *domain.TransactionsListInput) ([]domain.TransactionsList, error)
	//sub
	CreateNewTransaction(ctx context.Context, idFrom uuid.UUID, operation string, sum float64, idTo uuid.UUID, description string) error
	Close(ctx context.Context) error
}

Directories

Path Synopsis
Package mock_service is a generated GoMock package.
Package mock_service is a generated GoMock package.

Jump to

Keyboard shortcuts

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