decimal

package
v0.0.0-...-d5f3c33 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decimal128

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

Decimal128 holds decimal128 BSON values.

func NewDecimal128

func NewDecimal128(h, l uint64) Decimal128

NewDecimal128 creates a Decimal128 using the provide high and low uint64s.

func ParseDecimal128

func ParseDecimal128(s string) (Decimal128, error)

ParseDecimal128 takes the given string and attempts to parse it into a valid Decimal128 value.

func (Decimal128) GetBytes

func (d Decimal128) GetBytes() (uint64, uint64)

GetBytes returns the underlying bytes of the BSON decimal value as two uint16 values. The first contains the most first 8 bytes of the value and the second contains the latter.

func (Decimal128) String

func (d Decimal128) String() string

String returns a string representation of the decimal value.

Jump to

Keyboard shortcuts

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