Documentation ¶
Index ¶
- Variables
- type Decimal
- func (*Decimal) Descriptor() ([]byte, []int)
- func (this *Decimal) Equal(that interface{}) bool
- func (m *Decimal) GetNegative() bool
- func (m *Decimal) GetScale() int32
- func (m *Decimal) GetValue() []byte
- func (this *Decimal) GoString() string
- func (m *Decimal) Marshal() (dAtA []byte, err error)
- func (m *Decimal) MarshalTo(dAtA []byte) (int, error)
- func (m *Decimal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Decimal) ProtoMessage()
- func (m *Decimal) Reset()
- func (m *Decimal) Size() (n int)
- func (this *Decimal) String() string
- func (m *Decimal) Unmarshal(dAtA []byte) error
- func (m *Decimal) XXX_DiscardUnknown()
- func (m *Decimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Decimal) XXX_Merge(src proto.Message)
- func (m *Decimal) XXX_Size() int
- func (m *Decimal) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthV1 = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowV1 = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type Decimal ¶
type Decimal struct { // Big-endian unsigned unlimited precision representation of the decimal coefficient // // In python, int.to_bytes, int.from_bytes // (1024).to_bytes(2, byteorder='big') // In golang, // https://godoc.org/github.com/ericlagergren/decimal#Big.Compose // https://golang.org/pkg/math/big/#Int.SetBytes // https://godoc.org/github.com/cockroachdb/apd#NewWithBigInt // Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` Scale int32 `protobuf:"varint,2,opt,name=scale,proto3" json:"scale,omitempty"` Negative bool `protobuf:"varint,3,opt,name=negative,proto3" json:"negative,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` }
Finite decimal representation
func (*Decimal) Descriptor ¶
func (*Decimal) GetNegative ¶
func (*Decimal) MarshalToSizedBuffer ¶
func (*Decimal) ProtoMessage ¶
func (*Decimal) ProtoMessage()
func (*Decimal) XXX_DiscardUnknown ¶
func (m *Decimal) XXX_DiscardUnknown()
func (*Decimal) XXX_Marshal ¶
func (*Decimal) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.