tx2

package
v0.49.0-rc5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package tx2 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthService        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowService          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterServiceHandler

func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterServiceHandler registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterServiceHandlerClient

func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error

RegisterServiceHandlerClient registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ServiceClient" to call the correct interceptors.

func RegisterServiceHandlerFromEndpoint

func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterServiceHandlerFromEndpoint is same as RegisterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterServiceHandlerServer

func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error

RegisterServiceHandlerServer registers the http handlers for service Service to "mux". UnaryRPC :call ServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterServiceHandlerFromEndpoint instead.

func RegisterServiceServer

func RegisterServiceServer(s grpc1.Server, srv ServiceServer)

Types

type GetBlockWithTxsRequest

type GetBlockWithTxsRequest struct {
	// height is the height of the block to query.
	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// pagination defines a pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs RPC method.

Since: finschia-sdk 0.47.0

func (*GetBlockWithTxsRequest) Descriptor

func (*GetBlockWithTxsRequest) Descriptor() ([]byte, []int)

func (*GetBlockWithTxsRequest) GetHeight

func (m *GetBlockWithTxsRequest) GetHeight() int64

func (*GetBlockWithTxsRequest) GetPagination

func (m *GetBlockWithTxsRequest) GetPagination() *query.PageRequest

func (*GetBlockWithTxsRequest) Marshal

func (m *GetBlockWithTxsRequest) Marshal() (dAtA []byte, err error)

func (*GetBlockWithTxsRequest) MarshalTo

func (m *GetBlockWithTxsRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetBlockWithTxsRequest) MarshalToSizedBuffer

func (m *GetBlockWithTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetBlockWithTxsRequest) ProtoMessage

func (*GetBlockWithTxsRequest) ProtoMessage()

func (*GetBlockWithTxsRequest) Reset

func (m *GetBlockWithTxsRequest) Reset()

func (*GetBlockWithTxsRequest) Size

func (m *GetBlockWithTxsRequest) Size() (n int)

func (*GetBlockWithTxsRequest) String

func (m *GetBlockWithTxsRequest) String() string

func (*GetBlockWithTxsRequest) Unmarshal

func (m *GetBlockWithTxsRequest) Unmarshal(dAtA []byte) error

func (*GetBlockWithTxsRequest) XXX_DiscardUnknown

func (m *GetBlockWithTxsRequest) XXX_DiscardUnknown()

func (*GetBlockWithTxsRequest) XXX_Marshal

func (m *GetBlockWithTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetBlockWithTxsRequest) XXX_Merge

func (m *GetBlockWithTxsRequest) XXX_Merge(src proto.Message)

func (*GetBlockWithTxsRequest) XXX_Size

func (m *GetBlockWithTxsRequest) XXX_Size() int

func (*GetBlockWithTxsRequest) XXX_Unmarshal

func (m *GetBlockWithTxsRequest) XXX_Unmarshal(b []byte) error

type GetBlockWithTxsResponse

type GetBlockWithTxsResponse struct {
	// txs are the transactions in the block.
	Txs     []*tx.Tx       `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	BlockId *types.BlockID `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
	Block   *types1.Block  `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"`
	// pagination defines a pagination for the response.
	Pagination *query.PageResponse `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method.

Since: finschia-sdk 0.47.0

func (*GetBlockWithTxsResponse) Descriptor

func (*GetBlockWithTxsResponse) Descriptor() ([]byte, []int)

func (*GetBlockWithTxsResponse) GetBlock

func (m *GetBlockWithTxsResponse) GetBlock() *types1.Block

func (*GetBlockWithTxsResponse) GetBlockId

func (m *GetBlockWithTxsResponse) GetBlockId() *types.BlockID

func (*GetBlockWithTxsResponse) GetPagination

func (m *GetBlockWithTxsResponse) GetPagination() *query.PageResponse

func (*GetBlockWithTxsResponse) GetTxs

func (m *GetBlockWithTxsResponse) GetTxs() []*tx.Tx

func (*GetBlockWithTxsResponse) Marshal

func (m *GetBlockWithTxsResponse) Marshal() (dAtA []byte, err error)

func (*GetBlockWithTxsResponse) MarshalTo

func (m *GetBlockWithTxsResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetBlockWithTxsResponse) MarshalToSizedBuffer

func (m *GetBlockWithTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetBlockWithTxsResponse) ProtoMessage

func (*GetBlockWithTxsResponse) ProtoMessage()

func (*GetBlockWithTxsResponse) Reset

func (m *GetBlockWithTxsResponse) Reset()

func (*GetBlockWithTxsResponse) Size

func (m *GetBlockWithTxsResponse) Size() (n int)

func (*GetBlockWithTxsResponse) String

func (m *GetBlockWithTxsResponse) String() string

func (*GetBlockWithTxsResponse) Unmarshal

func (m *GetBlockWithTxsResponse) Unmarshal(dAtA []byte) error

func (*GetBlockWithTxsResponse) XXX_DiscardUnknown

func (m *GetBlockWithTxsResponse) XXX_DiscardUnknown()

func (*GetBlockWithTxsResponse) XXX_Marshal

func (m *GetBlockWithTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetBlockWithTxsResponse) XXX_Merge

func (m *GetBlockWithTxsResponse) XXX_Merge(src proto.Message)

func (*GetBlockWithTxsResponse) XXX_Size

func (m *GetBlockWithTxsResponse) XXX_Size() int

func (*GetBlockWithTxsResponse) XXX_Unmarshal

func (m *GetBlockWithTxsResponse) XXX_Unmarshal(b []byte) error

type ServiceClient

type ServiceClient interface {
	// GetBlockWithTxs fetches a block with decoded txs.
	//
	// Since: finschia-sdk 0.47.0
	GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error)
}

ServiceClient is the client API for Service service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewServiceClient

func NewServiceClient(cc grpc1.ClientConn) ServiceClient

type ServiceServer

type ServiceServer interface {
	// GetBlockWithTxs fetches a block with decoded txs.
	//
	// Since: finschia-sdk 0.47.0
	GetBlockWithTxs(context.Context, *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error)
}

ServiceServer is the server API for Service service.

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedServiceServer) GetBlockWithTxs

Jump to

Keyboard shortcuts

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