Documentation ¶
Overview ¶
Package balance is a generated protocol buffer package.
It is generated from these files:
balance.proto
It has these top-level messages:
Balance
Index ¶
- Variables
- type Balance
- func (*Balance) Descriptor() ([]byte, []int)
- func (m *Balance) GetAmount() uint64
- func (m *Balance) GetType() Type
- func (m *Balance) Marshal() (dAtA []byte, err error)
- func (m *Balance) MarshalTo(dAtA []byte) (int, error)
- func (*Balance) ProtoMessage()
- func (m *Balance) Reset()
- func (m *Balance) Size() (n int)
- func (b Balance) String() string
- func (m *Balance) Unmarshal(dAtA []byte) error
- func (*Balance) XXX_MessageName() string
- type Balances
- func (bs Balances) Add(ty Type, amount uint64) Balances
- func (bs Balances) Get(ty Type) *uint64
- func (bs Balances) GetFallback(ty Type, fallback uint64) uint64
- func (bs Balances) GetNative(fallback uint64) uint64
- func (bs Balances) GetPower(fallback uint64) uint64
- func (bs Balances) Has(ty Type) bool
- func (bs Balances) HasNative() bool
- func (bs Balances) HasPower() bool
- func (bs Balances) Len() int
- func (bs Balances) Less(i, j int) bool
- func (bs Balances) Native(amount uint64) Balances
- func (bs Balances) Power(amount uint64) Balances
- func (bs Balances) Sort() Balances
- func (bs Balances) Sum(bss ...Balances) Balances
- func (bs Balances) Swap(i, j int)
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthBalance = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBalance = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type Balance ¶
type Balance struct { Type Type `protobuf:"varint,1,opt,name=Type,proto3,casttype=Type" json:"Type,omitempty"` Amount uint64 `protobuf:"varint,2,opt,name=Amount,proto3" json:"Amount,omitempty"` }
func (*Balance) Descriptor ¶
func (*Balance) ProtoMessage ¶
func (*Balance) ProtoMessage()
func (*Balance) XXX_MessageName ¶
type Type ¶
type Type uint32
func TypeFromString ¶
func (Type) MarshalText ¶
func (*Type) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.