blockpb

package
v0.0.0-...-c15509c Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 10 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBlockHash

func (x *Block) GetBlockHash() string

func (*Block) GetExtrinsics

func (x *Block) GetExtrinsics() []*transactionpb.Transaction

func (*Block) GetHeader

func (x *Block) GetHeader() *Header

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

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.

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 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) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetExtrinsicsRoot

func (x *Header) GetExtrinsicsRoot() string

func (*Header) GetHeight

func (x *Header) GetHeight() int64

func (*Header) GetParentHash

func (x *Header) GetParentHash() string

func (*Header) GetStateRoot

func (x *Header) GetStateRoot() string

func (*Header) GetTime

func (x *Header) GetTime() *timestamppb.Timestamp

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type UnimplementedBlockServiceServer

type UnimplementedBlockServiceServer struct {
}

UnimplementedBlockServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBlockServiceServer) GetByHeight

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.

Jump to

Keyboard shortcuts

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