Documentation ¶
Index ¶
- type AddrByWeight
- func (*AddrByWeight) Descriptor() ([]byte, []int)
- func (m *AddrByWeight) GetAddr() *protos.TxAddr
- func (m *AddrByWeight) GetWeight() int32
- func (*AddrByWeight) ProtoMessage()
- func (m *AddrByWeight) Reset()
- func (m *AddrByWeight) String() string
- func (m *AddrByWeight) XXX_DiscardUnknown()
- func (m *AddrByWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AddrByWeight) XXX_Merge(src proto.Message)
- func (m *AddrByWeight) XXX_Size() int
- func (m *AddrByWeight) XXX_Unmarshal(b []byte) error
- type Contract
- func (*Contract) Descriptor() ([]byte, []int)
- func (m *Contract) GetAddrs() []*AddrByWeight
- func (m *Contract) GetThreshold() int32
- func (*Contract) ProtoMessage()
- func (m *Contract) Reset()
- func (m *Contract) String() string
- func (m *Contract) XXX_DiscardUnknown()
- func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Contract) XXX_Merge(src proto.Message)
- func (m *Contract) XXX_Size() int
- func (m *Contract) XXX_Unmarshal(b []byte) error
- type Contract_s
- func (n *Contract_s) Find(addr []byte) int
- func (n *Contract_s) GetObject() interface{}
- func (n *Contract_s) Load(interface{}) error
- func (n *Contract_s) LoadFromPB(p *Contract) *Contract_s
- func (n *Contract_s) Participate(addr []byte, weight int32)
- func (n *Contract_s) Save() interface{}
- func (n *Contract_s) Serialize() ([]byte, error)
- func (n *Contract_s) Sorter() addrSort
- func (n *Contract_s) ToPB() *Contract
- type Update
- func (*Update) Descriptor() ([]byte, []int)
- func (m *Update) GetAddr() *protos.TxAddr
- func (m *Update) GetAddresses() []*txutil.Address
- func (m *Update) GetFrom() *protos.TxAddr
- func (m *Update) GetTo() *protos.TxAddr
- func (*Update) ProtoMessage()
- func (m *Update) Reset()
- func (m *Update) String() string
- func (m *Update) XXX_DiscardUnknown()
- func (m *Update) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Update) XXX_Merge(src proto.Message)
- func (m *Update) XXX_Size() int
- func (m *Update) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddrByWeight ¶
type AddrByWeight struct { Addr *protos.TxAddr `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AddrByWeight) Descriptor ¶
func (*AddrByWeight) Descriptor() ([]byte, []int)
func (*AddrByWeight) GetAddr ¶
func (m *AddrByWeight) GetAddr() *protos.TxAddr
func (*AddrByWeight) GetWeight ¶
func (m *AddrByWeight) GetWeight() int32
func (*AddrByWeight) ProtoMessage ¶
func (*AddrByWeight) ProtoMessage()
func (*AddrByWeight) Reset ¶
func (m *AddrByWeight) Reset()
func (*AddrByWeight) String ¶
func (m *AddrByWeight) String() string
func (*AddrByWeight) XXX_DiscardUnknown ¶
func (m *AddrByWeight) XXX_DiscardUnknown()
func (*AddrByWeight) XXX_Marshal ¶
func (m *AddrByWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddrByWeight) XXX_Merge ¶
func (m *AddrByWeight) XXX_Merge(src proto.Message)
func (*AddrByWeight) XXX_Size ¶
func (m *AddrByWeight) XXX_Size() int
func (*AddrByWeight) XXX_Unmarshal ¶
func (m *AddrByWeight) XXX_Unmarshal(b []byte) error
type Contract ¶
type Contract struct { Threshold int32 `protobuf:"varint,1,opt,name=threshold,proto3" json:"threshold,omitempty"` Addrs []*AddrByWeight `protobuf:"bytes,2,rep,name=addrs,proto3" json:"addrs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Contract) GetAddrs ¶
func (m *Contract) GetAddrs() []*AddrByWeight
func (*Contract) XXX_Marshal ¶
type Contract_s ¶
type Contract_s struct {
// contains filtered or unexported fields
}
func (*Contract_s) Find ¶
func (n *Contract_s) Find(addr []byte) int
func (*Contract_s) GetObject ¶
func (n *Contract_s) GetObject() interface{}
func (*Contract_s) Load ¶
func (n *Contract_s) Load(interface{}) error
func (*Contract_s) LoadFromPB ¶
func (n *Contract_s) LoadFromPB(p *Contract) *Contract_s
func (*Contract_s) Participate ¶
func (n *Contract_s) Participate(addr []byte, weight int32)
notice this never check the duplication of addrs
func (*Contract_s) Save ¶
func (n *Contract_s) Save() interface{}
func (*Contract_s) Serialize ¶
func (n *Contract_s) Serialize() ([]byte, error)
func (*Contract_s) Sorter ¶
func (n *Contract_s) Sorter() addrSort
func (*Contract_s) ToPB ¶
func (n *Contract_s) ToPB() *Contract
type Update ¶
type Update struct { Addr *protos.TxAddr `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` From *protos.TxAddr `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` To *protos.TxAddr `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Update) GetAddresses ¶ added in v0.2.3
GetAddresses indicate we use current contract address
func (*Update) XXX_Marshal ¶
Click to show internal directories.
Click to hide internal directories.