Documentation ¶
Overview ¶
Package account provides the use-case of manipulating with user's account.
Package account provides the use-case of manipulating with user's account.
Package account provides the use-case of manipulating with user's account.
Package account provides the use-case of manipulating with user's account.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidArgument is returned when one or more arguments are invalid ErrInvalidArgument = errors.New("invalid argument") // ErrAccountNotFound is returned when one user account was not found ErrAccountNotFound = errors.New("account not found") // ErrTransferFailed is returned when transfer between accounts failed ErrTransferFailed = errors.New("transfer error") )
Functions ¶
Types ¶
type Service ¶
type Service interface {
Transfer(from coins.AccountID, to coins.AccountID, amount decimal.Decimal) (bool, error)
}
Service is the interface that provides account methods.
func NewLoggingService ¶
NewLoggingService returns a new instance of a logging Service.
func NewService ¶
func NewService(accounts coins.AccountRepository, payments coins.PaymentRepository, txs coins.TxStarter) Service
NewService returns new Service with it's dependencies
Click to show internal directories.
Click to hide internal directories.