Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBlockExplorerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBlockExplorerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockExplorerServiceClient) error
- func RegisterBlockExplorerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBlockExplorerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockExplorerServiceServer) error
- func RegisterBlockExplorerServiceServer(s grpc.ServiceRegistrar, srv BlockExplorerServiceServer)
- type BlockExplorerServiceClient
- type BlockExplorerServiceServer
- type Event
- type EventAttribute
- func (*EventAttribute) Descriptor() ([]byte, []int)deprecated
- func (x *EventAttribute) GetIndex() bool
- func (x *EventAttribute) GetKey() string
- func (x *EventAttribute) GetValue() string
- func (*EventAttribute) ProtoMessage()
- func (x *EventAttribute) ProtoReflect() protoreflect.Message
- func (x *EventAttribute) Reset()
- func (x *EventAttribute) String() string
- type GetTransactionRequest
- func (*GetTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetTransactionRequest) GetHash() string
- func (*GetTransactionRequest) ProtoMessage()
- func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *GetTransactionRequest) Reset()
- func (x *GetTransactionRequest) String() string
- type GetTransactionResponse
- func (*GetTransactionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetTransactionResponse) GetTransaction() *Transaction
- func (*GetTransactionResponse) ProtoMessage()
- func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message
- func (x *GetTransactionResponse) Reset()
- func (x *GetTransactionResponse) String() string
- type ListTransactionsRequest
- func (*ListTransactionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListTransactionsRequest) GetAfter() string
- func (x *ListTransactionsRequest) GetBefore() string
- func (x *ListTransactionsRequest) GetFilters() map[string]string
- func (x *ListTransactionsRequest) GetLimit() uint32
- func (*ListTransactionsRequest) ProtoMessage()
- func (x *ListTransactionsRequest) ProtoReflect() protoreflect.Message
- func (x *ListTransactionsRequest) Reset()
- func (x *ListTransactionsRequest) String() string
- type ListTransactionsResponse
- func (*ListTransactionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListTransactionsResponse) GetTransactions() []*Transaction
- func (*ListTransactionsResponse) ProtoMessage()
- func (x *ListTransactionsResponse) ProtoReflect() protoreflect.Message
- func (x *ListTransactionsResponse) Reset()
- func (x *ListTransactionsResponse) String() string
- type ResponseDeliverTx
- func (*ResponseDeliverTx) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseDeliverTx) GetCode() uint32
- func (x *ResponseDeliverTx) GetCodespace() string
- func (x *ResponseDeliverTx) GetData() []byte
- func (x *ResponseDeliverTx) GetEvents() []*Event
- func (x *ResponseDeliverTx) GetGasUsed() int64
- func (x *ResponseDeliverTx) GetGasWanted() int64
- func (x *ResponseDeliverTx) GetInfo() string
- func (x *ResponseDeliverTx) GetLog() string
- func (*ResponseDeliverTx) ProtoMessage()
- func (x *ResponseDeliverTx) ProtoReflect() protoreflect.Message
- func (x *ResponseDeliverTx) Reset()
- func (x *ResponseDeliverTx) String() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetBlock() uint64
- func (x *Transaction) GetCode() uint32
- func (x *Transaction) GetCommand() *v1.InputData
- func (x *Transaction) GetCursor() string
- func (x *Transaction) GetHash() string
- func (x *Transaction) GetIndex() uint32
- func (x *Transaction) GetSubmitter() string
- func (x *Transaction) GetType() string
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type TxResult
- func (*TxResult) Descriptor() ([]byte, []int)deprecated
- func (x *TxResult) GetHeight() int64
- func (x *TxResult) GetIndex() uint32
- func (x *TxResult) GetResult() *ResponseDeliverTx
- func (x *TxResult) GetTx() []byte
- func (*TxResult) ProtoMessage()
- func (x *TxResult) ProtoReflect() protoreflect.Message
- func (x *TxResult) Reset()
- func (x *TxResult) String() string
- type UnimplementedBlockExplorerServiceServer
- type UnsafeBlockExplorerServiceServer
Constants ¶
This section is empty.
Variables ¶
var BlockExplorerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blockexplorer.api.v1.BlockExplorerService", HandlerType: (*BlockExplorerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTransaction", Handler: _BlockExplorerService_GetTransaction_Handler, }, { MethodName: "ListTransactions", Handler: _BlockExplorerService_ListTransactions_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "blockexplorer/blockexplorer.proto", }
BlockExplorerService_ServiceDesc is the grpc.ServiceDesc for BlockExplorerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_blockexplorer_blockexplorer_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBlockExplorerServiceHandler ¶
func RegisterBlockExplorerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBlockExplorerServiceHandler registers the http handlers for service BlockExplorerService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBlockExplorerServiceHandlerClient ¶
func RegisterBlockExplorerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockExplorerServiceClient) error
RegisterBlockExplorerServiceHandlerClient registers the http handlers for service BlockExplorerService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockExplorerServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockExplorerServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BlockExplorerServiceClient" to call the correct interceptors.
func RegisterBlockExplorerServiceHandlerFromEndpoint ¶
func RegisterBlockExplorerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBlockExplorerServiceHandlerFromEndpoint is same as RegisterBlockExplorerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBlockExplorerServiceHandlerServer ¶
func RegisterBlockExplorerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockExplorerServiceServer) error
RegisterBlockExplorerServiceHandlerServer registers the http handlers for service BlockExplorerService to "mux". UnaryRPC :call BlockExplorerServiceServer 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 to stop working. Consider using RegisterBlockExplorerServiceHandlerFromEndpoint instead.
func RegisterBlockExplorerServiceServer ¶
func RegisterBlockExplorerServiceServer(s grpc.ServiceRegistrar, srv BlockExplorerServiceServer)
Types ¶
type BlockExplorerServiceClient ¶
type BlockExplorerServiceClient interface { GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (*ListTransactionsResponse, error) }
BlockExplorerServiceClient is the client API for BlockExplorerService 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 NewBlockExplorerServiceClient ¶
func NewBlockExplorerServiceClient(cc grpc.ClientConnInterface) BlockExplorerServiceClient
type BlockExplorerServiceServer ¶
type BlockExplorerServiceServer interface { GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error) // contains filtered or unexported methods }
BlockExplorerServiceServer is the server API for BlockExplorerService service. All implementations must embed UnimplementedBlockExplorerServiceServer for forward compatibility
type Event ¶
type Event struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetAttributes ¶
func (x *Event) GetAttributes() []*EventAttribute
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventAttribute ¶
type EventAttribute struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Index bool `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` // nondeterministic // contains filtered or unexported fields }
EventAttribute is a single key-value pair, associated with an event.
func (*EventAttribute) Descriptor
deprecated
func (*EventAttribute) Descriptor() ([]byte, []int)
Deprecated: Use EventAttribute.ProtoReflect.Descriptor instead.
func (*EventAttribute) GetIndex ¶
func (x *EventAttribute) GetIndex() bool
func (*EventAttribute) GetKey ¶
func (x *EventAttribute) GetKey() string
func (*EventAttribute) GetValue ¶
func (x *EventAttribute) GetValue() string
func (*EventAttribute) ProtoMessage ¶
func (*EventAttribute) ProtoMessage()
func (*EventAttribute) ProtoReflect ¶
func (x *EventAttribute) ProtoReflect() protoreflect.Message
func (*EventAttribute) Reset ¶
func (x *EventAttribute) Reset()
func (*EventAttribute) String ¶
func (x *EventAttribute) String() string
type GetTransactionRequest ¶ added in v0.58.0
type GetTransactionRequest struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*GetTransactionRequest) Descriptor
deprecated
added in
v0.58.0
func (*GetTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead.
func (*GetTransactionRequest) GetHash ¶ added in v0.58.0
func (x *GetTransactionRequest) GetHash() string
func (*GetTransactionRequest) ProtoMessage ¶ added in v0.58.0
func (*GetTransactionRequest) ProtoMessage()
func (*GetTransactionRequest) ProtoReflect ¶ added in v0.58.0
func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message
func (*GetTransactionRequest) Reset ¶ added in v0.58.0
func (x *GetTransactionRequest) Reset()
func (*GetTransactionRequest) String ¶ added in v0.58.0
func (x *GetTransactionRequest) String() string
type GetTransactionResponse ¶ added in v0.58.0
type GetTransactionResponse struct { Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // contains filtered or unexported fields }
func (*GetTransactionResponse) Descriptor
deprecated
added in
v0.58.0
func (*GetTransactionResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTransactionResponse.ProtoReflect.Descriptor instead.
func (*GetTransactionResponse) GetTransaction ¶ added in v0.58.0
func (x *GetTransactionResponse) GetTransaction() *Transaction
func (*GetTransactionResponse) ProtoMessage ¶ added in v0.58.0
func (*GetTransactionResponse) ProtoMessage()
func (*GetTransactionResponse) ProtoReflect ¶ added in v0.58.0
func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message
func (*GetTransactionResponse) Reset ¶ added in v0.58.0
func (x *GetTransactionResponse) Reset()
func (*GetTransactionResponse) String ¶ added in v0.58.0
func (x *GetTransactionResponse) String() string
type ListTransactionsRequest ¶
type ListTransactionsRequest struct { Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Before *string `protobuf:"bytes,2,opt,name=before,proto3,oneof" json:"before,omitempty"` After *string `protobuf:"bytes,3,opt,name=after,proto3,oneof" json:"after,omitempty"` Filters map[string]string `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ListTransactionsRequest) Descriptor
deprecated
func (*ListTransactionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListTransactionsRequest.ProtoReflect.Descriptor instead.
func (*ListTransactionsRequest) GetAfter ¶
func (x *ListTransactionsRequest) GetAfter() string
func (*ListTransactionsRequest) GetBefore ¶
func (x *ListTransactionsRequest) GetBefore() string
func (*ListTransactionsRequest) GetFilters ¶
func (x *ListTransactionsRequest) GetFilters() map[string]string
func (*ListTransactionsRequest) GetLimit ¶
func (x *ListTransactionsRequest) GetLimit() uint32
func (*ListTransactionsRequest) ProtoMessage ¶
func (*ListTransactionsRequest) ProtoMessage()
func (*ListTransactionsRequest) ProtoReflect ¶
func (x *ListTransactionsRequest) ProtoReflect() protoreflect.Message
func (*ListTransactionsRequest) Reset ¶
func (x *ListTransactionsRequest) Reset()
func (*ListTransactionsRequest) String ¶
func (x *ListTransactionsRequest) String() string
type ListTransactionsResponse ¶
type ListTransactionsResponse struct { Transactions []*Transaction `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"` // contains filtered or unexported fields }
func (*ListTransactionsResponse) Descriptor
deprecated
func (*ListTransactionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListTransactionsResponse.ProtoReflect.Descriptor instead.
func (*ListTransactionsResponse) GetTransactions ¶
func (x *ListTransactionsResponse) GetTransactions() []*Transaction
func (*ListTransactionsResponse) ProtoMessage ¶
func (*ListTransactionsResponse) ProtoMessage()
func (*ListTransactionsResponse) ProtoReflect ¶
func (x *ListTransactionsResponse) ProtoReflect() protoreflect.Message
func (*ListTransactionsResponse) Reset ¶
func (x *ListTransactionsResponse) Reset()
func (*ListTransactionsResponse) String ¶
func (x *ListTransactionsResponse) String() string
type ResponseDeliverTx ¶
type ResponseDeliverTx struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` // nondeterministic Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` // nondeterministic GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"` GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,proto3" json:"gas_used,omitempty"` Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` // nondeterministic Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` // contains filtered or unexported fields }
func (*ResponseDeliverTx) Descriptor
deprecated
func (*ResponseDeliverTx) Descriptor() ([]byte, []int)
Deprecated: Use ResponseDeliverTx.ProtoReflect.Descriptor instead.
func (*ResponseDeliverTx) GetCode ¶
func (x *ResponseDeliverTx) GetCode() uint32
func (*ResponseDeliverTx) GetCodespace ¶
func (x *ResponseDeliverTx) GetCodespace() string
func (*ResponseDeliverTx) GetData ¶
func (x *ResponseDeliverTx) GetData() []byte
func (*ResponseDeliverTx) GetEvents ¶
func (x *ResponseDeliverTx) GetEvents() []*Event
func (*ResponseDeliverTx) GetGasUsed ¶
func (x *ResponseDeliverTx) GetGasUsed() int64
func (*ResponseDeliverTx) GetGasWanted ¶
func (x *ResponseDeliverTx) GetGasWanted() int64
func (*ResponseDeliverTx) GetInfo ¶
func (x *ResponseDeliverTx) GetInfo() string
func (*ResponseDeliverTx) GetLog ¶
func (x *ResponseDeliverTx) GetLog() string
func (*ResponseDeliverTx) ProtoMessage ¶
func (*ResponseDeliverTx) ProtoMessage()
func (*ResponseDeliverTx) ProtoReflect ¶
func (x *ResponseDeliverTx) ProtoReflect() protoreflect.Message
func (*ResponseDeliverTx) Reset ¶
func (x *ResponseDeliverTx) Reset()
func (*ResponseDeliverTx) String ¶
func (x *ResponseDeliverTx) String() string
type Transaction ¶
type Transaction struct { Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"` Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` Submitter string `protobuf:"bytes,4,opt,name=submitter,proto3" json:"submitter,omitempty"` Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` Code uint32 `protobuf:"varint,6,opt,name=code,proto3" json:"code,omitempty"` Cursor string `protobuf:"bytes,7,opt,name=cursor,proto3" json:"cursor,omitempty"` Command *v1.InputData `protobuf:"bytes,8,opt,name=command,proto3" json:"command,omitempty"` // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetBlock ¶
func (x *Transaction) GetBlock() uint64
func (*Transaction) GetCode ¶
func (x *Transaction) GetCode() uint32
func (*Transaction) GetCommand ¶
func (x *Transaction) GetCommand() *v1.InputData
func (*Transaction) GetCursor ¶
func (x *Transaction) GetCursor() string
func (*Transaction) GetHash ¶
func (x *Transaction) GetHash() string
func (*Transaction) GetIndex ¶
func (x *Transaction) GetIndex() uint32
func (*Transaction) GetSubmitter ¶
func (x *Transaction) GetSubmitter() string
func (*Transaction) GetType ¶
func (x *Transaction) GetType() string
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type TxResult ¶
type TxResult struct { Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` Tx []byte `protobuf:"bytes,3,opt,name=tx,proto3" json:"tx,omitempty"` Result *ResponseDeliverTx `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*TxResult) Descriptor
deprecated
func (*TxResult) GetResult ¶
func (x *TxResult) GetResult() *ResponseDeliverTx
func (*TxResult) ProtoMessage ¶
func (*TxResult) ProtoMessage()
func (*TxResult) ProtoReflect ¶
func (x *TxResult) ProtoReflect() protoreflect.Message
type UnimplementedBlockExplorerServiceServer ¶
type UnimplementedBlockExplorerServiceServer struct { }
UnimplementedBlockExplorerServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBlockExplorerServiceServer) GetTransaction ¶ added in v0.58.0
func (UnimplementedBlockExplorerServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error)
func (UnimplementedBlockExplorerServiceServer) ListTransactions ¶
func (UnimplementedBlockExplorerServiceServer) ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error)
type UnsafeBlockExplorerServiceServer ¶
type UnsafeBlockExplorerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBlockExplorerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BlockExplorerServiceServer will result in compilation errors.