accountfinder

package
v0.0.0-...-1bf65b7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package accountfinder provides the use-case of searching for user's accounts.

Package accountfinder provides the use-case of searching for user's accounts.

Package accountfinder provides the use-case of searching for user's accounts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHandler

func MakeHandler(ac Service, logger kitlog.Logger) http.Handler

MakeHandler creates http handler for searching users accounts

Types

type Account

type Account struct {
	ID       string          `json:"id"`
	Balance  decimal.Decimal `json:"balance"`
	Currency string          `json:"currency"`
}

Account is a model with user's account data that is accessible through API

type Service

type Service interface {
	Accounts() ([]Account, error)
}

Service is the interface that provides methods for accounts lookup.

func NewService

func NewService(accounts coins.AccountRepository) Service

NewService returns new Service with it's dependencies

Jump to

Keyboard shortcuts

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