domain

package
v0.0.0-...-f5200a7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amount

type Amount struct {
	Value float64
}

func ConvertCurrency

func ConvertCurrency(amountQuant, rate Amount) Amount

func (*Amount) New

func (a *Amount) New(text string) error

type Currency

type Currency struct {
	Text   string
	Symbol string
}

func (*Currency) New

func (cur *Currency) New(text string) error

func (Currency) Valid

func (cur Currency) Valid() bool

type Repo

type Repo interface {
	GetExchange(ctx context.Context, currencyFrom, currencyTo Currency, amountQuant, rate Amount) (*Amount, error)
	StoreExchange(ctx context.Context, currencyFrom, currencyTo Currency, amountQuant, rate, amountConv Amount) error
}

Jump to

Keyboard shortcuts

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