bank

package
v0.0.0-...-a2a1f02 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBalance

func GetBalance(b Banker, name string) int

GetBalance gets balance

func GetBankInfo

func GetBankInfo(b Banker) string

GetBankInfo gets bank info

func MakeDeposit

func MakeDeposit(b Banker, name string, deposit int) int

MakeDeposit makes a deposit

func MakeWithdraw

func MakeWithdraw(b Banker, name string, withdraw int) int

MakeWithdraw makes a withdrawal

func NewBoaAccount

func NewBoaAccount(b Banker, name string, deposit int)

NewBoaAccount to crate an account at a bank

func NewBoaCard

func NewBoaCard(b Banker, name string) card.Carder

NewBoaCard to crate a card that can be used at an atm

Types

type Banker

type Banker interface {
	// contains filtered or unexported methods
}

Banker interface

func NewBoaBank

func NewBoaBank(name string) Banker

NewBoaBank creates a Bank

type BoaBank

type BoaBank struct {
	BranchName string
	Accounts   map[string]int
}

BoaBank is the data

Jump to

Keyboard shortcuts

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