Documentation
¶
Index ¶
- Variables
- func RegisterBlockServiceServer(s grpc.ServiceRegistrar, srv BlockServiceServer)
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (x *Block) GetBlockHash() string
- func (x *Block) GetExtrinsics() []*transactionpb.Transaction
- func (x *Block) GetHeader() *Header
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- type BlockServiceClient
- type BlockServiceServer
- type GetByHeightRequest
- func (*GetByHeightRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetByHeightRequest) GetHeight() int64
- func (*GetByHeightRequest) ProtoMessage()
- func (x *GetByHeightRequest) ProtoReflect() protoreflect.Message
- func (x *GetByHeightRequest) Reset()
- func (x *GetByHeightRequest) String() string
- type GetByHeightResponse
- func (*GetByHeightResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetByHeightResponse) GetBlock() *Block
- func (*GetByHeightResponse) ProtoMessage()
- func (x *GetByHeightResponse) ProtoReflect() protoreflect.Message
- func (x *GetByHeightResponse) Reset()
- func (x *GetByHeightResponse) String() string
- type Header
- func (*Header) Descriptor() ([]byte, []int)deprecated
- func (x *Header) GetExtrinsicsRoot() string
- func (x *Header) GetHeight() int64
- func (x *Header) GetParentHash() string
- func (x *Header) GetStateRoot() string
- func (x *Header) GetTime() *timestamppb.Timestamp
- func (*Header) ProtoMessage()
- func (x *Header) ProtoReflect() protoreflect.Message
- func (x *Header) Reset()
- func (x *Header) String() string
- type UnimplementedBlockServiceServer
- type UnsafeBlockServiceServer
Constants ¶
This section is empty.
Variables ¶
var BlockService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "block.BlockService", HandlerType: (*BlockServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetByHeight", Handler: _BlockService_GetByHeight_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grpc/block/blockpb/block.proto", }
BlockService_ServiceDesc is the grpc.ServiceDesc for BlockService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_grpc_block_blockpb_block_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBlockServiceServer ¶
func RegisterBlockServiceServer(s grpc.ServiceRegistrar, srv BlockServiceServer)
Types ¶
type Block ¶
type Block struct { BlockHash string `protobuf:"bytes,1,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` Header *Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` Extrinsics []*transactionpb.Transaction `protobuf:"bytes,3,rep,name=extrinsics,proto3" json:"extrinsics,omitempty"` // contains filtered or unexported fields }
func (*Block) Descriptor
deprecated
func (*Block) GetBlockHash ¶
func (*Block) GetExtrinsics ¶
func (x *Block) GetExtrinsics() []*transactionpb.Transaction
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type BlockServiceClient ¶
type BlockServiceClient interface {
GetByHeight(ctx context.Context, in *GetByHeightRequest, opts ...grpc.CallOption) (*GetByHeightResponse, error)
}
BlockServiceClient is the client API for BlockService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewBlockServiceClient ¶
func NewBlockServiceClient(cc grpc.ClientConnInterface) BlockServiceClient
type BlockServiceServer ¶
type BlockServiceServer interface { GetByHeight(context.Context, *GetByHeightRequest) (*GetByHeightResponse, error) // contains filtered or unexported methods }
BlockServiceServer is the server API for BlockService service. All implementations must embed UnimplementedBlockServiceServer for forward compatibility
type GetByHeightRequest ¶
type GetByHeightRequest struct { Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` // contains filtered or unexported fields }
func (*GetByHeightRequest) Descriptor
deprecated
func (*GetByHeightRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByHeightRequest.ProtoReflect.Descriptor instead.
func (*GetByHeightRequest) GetHeight ¶
func (x *GetByHeightRequest) GetHeight() int64
func (*GetByHeightRequest) ProtoMessage ¶
func (*GetByHeightRequest) ProtoMessage()
func (*GetByHeightRequest) ProtoReflect ¶
func (x *GetByHeightRequest) ProtoReflect() protoreflect.Message
func (*GetByHeightRequest) Reset ¶
func (x *GetByHeightRequest) Reset()
func (*GetByHeightRequest) String ¶
func (x *GetByHeightRequest) String() string
type GetByHeightResponse ¶
type GetByHeightResponse struct { Block *Block `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` // contains filtered or unexported fields }
func (*GetByHeightResponse) Descriptor
deprecated
func (*GetByHeightResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetByHeightResponse.ProtoReflect.Descriptor instead.
func (*GetByHeightResponse) GetBlock ¶
func (x *GetByHeightResponse) GetBlock() *Block
func (*GetByHeightResponse) ProtoMessage ¶
func (*GetByHeightResponse) ProtoMessage()
func (*GetByHeightResponse) ProtoReflect ¶
func (x *GetByHeightResponse) ProtoReflect() protoreflect.Message
func (*GetByHeightResponse) Reset ¶
func (x *GetByHeightResponse) Reset()
func (*GetByHeightResponse) String ¶
func (x *GetByHeightResponse) String() string
type Header ¶
type Header struct { Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` ParentHash string `protobuf:"bytes,2,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` StateRoot string `protobuf:"bytes,4,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` ExtrinsicsRoot string `protobuf:"bytes,5,opt,name=extrinsics_root,json=extrinsicsRoot,proto3" json:"extrinsics_root,omitempty"` // contains filtered or unexported fields }
func (*Header) Descriptor
deprecated
func (*Header) GetExtrinsicsRoot ¶
func (*Header) GetParentHash ¶
func (*Header) GetStateRoot ¶
func (*Header) GetTime ¶
func (x *Header) GetTime() *timestamppb.Timestamp
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type UnimplementedBlockServiceServer ¶
type UnimplementedBlockServiceServer struct { }
UnimplementedBlockServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBlockServiceServer) GetByHeight ¶
func (UnimplementedBlockServiceServer) GetByHeight(context.Context, *GetByHeightRequest) (*GetByHeightResponse, error)
type UnsafeBlockServiceServer ¶
type UnsafeBlockServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBlockServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BlockServiceServer will result in compilation errors.