burrow: github.com/hyperledger/burrow/acm/balance Index | Files

package balance

import "github.com/hyperledger/burrow/acm/balance"

Index

Package Files

balance.go balance.pb.go type.go

Variables

var (
    ErrInvalidLengthBalance        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowBalance          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupBalance = fmt.Errorf("proto: unexpected end of group")
)

func NativeToWei Uses

func NativeToWei(n uint64) *big.Int

func WeiToNative Uses

func WeiToNative(n []byte) *big.Int

type Balance Uses

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"`
    XXX_unrecognized []byte `json:"-"`
}

func Native Uses

func Native(native uint64) Balance

func Power Uses

func Power(power uint64) Balance

func (*Balance) Descriptor Uses

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

func (*Balance) GetAmount Uses

func (m *Balance) GetAmount() uint64

func (*Balance) GetType Uses

func (m *Balance) GetType() Type

func (*Balance) Marshal Uses

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

func (*Balance) MarshalTo Uses

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

func (*Balance) MarshalToSizedBuffer Uses

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

func (*Balance) ProtoMessage Uses

func (*Balance) ProtoMessage()

func (*Balance) Reset Uses

func (m *Balance) Reset()

func (*Balance) Size Uses

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

func (Balance) String Uses

func (b Balance) String() string

func (*Balance) Unmarshal Uses

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

func (*Balance) XXX_DiscardUnknown Uses

func (m *Balance) XXX_DiscardUnknown()

func (*Balance) XXX_Marshal Uses

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

func (*Balance) XXX_Merge Uses

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

func (*Balance) XXX_MessageName Uses

func (*Balance) XXX_MessageName() string

func (*Balance) XXX_Size Uses

func (m *Balance) XXX_Size() int

func (*Balance) XXX_Unmarshal Uses

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

type Balances Uses

type Balances []Balance

func New Uses

func New() Balances

func Sum Uses

func Sum(bss ...Balances) Balances

func (Balances) Add Uses

func (bs Balances) Add(ty Type, amount uint64) Balances

func (Balances) Get Uses

func (bs Balances) Get(ty Type) *uint64

func (Balances) GetFallback Uses

func (bs Balances) GetFallback(ty Type, fallback uint64) uint64

func (Balances) GetNative Uses

func (bs Balances) GetNative(fallback uint64) uint64

func (Balances) GetPower Uses

func (bs Balances) GetPower(fallback uint64) uint64

func (Balances) Has Uses

func (bs Balances) Has(ty Type) bool

func (Balances) HasNative Uses

func (bs Balances) HasNative() bool

func (Balances) HasPower Uses

func (bs Balances) HasPower() bool

func (Balances) Len Uses

func (bs Balances) Len() int

func (Balances) Less Uses

func (bs Balances) Less(i, j int) bool

func (Balances) Native Uses

func (bs Balances) Native(amount uint64) Balances

func (Balances) Power Uses

func (bs Balances) Power(amount uint64) Balances

func (Balances) Sort Uses

func (bs Balances) Sort() Balances

func (Balances) Sum Uses

func (bs Balances) Sum(bss ...Balances) Balances

func (Balances) Swap Uses

func (bs Balances) Swap(i, j int)

type Type Uses

type Type uint32
const (
    TypeNative Type = 1
    TypePower  Type = 2
)

func TypeFromString Uses

func TypeFromString(name string) Type

func (Type) Marshal Uses

func (typ Type) Marshal() ([]byte, error)

Protobuf support

func (Type) MarshalText Uses

func (typ Type) MarshalText() ([]byte, error)

func (Type) String Uses

func (typ Type) String() string

func (*Type) Unmarshal Uses

func (typ *Type) Unmarshal(data []byte) error

func (*Type) UnmarshalText Uses

func (typ *Type) UnmarshalText(data []byte) error

Package balance imports 9 packages (graph) and is imported by 16 packages. Updated 2020-03-13. Refresh now. Tools for package owners.