extensions

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvertibleDecimal

type ConvertibleDecimal struct {
	decimal.Decimal
}

ConvertibleDecimal wraps a Decimal object so that we can implement various marshal/unmarshal functionality

func (ConvertibleDecimal) MarshalCSV

func (d ConvertibleDecimal) MarshalCSV() (string, error)

MarshalCSV converts a ConvertibleDecimal value to CSV cell value

func (ConvertibleDecimal) MarshalDynamoDBAttributeValue

func (d ConvertibleDecimal) MarshalDynamoDBAttributeValue() (types.AttributeValue, error)

MarshalDynamoDBAttributeValue converts a ConvertibleDecimal value to a DynamoDB AttributeValue

func (ConvertibleDecimal) MarshalJSON

func (d ConvertibleDecimal) MarshalJSON() ([]byte, error)

MarshalJSON converts a ConvertibleDecimal value to a JSON value

func (ConvertibleDecimal) MarshalYAML

func (d ConvertibleDecimal) MarshalYAML() (interface{}, error)

MarshalYAML converts a ConvertibleDecimal value to a YAML node value

func (*ConvertibleDecimal) Scan

func (d *ConvertibleDecimal) Scan(value interface{}) error

Scan attempts to convert an SQL driver value to a new ConvertibleDecimal value

func (*ConvertibleDecimal) UnmarshalCSV

func (d *ConvertibleDecimal) UnmarshalCSV(raw string) error

UnmarshalCSV attempts to convert a CSV cell value to a new ConvertibleDecimal value

func (*ConvertibleDecimal) UnmarshalDynamoDBAttributeValue

func (d *ConvertibleDecimal) UnmarshalDynamoDBAttributeValue(value types.AttributeValue) error

UnmarshalDynamoDBAttributeValue attempts to convert a DynamoDB AttributeVAlue to a ConvertibleDecimal value. This function can handle []bytes, numerics, or strings. If the AttributeValue is NULL then the FillPolicy value will not be modified.

func (*ConvertibleDecimal) UnmarshalJSON

func (d *ConvertibleDecimal) UnmarshalJSON(raw []byte) error

UnmarshalJSON attempts to convert a JSON value to a new ConvertibleDecimal value

func (*ConvertibleDecimal) UnmarshalYAML

func (d *ConvertibleDecimal) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML attempts to convert a YAML node to a new ConvertibleDecimal value

func (ConvertibleDecimal) Value

func (d ConvertibleDecimal) Value() (driver.Value, error)

Value converts a ConvertibleDecimal value to an SQL driver value

Jump to

Keyboard shortcuts

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