usecase

package
v0.0.0-...-0091320 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PixKeyUseCase

type PixKeyUseCase struct {
	PixKeyRepository model.PixKeyRepositoryInterface
}

PixKeyUseCase represents a use case for pix keys

func (*PixKeyUseCase) FindKey

func (useCase *PixKeyUseCase) FindKey(kind string, key string) (*model.PixKey, error)

FindKey search a pix key by kind and key

func (*PixKeyUseCase) RegisterKey

func (useCase *PixKeyUseCase) RegisterKey(kind string, key string, accountID string) (*model.PixKey, error)

RegisterKey registers a new key

type TransactionUseCase

type TransactionUseCase struct {
	PixKeyRepository      model.PixKeyRepositoryInterface
	TransactionRepository model.TransactionRepositoryInterface
}

TransactionUseCase represents a use case for transactions

func (*TransactionUseCase) Complete

func (useCase *TransactionUseCase) Complete(transactionID string) (*model.Transaction, error)

Complete completes a transaction

func (*TransactionUseCase) Confirm

func (useCase *TransactionUseCase) Confirm(transactionID string) (*model.Transaction, error)

Confirm confirms a transaction

func (*TransactionUseCase) Error

func (useCase *TransactionUseCase) Error(transactionID string, cancelDescription string) (*model.Transaction, error)

Error cancels a transaction

func (*TransactionUseCase) Register

func (useCase *TransactionUseCase) Register(accountID string, amount float64, pixKeyTo string, pixKeyKindTo string, description string, id string) (*model.Transaction, error)

Register registers a new transaction

Jump to

Keyboard shortcuts

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