v1

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

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

Go to latest
Published: Feb 25, 2020 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Decimal) Equal

func (this *Decimal) Equal(that interface{}) bool

func (*Decimal) GetNegative

func (m *Decimal) GetNegative() bool

func (*Decimal) GetScale

func (m *Decimal) GetScale() int32

func (*Decimal) GetValue

func (m *Decimal) GetValue() []byte

func (*Decimal) GoString

func (this *Decimal) GoString() string

func (*Decimal) Marshal

func (m *Decimal) Marshal() (dAtA []byte, err error)

func (*Decimal) MarshalTo

func (m *Decimal) MarshalTo(dAtA []byte) (int, error)

func (*Decimal) MarshalToSizedBuffer

func (m *Decimal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Decimal) ProtoMessage

func (*Decimal) ProtoMessage()

func (*Decimal) Reset

func (m *Decimal) Reset()

func (*Decimal) Size

func (m *Decimal) Size() (n int)

func (*Decimal) String

func (this *Decimal) String() string

func (*Decimal) Unmarshal

func (m *Decimal) Unmarshal(dAtA []byte) error

func (*Decimal) XXX_DiscardUnknown

func (m *Decimal) XXX_DiscardUnknown()

func (*Decimal) XXX_Marshal

func (m *Decimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Decimal) XXX_Merge

func (m *Decimal) XXX_Merge(src proto.Message)

func (*Decimal) XXX_Size

func (m *Decimal) XXX_Size() int

func (*Decimal) XXX_Unmarshal

func (m *Decimal) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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