mm

package
v0.0.0-...-6c4cad4 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Euro           Currency = "€"
	Dollar                  = "$"
	CanadianDollar          = "C$"
)

Possible currency

Variables

View Source
var ErrCanNotAddOperation = errors.Errorf("can not add operation wallet item not found")

ErrCanNotAddOperation means that the operation can not be added to the wallet

View Source
var ErrInvalidIDFormat = errors.New("Invalid ID format. Should be of type uuid, e.g.:\"c0c48a8f-fa6b-4467-9fd3-3bfc96ed44bb\"")

ErrInvalidIDFormat means that the ID format is not valid

View Source
var ErrNotFound = errors.New("Not found")

ErrNotFound is a common not found error

Functions

This section is empty.

Types

type Currency

type Currency string

Type holds different compensation type definitions

func ExchangeCurrency

func ExchangeCurrency(e string) Currency

type Value

type Value struct {
	Amount   float64
	Currency Currency
}

func ValueDollarFromString

func ValueDollarFromString(s string) Value

func ValueEuroFromString

func ValueEuroFromString(s string) Value

func ValueFromStringAndExchange

func ValueFromStringAndExchange(s, e string) Value

func (*Value) Compare

func (v *Value) Compare(a Value) int

Compare to values 1 - gt than 0 - eq -1 - lt than

func (*Value) Decrease

func (v *Value) Decrease(a Value) Value

func (*Value) Increase

func (v *Value) Increase(a Value) Value

Directories

Path Synopsis
account
banking
purchase

Jump to

Keyboard shortcuts

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