blockchain

package
v0.0.0-...-a4757fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2018 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

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

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

func MarshalDataToBlkMsg(msg proto.Message) []byte

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) MarshalTo

func (m *BlockMessage) MarshalTo(dAtA []byte) (int, 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

type BlockMsgItfc proto.Message

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 MsgType

type MsgType int32
const (
	MsgType_None      MsgType = 0
	MsgType_BlockReq  MsgType = 1
	MsgType_BlockRsp  MsgType = 2
	MsgType_StatusReq MsgType = 3
	MsgType_StatusRsp MsgType = 4
	MsgType_HeaderReq MsgType = 5
	MsgType_HeaderRsp MsgType = 6
)

func GetMessageType

func GetMessageType(msg proto.Message) MsgType

func (MsgType) EnumDescriptor

func (MsgType) EnumDescriptor() ([]byte, []int)

func (MsgType) String

func (x MsgType) String() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL