package money
import "google.golang.org/genproto/googleapis/type/money"
Index ¶
Variables ¶
var File_google_type_money_proto protoreflect.FileDescriptor
Types ¶
type Money ¶
type Money struct {
// The three-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"`
// contains filtered or unexported fields
}
Represents an amount of money with its currency type.
func (*Money) Descriptor ¶
Deprecated: Use Money.ProtoReflect.Descriptor instead.
func (*Money) GetCurrencyCode ¶
func (*Money) GetNanos ¶
func (*Money) GetUnits ¶
func (*Money) ProtoMessage ¶
func (*Money) ProtoMessage()
func (*Money) ProtoReflect ¶
func (x *Money) ProtoReflect() protoreflect.Message
func (*Money) Reset ¶
func (x *Money) Reset()
func (*Money) String ¶
Source Files ¶
money.pb.go
- Version
- v0.0.0-20260427160629-7cedc36a6bc4 (latest)
- Published
- Apr 27, 2026
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 days ago –
Tools for package owners.