decimal_j5t

package
v0.0.0-...-7fdb683 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_j5_types_decimal_v1_decimal_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Decimal

type Decimal struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func FromFloat

func FromFloat(f float64) *Decimal

func FromInt

func FromInt(i int64) *Decimal

func FromShop

func FromShop(d decimal.Decimal) *Decimal

func FromString

func FromString(s string) *Decimal

func Zero

func Zero() *Decimal

func (*Decimal) Add

func (d *Decimal) Add(d2 *Decimal) *Decimal

func (*Decimal) Decimal

func (d *Decimal) Decimal() decimal.Decimal

func (*Decimal) Descriptor deprecated

func (*Decimal) Descriptor() ([]byte, []int)

Deprecated: Use Decimal.ProtoReflect.Descriptor instead.

func (*Decimal) Div

func (d *Decimal) Div(d2 *Decimal) (*Decimal, error)

func (*Decimal) GetValue

func (x *Decimal) GetValue() string

func (*Decimal) Mul

func (d *Decimal) Mul(d2 *Decimal) (*Decimal, error)

func (*Decimal) Neg

func (d *Decimal) Neg() *Decimal

func (*Decimal) ProtoMessage

func (*Decimal) ProtoMessage()

func (*Decimal) ProtoReflect

func (x *Decimal) ProtoReflect() protoreflect.Message

func (*Decimal) Reset

func (x *Decimal) Reset()

func (*Decimal) Scan

func (d *Decimal) Scan(src any) error

Scan implements sql.Scanner

func (*Decimal) String

func (x *Decimal) String() string

func (*Decimal) Sub

func (d *Decimal) Sub(d2 *Decimal) *Decimal

func (*Decimal) ToShop

func (d *Decimal) ToShop() (decimal.Decimal, error)

func (*Decimal) ToString

func (d *Decimal) ToString() string

Jump to

Keyboard shortcuts

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