s

package
v0.0.0-...-3facaca Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: CC0-1.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	BalanceInCents int
	// contains filtered or unexported fields
}

func (*Account) TransferMoneyTo

func (a *Account) TransferMoneyTo(token *sessionToken, receivingParty Iban, amount int) error

type AuthenticationService

type AuthenticationService struct {
	UsersByLoginId map[string]User
}

func (*AuthenticationService) Authenticate

func (as *AuthenticationService) Authenticate(login string, password string) (*sessionToken, error)

type Iban

type Iban string

type SecuredBankAccount

type SecuredBankAccount struct {
	Iban     string
	Balance  float64 //€
	Password string
}

Single Responsibility Principle -- BAD--

func (*SecuredBankAccount) TransferMoneyTo

func (b *SecuredBankAccount) TransferMoneyTo(password string, receivingParty SecuredBankAccount, amount int)

type User

type User struct {
	Accounts []Account
	Password string
}

Jump to

Keyboard shortcuts

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