genproto: Index | Files

package money

import ""


Package Files


type Money Uses

type Money struct {
    // The 3-letter currency code defined in ISO 4217.
    CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
    // The whole units of the amount.
    // For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
    Units int64 `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"`
    // Number of nano (10^-9) units of the amount.
    // The value must be between -999,999,999 and +999,999,999 inclusive.
    // If `units` is positive, `nanos` must be positive or zero.
    // If `units` is zero, `nanos` can be positive, zero, or negative.
    // If `units` is negative, `nanos` must be negative or zero.
    // For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
    Nanos                int32    `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`

Represents an amount of money with its currency type.

func (*Money) Descriptor Uses

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

func (*Money) GetCurrencyCode Uses

func (m *Money) GetCurrencyCode() string

func (*Money) GetNanos Uses

func (m *Money) GetNanos() int32

func (*Money) GetUnits Uses

func (m *Money) GetUnits() int64

func (*Money) ProtoMessage Uses

func (*Money) ProtoMessage()

func (*Money) Reset Uses

func (m *Money) Reset()

func (*Money) String Uses

func (m *Money) String() string

func (*Money) XXX_DiscardUnknown Uses

func (m *Money) XXX_DiscardUnknown()

func (*Money) XXX_Marshal Uses

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

func (*Money) XXX_Merge Uses

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

func (*Money) XXX_Size Uses

func (m *Money) XXX_Size() int

func (*Money) XXX_Unmarshal Uses

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

Package money imports 3 packages (graph) and is imported by 7 packages. Updated 2019-10-02. Refresh now. Tools for package owners.