currency

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2016 License: ISC Imports: 3 Imported by: 2

Documentation

Overview

types and functions for converting currencies to/from enumeration values

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Currency

type Currency uint64

currency enumeration

const (
	Nothing Currency = iota // this must be the first value
	Bitcoin Currency = iota

	First Currency = Nothing + 1
	Last  Currency = maximumValue - 1
)

possible currency values

func FromUint64

func FromUint64(n uint64) (Currency, error)

convert a number to a currency

func (Currency) GoString

func (currency Currency) GoString() string

convert abot enum value and symbol, for debugging

func (Currency) MarshalText

func (currency Currency) MarshalText() ([]byte, error)

convert a currency into JSON

func (*Currency) Scan

func (currency *Currency) Scan(state fmt.ScanState, verb rune) error

convert a big endian hex representation to a digest for use by the format package scan routines

func (Currency) String

func (currency Currency) String() string

convert a currency to its string symbol

func (Currency) Uint64

func (currency Currency) Uint64() uint64

convert the currency to a number

func (*Currency) UnmarshalText

func (currency *Currency) UnmarshalText(s []byte) error

convert currency string to a currency enumeration value from JSON

Jump to

Keyboard shortcuts

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