Documentation
¶
Overview ¶
Package account provides the use-case of accounts management. Used by views facing an administrator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { ID wallet.AccountID `json:"id"` Balance wallet.Money `json:"balance"` Currency wallet.Currency `json:"currency"` }
Account is a read model for account views.
type ErrorResp ¶
type ErrorResp struct {
Error error `json:"error"`
}
func (*ErrorResp) MarshalJSON ¶
func (*ErrorResp) StatusCode ¶
type Service ¶
type Service interface { // List shows all available accounts List(ctx context.Context) ([]Account, error) // One shows accounts One(ctx context.Context, id wallet.AccountID) (Account, error) }
Service provides account related methods.
func NewInstrumenting ¶
NewInstrumenting returns an instance of an instrumenting Service.
func NewLoggingService ¶
NewLoggingService returns a new instance of a logging Service.
func NewService ¶
NewService service constructor
Click to show internal directories.
Click to hide internal directories.