Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCreator ¶
AccountCreator defines the behaviour about how to create an account
type AccountFinder ¶
AccountFinder defines the behaviour about how to find an account
type CreateAccount ¶
type CreateAccount struct {
// contains filtered or unexported fields
}
CreateAccount contains the dependencies to create an account
func NewCreateAccount ¶
func NewCreateAccount(logger *log.Logger, accountCreator AccountCreator) *CreateAccount
NewCreateAccount creates a new CreateAccount struct with its dependencies
func (CreateAccount) Handler ¶
func (h CreateAccount) Handler(rw http.ResponseWriter, req *http.Request)
Handler exposes the http handler
type CreateTransaction ¶
type CreateTransaction struct {
// contains filtered or unexported fields
}
CreateTransaction contains the dependencies to create a transaction
func NewCreateTransaction ¶
func NewCreateTransaction(logger *log.Logger, transactionCreator TransactionCreator) *CreateTransaction
NewCreateTransaction creates a new CreateTransaction struct with its dependencies
func (CreateTransaction) Handler ¶
func (h CreateTransaction) Handler(rw http.ResponseWriter, req *http.Request)
Handler exposes the http handler
type FindAccount ¶
type FindAccount struct {
// contains filtered or unexported fields
}
FindAccount contains the dependencies to find an account
func NewFindAccount ¶
func NewFindAccount(logger *log.Logger, accountFinder AccountFinder) *FindAccount
NewFindAccount creates a new FindAccount struct
func (FindAccount) Handler ¶
func (f FindAccount) Handler(rw http.ResponseWriter, req *http.Request)
Handler exposes the http handler
type TransactionCreator ¶
type TransactionCreator interface {
Create(*domain.ID, *domain.ID, float64) (*domain.Transaction, error)
}
TransactionCreator defines the behaviour about how to create a transaction