money

package
v0.0.0-...-b45a7ae Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
}

func (Field) DeserializeValueFromString

func (m Field) DeserializeValueFromString(s string) (interface{}, error)

func (Field) GetFieldType

func (m Field) GetFieldType() field.Field

func (Field) MapValueToAlias

func (m Field) MapValueToAlias(original interface{}) (storage interface{}, err error)

func (Field) MarshalJSON

func (m Field) MarshalJSON() ([]byte, error)

func (Field) SerializeValueToString

func (m Field) SerializeValueToString(value interface{}) string

func (Field) UnmapValueFromAlias

func (m Field) UnmapValueFromAlias(storage interface{}) (original interface{})

type Value

type Value struct {
	Value decimal.Decimal
	Unit  string
}

func New

func New(value decimal.Decimal, unit string) *Value

func NewFromFloat

func NewFromFloat(value float64, unit string) *Value

TODO: think about this

func NewFromString

func NewFromString(s string) *Value

func (*Value) Equal

func (value *Value) Equal(other *Value) bool

func (*Value) MarshalJSON

func (value *Value) MarshalJSON() ([]byte, error)

func (*Value) String

func (value *Value) String() string

Jump to

Keyboard shortcuts

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