Documentation
¶
Overview ¶
Package proto contains protobuf generated Go structures.
Index ¶
- Variables
- type BlockData
- func (*BlockData) Descriptor() ([]byte, []int)deprecated
- func (x *BlockData) GetBody() [][]byte
- func (x *BlockData) GetHash() []byte
- func (x *BlockData) GetHeader() []byte
- func (x *BlockData) GetIsEmptyJustification() bool
- func (x *BlockData) GetJustification() []byte
- func (x *BlockData) GetMessageQueue() []byte
- func (x *BlockData) GetReceipt() []byte
- func (*BlockData) ProtoMessage()
- func (x *BlockData) ProtoReflect() protoreflect.Message
- func (x *BlockData) Reset()
- func (x *BlockData) String() string
- type BlockRequest
- func (*BlockRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BlockRequest) GetDirection() Direction
- func (x *BlockRequest) GetFields() uint32
- func (m *BlockRequest) GetFromBlock() isBlockRequest_FromBlock
- func (x *BlockRequest) GetHash() []byte
- func (x *BlockRequest) GetMaxBlocks() uint32
- func (x *BlockRequest) GetNumber() []byte
- func (*BlockRequest) ProtoMessage()
- func (x *BlockRequest) ProtoReflect() protoreflect.Message
- func (x *BlockRequest) Reset()
- func (x *BlockRequest) String() string
- type BlockRequest_Hash
- type BlockRequest_Number
- type BlockResponse
- type Direction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Direction_name = map[int32]string{ 0: "Ascending", 1: "Descending", } Direction_value = map[string]int32{ "Ascending": 0, "Descending": 1, } )
Enum value maps for Direction.
View Source
var File_api_v1_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BlockData ¶
type BlockData struct {
// Block header hash.
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
// Block header if requested.
Header []byte `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` // optional
// Block body if requested.
Body [][]byte `protobuf:"bytes,3,rep,name=body,proto3" json:"body,omitempty"` // optional
// Block receipt if requested.
Receipt []byte `protobuf:"bytes,4,opt,name=receipt,proto3" json:"receipt,omitempty"` // optional
// Block message queue if requested.
MessageQueue []byte `protobuf:"bytes,5,opt,name=message_queue,json=messageQueue,proto3" json:"message_queue,omitempty"` // optional
// Justification if requested.
Justification []byte `protobuf:"bytes,6,opt,name=justification,proto3" json:"justification,omitempty"` // optional
// True if justification should be treated as present but empty.
// This hack is unfortunately necessary because shortcomings in the protobuf format otherwise
// doesn't make in possible to differentiate between a lack of justification and an empty
// justification.
IsEmptyJustification bool `protobuf:"varint,7,opt,name=is_empty_justification,json=isEmptyJustification,proto3" json:"is_empty_justification,omitempty"` // optional, false if absent
// contains filtered or unexported fields
}
Block data sent in the response.
func (*BlockData) Descriptor
deprecated
func (*BlockData) GetIsEmptyJustification ¶
func (*BlockData) GetJustification ¶
func (*BlockData) GetMessageQueue ¶
func (*BlockData) GetReceipt ¶
func (*BlockData) ProtoMessage ¶
func (*BlockData) ProtoMessage()
func (*BlockData) ProtoReflect ¶
func (x *BlockData) ProtoReflect() protoreflect.Message
type BlockRequest ¶
type BlockRequest struct {
// Bits of block data to request.
Fields uint32 `protobuf:"varint,1,opt,name=fields,proto3" json:"fields,omitempty"`
// Start from this block.
//
// Types that are assignable to FromBlock:
//
// *BlockRequest_Hash
// *BlockRequest_Number
FromBlock isBlockRequest_FromBlock `protobuf_oneof:"from_block"`
// Sequence direction.
Direction Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=api.v1.Direction" json:"direction,omitempty"`
// Maximum number of blocks to return. An implementation defined maximum is used when unspecified.
MaxBlocks uint32 `protobuf:"varint,6,opt,name=max_blocks,json=maxBlocks,proto3" json:"max_blocks,omitempty"` // optional
// contains filtered or unexported fields
}
Request block data from a peer.
func (*BlockRequest) Descriptor
deprecated
func (*BlockRequest) Descriptor() ([]byte, []int)
Deprecated: Use BlockRequest.ProtoReflect.Descriptor instead.
func (*BlockRequest) GetDirection ¶
func (x *BlockRequest) GetDirection() Direction
func (*BlockRequest) GetFields ¶
func (x *BlockRequest) GetFields() uint32
func (*BlockRequest) GetFromBlock ¶
func (m *BlockRequest) GetFromBlock() isBlockRequest_FromBlock
func (*BlockRequest) GetHash ¶
func (x *BlockRequest) GetHash() []byte
func (*BlockRequest) GetMaxBlocks ¶
func (x *BlockRequest) GetMaxBlocks() uint32
func (*BlockRequest) GetNumber ¶
func (x *BlockRequest) GetNumber() []byte
func (*BlockRequest) ProtoMessage ¶
func (*BlockRequest) ProtoMessage()
func (*BlockRequest) ProtoReflect ¶
func (x *BlockRequest) ProtoReflect() protoreflect.Message
func (*BlockRequest) Reset ¶
func (x *BlockRequest) Reset()
func (*BlockRequest) String ¶
func (x *BlockRequest) String() string
type BlockRequest_Hash ¶
type BlockRequest_Hash struct {
// Start with given hash.
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3,oneof"`
}
type BlockRequest_Number ¶
type BlockRequest_Number struct {
// Start with given block number.
Number []byte `protobuf:"bytes,3,opt,name=number,proto3,oneof"`
}
type BlockResponse ¶
type BlockResponse struct {
// Block data for the requested sequence.
Blocks []*BlockData `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
// contains filtered or unexported fields
}
Response to `BlockRequest`
func (*BlockResponse) Descriptor
deprecated
func (*BlockResponse) Descriptor() ([]byte, []int)
Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead.
func (*BlockResponse) GetBlocks ¶
func (x *BlockResponse) GetBlocks() []*BlockData
func (*BlockResponse) ProtoMessage ¶
func (*BlockResponse) ProtoMessage()
func (*BlockResponse) ProtoReflect ¶
func (x *BlockResponse) ProtoReflect() protoreflect.Message
func (*BlockResponse) Reset ¶
func (x *BlockResponse) Reset()
func (*BlockResponse) String ¶
func (x *BlockResponse) String() string
type Direction ¶
type Direction int32
Block enumeration direction.
func (Direction) Descriptor ¶
func (Direction) Descriptor() protoreflect.EnumDescriptor
func (Direction) EnumDescriptor
deprecated
func (Direction) Number ¶
func (x Direction) Number() protoreflect.EnumNumber
func (Direction) Type ¶
func (Direction) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.