service

package
v0.0.0-...-3390983 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveLoan

type ActiveLoan struct {
	AmountRemaining int
}

type Loans

type Loans struct {
	// contains filtered or unexported fields
}

func FromSnapshot

func FromSnapshot(snapshot Snapshot) *Loans

func (*Loans) GetActiveLoan

func (l *Loans) GetActiveLoan(userID string) (ActiveLoan, error)

func (*Loans) PayLoan

func (l *Loans) PayLoan(userID string, amount int) error

func (*Loans) Snapshot

func (l *Loans) Snapshot() Snapshot

func (*Loans) TakeLoan

func (l *Loans) TakeLoan(userID string, amount, term int) error

type Snapshot

type Snapshot struct {
	Loans map[string]loan.Snapshot
}

Jump to

Keyboard shortcuts

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