service

package
v0.0.0-...-e06aa91 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsService

type AccountsService interface {
	Deposit(ctx context.Context) (error error)
	Withdraw(ctx context.Context) (error error)
	Drop(ctx context.Context) (error error)

	Create(ctx context.Context, account io.Account) (t io.Account, error error)
	GetAccount(ctx context.Context, uuid string) (t []io.Account, error error)
	DepositAccount(ctx context.Context, deposit io.Deposit) (t io.Account, error error)
	WithdrawAccount(ctx context.Context, deposit io.Deposit) (t io.Account, error error)
}

AccountsService describes the service.

func New

func New(middleware []Middleware) AccountsService

New returns a AccountsService with all of the expected middleware wired in.

func NewBasicAccountsService

func NewBasicAccountsService() AccountsService

NewBasicAccountsService returns a naive, stateless implementation of AccountsService.

type Middleware

type Middleware func(AccountsService) AccountsService

Middleware describes a service middleware.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

LoggingMiddleware takes a logger as a dependency and returns a AccountsService Middleware.

Jump to

Keyboard shortcuts

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