Documentation
¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterProtocolHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProtocolHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProtocolClient) error
- func RegisterProtocolHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProtocolHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProtocolServer) error
- func RegisterProtocolServer(s grpc.ServiceRegistrar, srv ProtocolServer)
- type BlockResponse
- func (*BlockResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BlockResponse) GetBlockhash() string
- func (x *BlockResponse) GetChainid() string
- func (x *BlockResponse) GetHeight() int64
- func (x *BlockResponse) GetProposer() string
- func (x *BlockResponse) GetTransactions() []*SignedTransaction
- func (*BlockResponse) ProtoMessage()
- func (x *BlockResponse) ProtoReflect() protoreflect.Message
- func (x *BlockResponse) Reset()
- func (x *BlockResponse) String() string
- type ForwardTransactionRequest
- func (*ForwardTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardTransactionRequest) GetSignature() string
- func (x *ForwardTransactionRequest) GetTransaction() *SignedTransaction
- func (*ForwardTransactionRequest) ProtoMessage()
- func (x *ForwardTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *ForwardTransactionRequest) Reset()
- func (x *ForwardTransactionRequest) String() string
- type ForwardTransactionResponse
- type GetBlockRequest
- type GetNodeInfoRequest
- type GetTransactionRequest
- func (*GetTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetTransactionRequest) GetTxhash() string
- func (*GetTransactionRequest) ProtoMessage()
- func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *GetTransactionRequest) Reset()
- func (x *GetTransactionRequest) String() string
- type ManageEntityLegacy
- func (*ManageEntityLegacy) Descriptor() ([]byte, []int)deprecated
- func (x *ManageEntityLegacy) GetAction() string
- func (x *ManageEntityLegacy) GetEntityId() int64
- func (x *ManageEntityLegacy) GetEntityType() string
- func (x *ManageEntityLegacy) GetMetadata() string
- func (x *ManageEntityLegacy) GetSignature() string
- func (x *ManageEntityLegacy) GetUserId() int64
- func (*ManageEntityLegacy) ProtoMessage()
- func (x *ManageEntityLegacy) ProtoReflect() protoreflect.Message
- func (x *ManageEntityLegacy) Reset()
- func (x *ManageEntityLegacy) String() string
- type NodeInfoResponse
- func (*NodeInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *NodeInfoResponse) GetChainid() string
- func (x *NodeInfoResponse) GetCometAddress() string
- func (x *NodeInfoResponse) GetCurrentHeight() int64
- func (x *NodeInfoResponse) GetEthAddress() string
- func (x *NodeInfoResponse) GetSynced() bool
- func (*NodeInfoResponse) ProtoMessage()
- func (x *NodeInfoResponse) ProtoReflect() protoreflect.Message
- func (x *NodeInfoResponse) Reset()
- func (x *NodeInfoResponse) String() string
- type PingRequest
- type PingResponse
- type ProtocolClient
- type ProtocolServer
- type SendTransactionRequest
- func (*SendTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendTransactionRequest) GetTransaction() *SignedTransaction
- func (*SendTransactionRequest) ProtoMessage()
- func (x *SendTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *SendTransactionRequest) Reset()
- func (x *SendTransactionRequest) String() string
- type SignedTransaction
- func (*SignedTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *SignedTransaction) GetManageEntity() *ManageEntityLegacy
- func (x *SignedTransaction) GetPlays() *TrackPlays
- func (x *SignedTransaction) GetRequestId() string
- func (x *SignedTransaction) GetSignature() string
- func (x *SignedTransaction) GetSlaRollup() *SlaRollup
- func (m *SignedTransaction) GetTransaction() isSignedTransaction_Transaction
- func (x *SignedTransaction) GetValidatorRegistration() *ValidatorRegistration
- func (*SignedTransaction) ProtoMessage()
- func (x *SignedTransaction) ProtoReflect() protoreflect.Message
- func (x *SignedTransaction) Reset()
- func (x *SignedTransaction) String() string
- type SignedTransaction_ManageEntity
- type SignedTransaction_Plays
- type SignedTransaction_SlaRollup
- type SignedTransaction_ValidatorRegistration
- type SlaNodeReport
- func (*SlaNodeReport) Descriptor() ([]byte, []int)deprecated
- func (x *SlaNodeReport) GetAddress() string
- func (x *SlaNodeReport) GetNumBlocksProposed() int32
- func (*SlaNodeReport) ProtoMessage()
- func (x *SlaNodeReport) ProtoReflect() protoreflect.Message
- func (x *SlaNodeReport) Reset()
- func (x *SlaNodeReport) String() string
- type SlaRollup
- func (*SlaRollup) Descriptor() ([]byte, []int)deprecated
- func (x *SlaRollup) GetBlockEnd() int64
- func (x *SlaRollup) GetBlockStart() int64
- func (x *SlaRollup) GetReports() []*SlaNodeReport
- func (x *SlaRollup) GetTimestamp() *timestamppb.Timestamp
- func (*SlaRollup) ProtoMessage()
- func (x *SlaRollup) ProtoReflect() protoreflect.Message
- func (x *SlaRollup) Reset()
- func (x *SlaRollup) String() string
- type TrackPlay
- func (*TrackPlay) Descriptor() ([]byte, []int)deprecated
- func (x *TrackPlay) GetSignature() string
- func (x *TrackPlay) GetTimestamp() *timestamppb.Timestamp
- func (x *TrackPlay) GetTrackId() string
- func (x *TrackPlay) GetUserId() string
- func (*TrackPlay) ProtoMessage()
- func (x *TrackPlay) ProtoReflect() protoreflect.Message
- func (x *TrackPlay) Reset()
- func (x *TrackPlay) String() string
- type TrackPlays
- type TransactionResponse
- func (*TransactionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionResponse) GetTransaction() *SignedTransaction
- func (x *TransactionResponse) GetTxhash() string
- func (*TransactionResponse) ProtoMessage()
- func (x *TransactionResponse) ProtoReflect() protoreflect.Message
- func (x *TransactionResponse) Reset()
- func (x *TransactionResponse) String() string
- type UnimplementedProtocolServer
- func (UnimplementedProtocolServer) ForwardTransaction(context.Context, *ForwardTransactionRequest) (*ForwardTransactionResponse, error)
- func (UnimplementedProtocolServer) GetBlock(context.Context, *GetBlockRequest) (*BlockResponse, error)
- func (UnimplementedProtocolServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error)
- func (UnimplementedProtocolServer) GetTransaction(context.Context, *GetTransactionRequest) (*TransactionResponse, error)
- func (UnimplementedProtocolServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
- func (UnimplementedProtocolServer) SendTransaction(context.Context, *SendTransactionRequest) (*TransactionResponse, error)
- type UnsafeProtocolServer
- type ValidatorRegistration
- func (*ValidatorRegistration) Descriptor() ([]byte, []int)deprecated
- func (x *ValidatorRegistration) GetCometAddress() string
- func (x *ValidatorRegistration) GetEndpoint() string
- func (x *ValidatorRegistration) GetEthBlock() string
- func (x *ValidatorRegistration) GetNodeType() string
- func (x *ValidatorRegistration) GetSpId() string
- func (*ValidatorRegistration) ProtoMessage()
- func (x *ValidatorRegistration) ProtoReflect() protoreflect.Message
- func (x *ValidatorRegistration) Reset()
- func (x *ValidatorRegistration) String() string
Constants ¶
const ( Protocol_SendTransaction_FullMethodName = "/protocol.Protocol/SendTransaction" Protocol_ForwardTransaction_FullMethodName = "/protocol.Protocol/ForwardTransaction" Protocol_GetTransaction_FullMethodName = "/protocol.Protocol/GetTransaction" Protocol_GetBlock_FullMethodName = "/protocol.Protocol/GetBlock" Protocol_GetNodeInfo_FullMethodName = "/protocol.Protocol/GetNodeInfo" Protocol_Ping_FullMethodName = "/protocol.Protocol/Ping" )
Variables ¶
var File_protocol_proto protoreflect.FileDescriptor
var Protocol_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protocol.Protocol", HandlerType: (*ProtocolServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendTransaction", Handler: _Protocol_SendTransaction_Handler, }, { MethodName: "ForwardTransaction", Handler: _Protocol_ForwardTransaction_Handler, }, { MethodName: "GetTransaction", Handler: _Protocol_GetTransaction_Handler, }, { MethodName: "GetBlock", Handler: _Protocol_GetBlock_Handler, }, { MethodName: "GetNodeInfo", Handler: _Protocol_GetNodeInfo_Handler, }, { MethodName: "Ping", Handler: _Protocol_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protocol.proto", }
Protocol_ServiceDesc is the grpc.ServiceDesc for Protocol service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProtocolHandler ¶
func RegisterProtocolHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProtocolHandler registers the http handlers for service Protocol to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProtocolHandlerClient ¶
func RegisterProtocolHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProtocolClient) error
RegisterProtocolHandlerClient registers the http handlers for service Protocol to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProtocolClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProtocolClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProtocolClient" to call the correct interceptors.
func RegisterProtocolHandlerFromEndpoint ¶
func RegisterProtocolHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProtocolHandlerFromEndpoint is same as RegisterProtocolHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProtocolHandlerServer ¶
func RegisterProtocolHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProtocolServer) error
RegisterProtocolHandlerServer registers the http handlers for service Protocol to "mux". UnaryRPC :call ProtocolServer 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 RegisterProtocolHandlerFromEndpoint instead.
func RegisterProtocolServer ¶
func RegisterProtocolServer(s grpc.ServiceRegistrar, srv ProtocolServer)
Types ¶
type BlockResponse ¶
type BlockResponse struct {
Blockhash string `protobuf:"bytes,1,opt,name=blockhash,proto3" json:"blockhash,omitempty"`
Chainid string `protobuf:"bytes,2,opt,name=chainid,proto3" json:"chainid,omitempty"`
Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
Transactions []*SignedTransaction `protobuf:"bytes,5,rep,name=transactions,proto3" json:"transactions,omitempty"`
// contains filtered or unexported fields
}
func (*BlockResponse) Descriptor
deprecated
func (*BlockResponse) Descriptor() ([]byte, []int)
Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead.
func (*BlockResponse) GetBlockhash ¶
func (x *BlockResponse) GetBlockhash() string
func (*BlockResponse) GetChainid ¶
func (x *BlockResponse) GetChainid() string
func (*BlockResponse) GetHeight ¶
func (x *BlockResponse) GetHeight() int64
func (*BlockResponse) GetProposer ¶
func (x *BlockResponse) GetProposer() string
func (*BlockResponse) GetTransactions ¶
func (x *BlockResponse) GetTransactions() []*SignedTransaction
func (*BlockResponse) ProtoMessage ¶
func (*BlockResponse) ProtoMessage()
func (*BlockResponse) ProtoReflect ¶
func (x *BlockResponse) ProtoReflect() protoreflect.Message
func (*BlockResponse) Reset ¶
func (x *BlockResponse) Reset()
func (*BlockResponse) String ¶
func (x *BlockResponse) String() string
type ForwardTransactionRequest ¶
type ForwardTransactionRequest struct {
Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
Transaction *SignedTransaction `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"`
// contains filtered or unexported fields
}
func (*ForwardTransactionRequest) Descriptor
deprecated
func (*ForwardTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use ForwardTransactionRequest.ProtoReflect.Descriptor instead.
func (*ForwardTransactionRequest) GetSignature ¶
func (x *ForwardTransactionRequest) GetSignature() string
func (*ForwardTransactionRequest) GetTransaction ¶
func (x *ForwardTransactionRequest) GetTransaction() *SignedTransaction
func (*ForwardTransactionRequest) ProtoMessage ¶
func (*ForwardTransactionRequest) ProtoMessage()
func (*ForwardTransactionRequest) ProtoReflect ¶
func (x *ForwardTransactionRequest) ProtoReflect() protoreflect.Message
func (*ForwardTransactionRequest) Reset ¶
func (x *ForwardTransactionRequest) Reset()
func (*ForwardTransactionRequest) String ¶
func (x *ForwardTransactionRequest) String() string
type ForwardTransactionResponse ¶
type ForwardTransactionResponse struct {
// contains filtered or unexported fields
}
func (*ForwardTransactionResponse) Descriptor
deprecated
func (*ForwardTransactionResponse) Descriptor() ([]byte, []int)
Deprecated: Use ForwardTransactionResponse.ProtoReflect.Descriptor instead.
func (*ForwardTransactionResponse) ProtoMessage ¶
func (*ForwardTransactionResponse) ProtoMessage()
func (*ForwardTransactionResponse) ProtoReflect ¶
func (x *ForwardTransactionResponse) ProtoReflect() protoreflect.Message
func (*ForwardTransactionResponse) Reset ¶
func (x *ForwardTransactionResponse) Reset()
func (*ForwardTransactionResponse) String ¶
func (x *ForwardTransactionResponse) String() string
type GetBlockRequest ¶
type GetBlockRequest struct {
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
// contains filtered or unexported fields
}
func (*GetBlockRequest) Descriptor
deprecated
func (*GetBlockRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead.
func (*GetBlockRequest) GetHeight ¶
func (x *GetBlockRequest) GetHeight() int64
func (*GetBlockRequest) ProtoMessage ¶
func (*GetBlockRequest) ProtoMessage()
func (*GetBlockRequest) ProtoReflect ¶
func (x *GetBlockRequest) ProtoReflect() protoreflect.Message
func (*GetBlockRequest) Reset ¶
func (x *GetBlockRequest) Reset()
func (*GetBlockRequest) String ¶
func (x *GetBlockRequest) String() string
type GetNodeInfoRequest ¶
type GetNodeInfoRequest struct {
// contains filtered or unexported fields
}
func (*GetNodeInfoRequest) Descriptor
deprecated
func (*GetNodeInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNodeInfoRequest.ProtoReflect.Descriptor instead.
func (*GetNodeInfoRequest) ProtoMessage ¶
func (*GetNodeInfoRequest) ProtoMessage()
func (*GetNodeInfoRequest) ProtoReflect ¶
func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message
func (*GetNodeInfoRequest) Reset ¶
func (x *GetNodeInfoRequest) Reset()
func (*GetNodeInfoRequest) String ¶
func (x *GetNodeInfoRequest) String() string
type GetTransactionRequest ¶
type GetTransactionRequest struct {
Txhash string `protobuf:"bytes,1,opt,name=txhash,proto3" json:"txhash,omitempty"`
// contains filtered or unexported fields
}
func (*GetTransactionRequest) Descriptor
deprecated
func (*GetTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead.
func (*GetTransactionRequest) GetTxhash ¶
func (x *GetTransactionRequest) GetTxhash() string
func (*GetTransactionRequest) ProtoMessage ¶
func (*GetTransactionRequest) ProtoMessage()
func (*GetTransactionRequest) ProtoReflect ¶
func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message
func (*GetTransactionRequest) Reset ¶
func (x *GetTransactionRequest) Reset()
func (*GetTransactionRequest) String ¶
func (x *GetTransactionRequest) String() string
type ManageEntityLegacy ¶
type ManageEntityLegacy struct {
UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
EntityType string `protobuf:"bytes,2,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"`
EntityId int64 `protobuf:"varint,3,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
Action string `protobuf:"bytes,4,opt,name=action,proto3" json:"action,omitempty"`
Metadata string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
Signature string `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
// contains filtered or unexported fields
}
func (*ManageEntityLegacy) Descriptor
deprecated
func (*ManageEntityLegacy) Descriptor() ([]byte, []int)
Deprecated: Use ManageEntityLegacy.ProtoReflect.Descriptor instead.
func (*ManageEntityLegacy) GetAction ¶
func (x *ManageEntityLegacy) GetAction() string
func (*ManageEntityLegacy) GetEntityId ¶
func (x *ManageEntityLegacy) GetEntityId() int64
func (*ManageEntityLegacy) GetEntityType ¶
func (x *ManageEntityLegacy) GetEntityType() string
func (*ManageEntityLegacy) GetMetadata ¶
func (x *ManageEntityLegacy) GetMetadata() string
func (*ManageEntityLegacy) GetSignature ¶
func (x *ManageEntityLegacy) GetSignature() string
func (*ManageEntityLegacy) GetUserId ¶
func (x *ManageEntityLegacy) GetUserId() int64
func (*ManageEntityLegacy) ProtoMessage ¶
func (*ManageEntityLegacy) ProtoMessage()
func (*ManageEntityLegacy) ProtoReflect ¶
func (x *ManageEntityLegacy) ProtoReflect() protoreflect.Message
func (*ManageEntityLegacy) Reset ¶
func (x *ManageEntityLegacy) Reset()
func (*ManageEntityLegacy) String ¶
func (x *ManageEntityLegacy) String() string
type NodeInfoResponse ¶
type NodeInfoResponse struct {
Chainid string `protobuf:"bytes,1,opt,name=chainid,proto3" json:"chainid,omitempty"`
Synced bool `protobuf:"varint,2,opt,name=synced,proto3" json:"synced,omitempty"`
CometAddress string `protobuf:"bytes,3,opt,name=comet_address,json=cometAddress,proto3" json:"comet_address,omitempty"`
EthAddress string `protobuf:"bytes,4,opt,name=eth_address,json=ethAddress,proto3" json:"eth_address,omitempty"`
CurrentHeight int64 `protobuf:"varint,5,opt,name=current_height,json=currentHeight,proto3" json:"current_height,omitempty"`
// contains filtered or unexported fields
}
func (*NodeInfoResponse) Descriptor
deprecated
func (*NodeInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use NodeInfoResponse.ProtoReflect.Descriptor instead.
func (*NodeInfoResponse) GetChainid ¶
func (x *NodeInfoResponse) GetChainid() string
func (*NodeInfoResponse) GetCometAddress ¶
func (x *NodeInfoResponse) GetCometAddress() string
func (*NodeInfoResponse) GetCurrentHeight ¶
func (x *NodeInfoResponse) GetCurrentHeight() int64
func (*NodeInfoResponse) GetEthAddress ¶
func (x *NodeInfoResponse) GetEthAddress() string
func (*NodeInfoResponse) GetSynced ¶
func (x *NodeInfoResponse) GetSynced() bool
func (*NodeInfoResponse) ProtoMessage ¶
func (*NodeInfoResponse) ProtoMessage()
func (*NodeInfoResponse) ProtoReflect ¶
func (x *NodeInfoResponse) ProtoReflect() protoreflect.Message
func (*NodeInfoResponse) Reset ¶
func (x *NodeInfoResponse) Reset()
func (*NodeInfoResponse) String ¶
func (x *NodeInfoResponse) String() string
type PingRequest ¶
type PingRequest struct {
// contains filtered or unexported fields
}
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetMessage ¶
func (x *PingResponse) GetMessage() string
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type ProtocolClient ¶
type ProtocolClient interface {
SendTransaction(ctx context.Context, in *SendTransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
ForwardTransaction(ctx context.Context, in *ForwardTransactionRequest, opts ...grpc.CallOption) (*ForwardTransactionResponse, error)
GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*TransactionResponse, error)
GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*BlockResponse, error)
GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*NodeInfoResponse, error)
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
}
ProtocolClient is the client API for Protocol 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 NewProtocolClient ¶
func NewProtocolClient(cc grpc.ClientConnInterface) ProtocolClient
type ProtocolServer ¶
type ProtocolServer interface {
SendTransaction(context.Context, *SendTransactionRequest) (*TransactionResponse, error)
ForwardTransaction(context.Context, *ForwardTransactionRequest) (*ForwardTransactionResponse, error)
GetTransaction(context.Context, *GetTransactionRequest) (*TransactionResponse, error)
GetBlock(context.Context, *GetBlockRequest) (*BlockResponse, error)
GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error)
Ping(context.Context, *PingRequest) (*PingResponse, error)
// contains filtered or unexported methods
}
ProtocolServer is the server API for Protocol service. All implementations must embed UnimplementedProtocolServer for forward compatibility
type SendTransactionRequest ¶
type SendTransactionRequest struct {
Transaction *SignedTransaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
// contains filtered or unexported fields
}
func (*SendTransactionRequest) Descriptor
deprecated
func (*SendTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendTransactionRequest.ProtoReflect.Descriptor instead.
func (*SendTransactionRequest) GetTransaction ¶
func (x *SendTransactionRequest) GetTransaction() *SignedTransaction
func (*SendTransactionRequest) ProtoMessage ¶
func (*SendTransactionRequest) ProtoMessage()
func (*SendTransactionRequest) ProtoReflect ¶
func (x *SendTransactionRequest) ProtoReflect() protoreflect.Message
func (*SendTransactionRequest) Reset ¶
func (x *SendTransactionRequest) Reset()
func (*SendTransactionRequest) String ¶
func (x *SendTransactionRequest) String() string
type SignedTransaction ¶
type SignedTransaction struct {
Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// Types that are assignable to Transaction:
//
// *SignedTransaction_Plays
// *SignedTransaction_ValidatorRegistration
// *SignedTransaction_SlaRollup
// *SignedTransaction_ManageEntity
Transaction isSignedTransaction_Transaction `protobuf_oneof:"transaction"`
// contains filtered or unexported fields
}
func (*SignedTransaction) Descriptor
deprecated
func (*SignedTransaction) Descriptor() ([]byte, []int)
Deprecated: Use SignedTransaction.ProtoReflect.Descriptor instead.
func (*SignedTransaction) GetManageEntity ¶
func (x *SignedTransaction) GetManageEntity() *ManageEntityLegacy
func (*SignedTransaction) GetPlays ¶
func (x *SignedTransaction) GetPlays() *TrackPlays
func (*SignedTransaction) GetRequestId ¶
func (x *SignedTransaction) GetRequestId() string
func (*SignedTransaction) GetSignature ¶
func (x *SignedTransaction) GetSignature() string
func (*SignedTransaction) GetSlaRollup ¶
func (x *SignedTransaction) GetSlaRollup() *SlaRollup
func (*SignedTransaction) GetTransaction ¶
func (m *SignedTransaction) GetTransaction() isSignedTransaction_Transaction
func (*SignedTransaction) GetValidatorRegistration ¶
func (x *SignedTransaction) GetValidatorRegistration() *ValidatorRegistration
func (*SignedTransaction) ProtoMessage ¶
func (*SignedTransaction) ProtoMessage()
func (*SignedTransaction) ProtoReflect ¶
func (x *SignedTransaction) ProtoReflect() protoreflect.Message
func (*SignedTransaction) Reset ¶
func (x *SignedTransaction) Reset()
func (*SignedTransaction) String ¶
func (x *SignedTransaction) String() string
type SignedTransaction_ManageEntity ¶
type SignedTransaction_ManageEntity struct {
ManageEntity *ManageEntityLegacy `protobuf:"bytes,1003,opt,name=manage_entity,json=manageEntity,proto3,oneof"`
}
type SignedTransaction_Plays ¶
type SignedTransaction_Plays struct {
Plays *TrackPlays `protobuf:"bytes,1000,opt,name=plays,proto3,oneof"`
}
type SignedTransaction_SlaRollup ¶
type SignedTransaction_SlaRollup struct {
SlaRollup *SlaRollup `protobuf:"bytes,1002,opt,name=sla_rollup,json=slaRollup,proto3,oneof"`
}
type SignedTransaction_ValidatorRegistration ¶
type SignedTransaction_ValidatorRegistration struct {
ValidatorRegistration *ValidatorRegistration `protobuf:"bytes,1001,opt,name=validator_registration,json=validatorRegistration,proto3,oneof"`
}
type SlaNodeReport ¶
type SlaNodeReport struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
NumBlocksProposed int32 `protobuf:"varint,2,opt,name=num_blocks_proposed,json=numBlocksProposed,proto3" json:"num_blocks_proposed,omitempty"`
// contains filtered or unexported fields
}
func (*SlaNodeReport) Descriptor
deprecated
func (*SlaNodeReport) Descriptor() ([]byte, []int)
Deprecated: Use SlaNodeReport.ProtoReflect.Descriptor instead.
func (*SlaNodeReport) GetAddress ¶
func (x *SlaNodeReport) GetAddress() string
func (*SlaNodeReport) GetNumBlocksProposed ¶
func (x *SlaNodeReport) GetNumBlocksProposed() int32
func (*SlaNodeReport) ProtoMessage ¶
func (*SlaNodeReport) ProtoMessage()
func (*SlaNodeReport) ProtoReflect ¶
func (x *SlaNodeReport) ProtoReflect() protoreflect.Message
func (*SlaNodeReport) Reset ¶
func (x *SlaNodeReport) Reset()
func (*SlaNodeReport) String ¶
func (x *SlaNodeReport) String() string
type SlaRollup ¶
type SlaRollup struct {
Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
BlockStart int64 `protobuf:"varint,2,opt,name=block_start,json=blockStart,proto3" json:"block_start,omitempty"`
BlockEnd int64 `protobuf:"varint,3,opt,name=block_end,json=blockEnd,proto3" json:"block_end,omitempty"`
Reports []*SlaNodeReport `protobuf:"bytes,4,rep,name=reports,proto3" json:"reports,omitempty"`
// contains filtered or unexported fields
}
func (*SlaRollup) Descriptor
deprecated
func (*SlaRollup) GetBlockEnd ¶
func (*SlaRollup) GetBlockStart ¶
func (*SlaRollup) GetReports ¶
func (x *SlaRollup) GetReports() []*SlaNodeReport
func (*SlaRollup) GetTimestamp ¶
func (x *SlaRollup) GetTimestamp() *timestamppb.Timestamp
func (*SlaRollup) ProtoMessage ¶
func (*SlaRollup) ProtoMessage()
func (*SlaRollup) ProtoReflect ¶
func (x *SlaRollup) ProtoReflect() protoreflect.Message
type TrackPlay ¶
type TrackPlay struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
TrackId string `protobuf:"bytes,2,opt,name=track_id,json=trackId,proto3" json:"track_id,omitempty"`
Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
// contains filtered or unexported fields
}
func (*TrackPlay) Descriptor
deprecated
func (*TrackPlay) GetSignature ¶
func (*TrackPlay) GetTimestamp ¶
func (x *TrackPlay) GetTimestamp() *timestamppb.Timestamp
func (*TrackPlay) GetTrackId ¶
func (*TrackPlay) ProtoMessage ¶
func (*TrackPlay) ProtoMessage()
func (*TrackPlay) ProtoReflect ¶
func (x *TrackPlay) ProtoReflect() protoreflect.Message
type TrackPlays ¶
type TrackPlays struct {
Plays []*TrackPlay `protobuf:"bytes,1,rep,name=plays,proto3" json:"plays,omitempty"`
// contains filtered or unexported fields
}
func (*TrackPlays) Descriptor
deprecated
func (*TrackPlays) Descriptor() ([]byte, []int)
Deprecated: Use TrackPlays.ProtoReflect.Descriptor instead.
func (*TrackPlays) GetPlays ¶
func (x *TrackPlays) GetPlays() []*TrackPlay
func (*TrackPlays) ProtoMessage ¶
func (*TrackPlays) ProtoMessage()
func (*TrackPlays) ProtoReflect ¶
func (x *TrackPlays) ProtoReflect() protoreflect.Message
func (*TrackPlays) Reset ¶
func (x *TrackPlays) Reset()
func (*TrackPlays) String ¶
func (x *TrackPlays) String() string
type TransactionResponse ¶
type TransactionResponse struct {
Txhash string `protobuf:"bytes,1,opt,name=txhash,proto3" json:"txhash,omitempty"`
Transaction *SignedTransaction `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"`
// contains filtered or unexported fields
}
func (*TransactionResponse) Descriptor
deprecated
func (*TransactionResponse) Descriptor() ([]byte, []int)
Deprecated: Use TransactionResponse.ProtoReflect.Descriptor instead.
func (*TransactionResponse) GetTransaction ¶
func (x *TransactionResponse) GetTransaction() *SignedTransaction
func (*TransactionResponse) GetTxhash ¶
func (x *TransactionResponse) GetTxhash() string
func (*TransactionResponse) ProtoMessage ¶
func (*TransactionResponse) ProtoMessage()
func (*TransactionResponse) ProtoReflect ¶
func (x *TransactionResponse) ProtoReflect() protoreflect.Message
func (*TransactionResponse) Reset ¶
func (x *TransactionResponse) Reset()
func (*TransactionResponse) String ¶
func (x *TransactionResponse) String() string
type UnimplementedProtocolServer ¶
type UnimplementedProtocolServer struct {
}
UnimplementedProtocolServer must be embedded to have forward compatible implementations.
func (UnimplementedProtocolServer) ForwardTransaction ¶
func (UnimplementedProtocolServer) ForwardTransaction(context.Context, *ForwardTransactionRequest) (*ForwardTransactionResponse, error)
func (UnimplementedProtocolServer) GetBlock ¶
func (UnimplementedProtocolServer) GetBlock(context.Context, *GetBlockRequest) (*BlockResponse, error)
func (UnimplementedProtocolServer) GetNodeInfo ¶
func (UnimplementedProtocolServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*NodeInfoResponse, error)
func (UnimplementedProtocolServer) GetTransaction ¶
func (UnimplementedProtocolServer) GetTransaction(context.Context, *GetTransactionRequest) (*TransactionResponse, error)
func (UnimplementedProtocolServer) Ping ¶
func (UnimplementedProtocolServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
func (UnimplementedProtocolServer) SendTransaction ¶
func (UnimplementedProtocolServer) SendTransaction(context.Context, *SendTransactionRequest) (*TransactionResponse, error)
type UnsafeProtocolServer ¶
type UnsafeProtocolServer interface {
// contains filtered or unexported methods
}
UnsafeProtocolServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProtocolServer will result in compilation errors.
type ValidatorRegistration ¶
type ValidatorRegistration struct {
Endpoint string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
CometAddress string `protobuf:"bytes,2,opt,name=comet_address,json=cometAddress,proto3" json:"comet_address,omitempty"`
EthBlock string `protobuf:"bytes,3,opt,name=eth_block,json=ethBlock,proto3" json:"eth_block,omitempty"`
NodeType string `protobuf:"bytes,4,opt,name=node_type,json=nodeType,proto3" json:"node_type,omitempty"`
SpId string `protobuf:"bytes,5,opt,name=sp_id,json=spId,proto3" json:"sp_id,omitempty"`
// contains filtered or unexported fields
}
func (*ValidatorRegistration) Descriptor
deprecated
func (*ValidatorRegistration) Descriptor() ([]byte, []int)
Deprecated: Use ValidatorRegistration.ProtoReflect.Descriptor instead.
func (*ValidatorRegistration) GetCometAddress ¶
func (x *ValidatorRegistration) GetCometAddress() string
func (*ValidatorRegistration) GetEndpoint ¶
func (x *ValidatorRegistration) GetEndpoint() string
func (*ValidatorRegistration) GetEthBlock ¶
func (x *ValidatorRegistration) GetEthBlock() string
func (*ValidatorRegistration) GetNodeType ¶
func (x *ValidatorRegistration) GetNodeType() string
func (*ValidatorRegistration) GetSpId ¶
func (x *ValidatorRegistration) GetSpId() string
func (*ValidatorRegistration) ProtoMessage ¶
func (*ValidatorRegistration) ProtoMessage()
func (*ValidatorRegistration) ProtoReflect ¶
func (x *ValidatorRegistration) ProtoReflect() protoreflect.Message
func (*ValidatorRegistration) Reset ¶
func (x *ValidatorRegistration) Reset()
func (*ValidatorRegistration) String ¶
func (x *ValidatorRegistration) String() string