Documentation
¶
Overview ¶
Package blockchain is a generated protocol buffer package.
It is generated from these files:
message.proto
It has these top-level messages:
BlockRequestMessage BlockResponseMessage StatusRequestMessage StatusResponseMessage BlockHeaderRequestMessage BlockHeaderResponseMessage BlockMessage
Index ¶
- Variables
- func MarshalData(msg BlockMsgItfc) []byte
- func MarshalDataToBlkMsg(msg proto.Message) []byte
- type BlockHeaderRequestMessage
- func (m *BlockHeaderRequestMessage) CString() string
- func (*BlockHeaderRequestMessage) Descriptor() ([]byte, []int)
- func (m *BlockHeaderRequestMessage) GetHeight() int64
- func (m *BlockHeaderRequestMessage) Marshal() (dAtA []byte, err error)
- func (m *BlockHeaderRequestMessage) MarshalTo(dAtA []byte) (int, error)
- func (*BlockHeaderRequestMessage) ProtoMessage()
- func (m *BlockHeaderRequestMessage) Reset()
- func (m *BlockHeaderRequestMessage) Size() (n int)
- func (m *BlockHeaderRequestMessage) String() string
- func (m *BlockHeaderRequestMessage) Unmarshal(dAtA []byte) error
- type BlockHeaderResponseMessage
- func (m *BlockHeaderResponseMessage) CString() string
- func (*BlockHeaderResponseMessage) Descriptor() ([]byte, []int)
- func (m *BlockHeaderResponseMessage) GetHeader() *types.Header
- func (m *BlockHeaderResponseMessage) Marshal() (dAtA []byte, err error)
- func (m *BlockHeaderResponseMessage) MarshalTo(dAtA []byte) (int, error)
- func (*BlockHeaderResponseMessage) ProtoMessage()
- func (m *BlockHeaderResponseMessage) Reset()
- func (m *BlockHeaderResponseMessage) Size() (n int)
- func (m *BlockHeaderResponseMessage) String() string
- func (m *BlockHeaderResponseMessage) Unmarshal(dAtA []byte) error
- type BlockMessage
- func (*BlockMessage) Descriptor() ([]byte, []int)
- func (m *BlockMessage) GetData() []byte
- func (m *BlockMessage) GetType() MsgType
- func (m *BlockMessage) Marshal() (dAtA []byte, err error)
- func (m *BlockMessage) MarshalTo(dAtA []byte) (int, error)
- func (*BlockMessage) ProtoMessage()
- func (m *BlockMessage) Reset()
- func (m *BlockMessage) Size() (n int)
- func (m *BlockMessage) String() string
- func (m *BlockMessage) Unmarshal(dAtA []byte) error
- type BlockMsgItfc
- type BlockRequestMessage
- func (m *BlockRequestMessage) CString() string
- func (*BlockRequestMessage) Descriptor() ([]byte, []int)
- func (m *BlockRequestMessage) GetHeight() int64
- func (m *BlockRequestMessage) Marshal() (dAtA []byte, err error)
- func (m *BlockRequestMessage) MarshalTo(dAtA []byte) (int, error)
- func (*BlockRequestMessage) ProtoMessage()
- func (m *BlockRequestMessage) Reset()
- func (m *BlockRequestMessage) Size() (n int)
- func (m *BlockRequestMessage) String() string
- func (m *BlockRequestMessage) Unmarshal(dAtA []byte) error
- type BlockResponseMessage
- func (m *BlockResponseMessage) CString() string
- func (*BlockResponseMessage) Descriptor() ([]byte, []int)
- func (m *BlockResponseMessage) GetBlock() *types.Block
- func (m *BlockResponseMessage) Marshal() (dAtA []byte, err error)
- func (m *BlockResponseMessage) MarshalTo(dAtA []byte) (int, error)
- func (*BlockResponseMessage) ProtoMessage()
- func (m *BlockResponseMessage) Reset()
- func (m *BlockResponseMessage) Size() (n int)
- func (m *BlockResponseMessage) String() string
- func (m *BlockResponseMessage) Unmarshal(dAtA []byte) error
- type MsgType
- type StatusRequestMessage
- func (m *StatusRequestMessage) CString() string
- func (*StatusRequestMessage) Descriptor() ([]byte, []int)
- func (m *StatusRequestMessage) GetHeight() int64
- func (m *StatusRequestMessage) Marshal() (dAtA []byte, err error)
- func (m *StatusRequestMessage) MarshalTo(dAtA []byte) (int, error)
- func (*StatusRequestMessage) ProtoMessage()
- func (m *StatusRequestMessage) Reset()
- func (m *StatusRequestMessage) Size() (n int)
- func (m *StatusRequestMessage) String() string
- func (m *StatusRequestMessage) Unmarshal(dAtA []byte) error
- type StatusResponseMessage
- func (m *StatusResponseMessage) CString() string
- func (*StatusResponseMessage) Descriptor() ([]byte, []int)
- func (m *StatusResponseMessage) GetHeight() int64
- func (m *StatusResponseMessage) Marshal() (dAtA []byte, err error)
- func (m *StatusResponseMessage) MarshalTo(dAtA []byte) (int, error)
- func (*StatusResponseMessage) ProtoMessage()
- func (m *StatusResponseMessage) Reset()
- func (m *StatusResponseMessage) Size() (n int)
- func (m *StatusResponseMessage) String() string
- func (m *StatusResponseMessage) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") )
View Source
var MsgType_name = map[int32]string{
0: "None",
1: "BlockReq",
2: "BlockRsp",
3: "StatusReq",
4: "StatusRsp",
5: "HeaderReq",
6: "HeaderRsp",
}
View Source
var MsgType_value = map[string]int32{
"None": 0,
"BlockReq": 1,
"BlockRsp": 2,
"StatusReq": 3,
"StatusRsp": 4,
"HeaderReq": 5,
"HeaderRsp": 6,
}
Functions ¶
func MarshalData ¶
func MarshalData(msg BlockMsgItfc) []byte
func MarshalDataToBlkMsg ¶
Types ¶
type BlockHeaderRequestMessage ¶
type BlockHeaderRequestMessage struct {
Height int64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"`
}
func (*BlockHeaderRequestMessage) CString ¶
func (m *BlockHeaderRequestMessage) CString() string
func (*BlockHeaderRequestMessage) Descriptor ¶
func (*BlockHeaderRequestMessage) Descriptor() ([]byte, []int)
func (*BlockHeaderRequestMessage) GetHeight ¶
func (m *BlockHeaderRequestMessage) GetHeight() int64
func (*BlockHeaderRequestMessage) Marshal ¶
func (m *BlockHeaderRequestMessage) Marshal() (dAtA []byte, err error)
func (*BlockHeaderRequestMessage) MarshalTo ¶
func (m *BlockHeaderRequestMessage) MarshalTo(dAtA []byte) (int, error)
func (*BlockHeaderRequestMessage) ProtoMessage ¶
func (*BlockHeaderRequestMessage) ProtoMessage()
func (*BlockHeaderRequestMessage) Reset ¶
func (m *BlockHeaderRequestMessage) Reset()
func (*BlockHeaderRequestMessage) Size ¶
func (m *BlockHeaderRequestMessage) Size() (n int)
func (*BlockHeaderRequestMessage) String ¶
func (m *BlockHeaderRequestMessage) String() string
func (*BlockHeaderRequestMessage) Unmarshal ¶
func (m *BlockHeaderRequestMessage) Unmarshal(dAtA []byte) error
type BlockHeaderResponseMessage ¶
type BlockHeaderResponseMessage struct {
Header *types.Header `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"`
}
func (*BlockHeaderResponseMessage) CString ¶
func (m *BlockHeaderResponseMessage) CString() string
func (*BlockHeaderResponseMessage) Descriptor ¶
func (*BlockHeaderResponseMessage) Descriptor() ([]byte, []int)
func (*BlockHeaderResponseMessage) GetHeader ¶
func (m *BlockHeaderResponseMessage) GetHeader() *types.Header
func (*BlockHeaderResponseMessage) Marshal ¶
func (m *BlockHeaderResponseMessage) Marshal() (dAtA []byte, err error)
func (*BlockHeaderResponseMessage) MarshalTo ¶
func (m *BlockHeaderResponseMessage) MarshalTo(dAtA []byte) (int, error)
func (*BlockHeaderResponseMessage) ProtoMessage ¶
func (*BlockHeaderResponseMessage) ProtoMessage()
func (*BlockHeaderResponseMessage) Reset ¶
func (m *BlockHeaderResponseMessage) Reset()
func (*BlockHeaderResponseMessage) Size ¶
func (m *BlockHeaderResponseMessage) Size() (n int)
func (*BlockHeaderResponseMessage) String ¶
func (m *BlockHeaderResponseMessage) String() string
func (*BlockHeaderResponseMessage) Unmarshal ¶
func (m *BlockHeaderResponseMessage) Unmarshal(dAtA []byte) error
type BlockMessage ¶
type BlockMessage struct { Type MsgType `protobuf:"varint,1,opt,name=Type,proto3,enum=blockchain.MsgType" json:"Type,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` }
func (*BlockMessage) Descriptor ¶
func (*BlockMessage) Descriptor() ([]byte, []int)
func (*BlockMessage) GetData ¶
func (m *BlockMessage) GetData() []byte
func (*BlockMessage) GetType ¶
func (m *BlockMessage) GetType() MsgType
func (*BlockMessage) Marshal ¶
func (m *BlockMessage) Marshal() (dAtA []byte, err error)
func (*BlockMessage) ProtoMessage ¶
func (*BlockMessage) ProtoMessage()
func (*BlockMessage) Reset ¶
func (m *BlockMessage) Reset()
func (*BlockMessage) Size ¶
func (m *BlockMessage) Size() (n int)
func (*BlockMessage) String ¶
func (m *BlockMessage) String() string
func (*BlockMessage) Unmarshal ¶
func (m *BlockMessage) Unmarshal(dAtA []byte) error
type BlockMsgItfc ¶
func UnmarshalBlkMsg ¶
func UnmarshalBlkMsg(bz []byte) (BlockMsgItfc, error)
type BlockRequestMessage ¶
type BlockRequestMessage struct {
Height int64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"`
}
func (*BlockRequestMessage) CString ¶
func (m *BlockRequestMessage) CString() string
func (*BlockRequestMessage) Descriptor ¶
func (*BlockRequestMessage) Descriptor() ([]byte, []int)
func (*BlockRequestMessage) GetHeight ¶
func (m *BlockRequestMessage) GetHeight() int64
func (*BlockRequestMessage) Marshal ¶
func (m *BlockRequestMessage) Marshal() (dAtA []byte, err error)
func (*BlockRequestMessage) MarshalTo ¶
func (m *BlockRequestMessage) MarshalTo(dAtA []byte) (int, error)
func (*BlockRequestMessage) ProtoMessage ¶
func (*BlockRequestMessage) ProtoMessage()
func (*BlockRequestMessage) Reset ¶
func (m *BlockRequestMessage) Reset()
func (*BlockRequestMessage) Size ¶
func (m *BlockRequestMessage) Size() (n int)
func (*BlockRequestMessage) String ¶
func (m *BlockRequestMessage) String() string
func (*BlockRequestMessage) Unmarshal ¶
func (m *BlockRequestMessage) Unmarshal(dAtA []byte) error
type BlockResponseMessage ¶
type BlockResponseMessage struct {
Block *types.Block `protobuf:"bytes,1,opt,name=Block" json:"Block,omitempty"`
}
func (*BlockResponseMessage) CString ¶
func (m *BlockResponseMessage) CString() string
func (*BlockResponseMessage) Descriptor ¶
func (*BlockResponseMessage) Descriptor() ([]byte, []int)
func (*BlockResponseMessage) GetBlock ¶
func (m *BlockResponseMessage) GetBlock() *types.Block
func (*BlockResponseMessage) Marshal ¶
func (m *BlockResponseMessage) Marshal() (dAtA []byte, err error)
func (*BlockResponseMessage) MarshalTo ¶
func (m *BlockResponseMessage) MarshalTo(dAtA []byte) (int, error)
func (*BlockResponseMessage) ProtoMessage ¶
func (*BlockResponseMessage) ProtoMessage()
func (*BlockResponseMessage) Reset ¶
func (m *BlockResponseMessage) Reset()
func (*BlockResponseMessage) Size ¶
func (m *BlockResponseMessage) Size() (n int)
func (*BlockResponseMessage) String ¶
func (m *BlockResponseMessage) String() string
func (*BlockResponseMessage) Unmarshal ¶
func (m *BlockResponseMessage) Unmarshal(dAtA []byte) error
type StatusRequestMessage ¶
type StatusRequestMessage struct {
Height int64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"`
}
func (*StatusRequestMessage) CString ¶
func (m *StatusRequestMessage) CString() string
func (*StatusRequestMessage) Descriptor ¶
func (*StatusRequestMessage) Descriptor() ([]byte, []int)
func (*StatusRequestMessage) GetHeight ¶
func (m *StatusRequestMessage) GetHeight() int64
func (*StatusRequestMessage) Marshal ¶
func (m *StatusRequestMessage) Marshal() (dAtA []byte, err error)
func (*StatusRequestMessage) MarshalTo ¶
func (m *StatusRequestMessage) MarshalTo(dAtA []byte) (int, error)
func (*StatusRequestMessage) ProtoMessage ¶
func (*StatusRequestMessage) ProtoMessage()
func (*StatusRequestMessage) Reset ¶
func (m *StatusRequestMessage) Reset()
func (*StatusRequestMessage) Size ¶
func (m *StatusRequestMessage) Size() (n int)
func (*StatusRequestMessage) String ¶
func (m *StatusRequestMessage) String() string
func (*StatusRequestMessage) Unmarshal ¶
func (m *StatusRequestMessage) Unmarshal(dAtA []byte) error
type StatusResponseMessage ¶
type StatusResponseMessage struct {
Height int64 `protobuf:"varint,1,opt,name=Height,proto3" json:"Height,omitempty"`
}
func (*StatusResponseMessage) CString ¶
func (m *StatusResponseMessage) CString() string
func (*StatusResponseMessage) Descriptor ¶
func (*StatusResponseMessage) Descriptor() ([]byte, []int)
func (*StatusResponseMessage) GetHeight ¶
func (m *StatusResponseMessage) GetHeight() int64
func (*StatusResponseMessage) Marshal ¶
func (m *StatusResponseMessage) Marshal() (dAtA []byte, err error)
func (*StatusResponseMessage) MarshalTo ¶
func (m *StatusResponseMessage) MarshalTo(dAtA []byte) (int, error)
func (*StatusResponseMessage) ProtoMessage ¶
func (*StatusResponseMessage) ProtoMessage()
func (*StatusResponseMessage) Reset ¶
func (m *StatusResponseMessage) Reset()
func (*StatusResponseMessage) Size ¶
func (m *StatusResponseMessage) Size() (n int)
func (*StatusResponseMessage) String ¶
func (m *StatusResponseMessage) String() string
func (*StatusResponseMessage) Unmarshal ¶
func (m *StatusResponseMessage) Unmarshal(dAtA []byte) error
Click to show internal directories.
Click to hide internal directories.