v1

package
v0.62.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

View Source
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 {
	// Get transaction
	//
	// Get a transaction from the Vega blockchain
	GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error)
	// List transactions
	//
	// List transactions from the Vega blockchain
	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.

type BlockExplorerServiceServer

type BlockExplorerServiceServer interface {
	// Get transaction
	//
	// Get a transaction from the Vega blockchain
	GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error)
	// List transactions
	//
	// List transactions from the Vega blockchain
	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 GetTransactionRequest added in v0.58.0

type GetTransactionRequest struct {

	// The hash of the transaction
	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 {

	// The transaction corresponding to the hash
	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 {

	// The number of transactions to be returned from the blockchain
	Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	// An optional cursor to paginate the request
	Before *string `protobuf:"bytes,2,opt,name=before,proto3,oneof" json:"before,omitempty"`
	// An optional cursor to paginate the request
	After *string `protobuf:"bytes,3,opt,name=after,proto3,oneof" json:"after,omitempty"`
	// Filters to apply to the request
	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 {

	// The transaction corresponding to the specific request and filters
	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 Transaction

type Transaction struct {

	// The height of the block the transaction was found in
	Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"`
	// The index of the transaction in the block
	Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	// The hash of the transaction
	Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	// The submitter of the transaction (Vega public key)
	Submitter string `protobuf:"bytes,4,opt,name=submitter,proto3" json:"submitter,omitempty"`
	// The type of transaction
	Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
	// The results code of the transaction (0 is success)
	Code uint32 `protobuf:"varint,6,opt,name=code,proto3" json:"code,omitempty"`
	// The cursor for this transaction (in the page, used for paginated results)
	Cursor string `protobuf:"bytes,7,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// The actual command of the transaction
	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 UnimplementedBlockExplorerServiceServer

type UnimplementedBlockExplorerServiceServer struct {
}

UnimplementedBlockExplorerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedBlockExplorerServiceServer) GetTransaction added in v0.58.0

func (UnimplementedBlockExplorerServiceServer) ListTransactions

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.

Jump to

Keyboard shortcuts

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