Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterGatewayServer(s grpc.ServiceRegistrar, srv GatewayServer)
- type ChaincodeEventsRequest
- func (*ChaincodeEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeEventsRequest) GetAfterTransactionId() string
- func (x *ChaincodeEventsRequest) GetChaincodeId() string
- func (x *ChaincodeEventsRequest) GetChannelId() string
- func (x *ChaincodeEventsRequest) GetIdentity() []byte
- func (x *ChaincodeEventsRequest) GetStartPosition() *orderer.SeekPosition
- func (*ChaincodeEventsRequest) ProtoMessage()
- func (x *ChaincodeEventsRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeEventsRequest) Reset()
- func (x *ChaincodeEventsRequest) String() string
- type ChaincodeEventsResponse
- func (*ChaincodeEventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeEventsResponse) GetBlockNumber() uint64
- func (x *ChaincodeEventsResponse) GetEvents() []*peer.ChaincodeEvent
- func (*ChaincodeEventsResponse) ProtoMessage()
- func (x *ChaincodeEventsResponse) ProtoReflect() protoreflect.Message
- func (x *ChaincodeEventsResponse) Reset()
- func (x *ChaincodeEventsResponse) String() string
- type CommitStatusRequest
- func (*CommitStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CommitStatusRequest) GetChannelId() string
- func (x *CommitStatusRequest) GetIdentity() []byte
- func (x *CommitStatusRequest) GetTransactionId() string
- func (*CommitStatusRequest) ProtoMessage()
- func (x *CommitStatusRequest) ProtoReflect() protoreflect.Message
- func (x *CommitStatusRequest) Reset()
- func (x *CommitStatusRequest) String() string
- type CommitStatusResponse
- func (*CommitStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CommitStatusResponse) GetBlockNumber() uint64
- func (x *CommitStatusResponse) GetResult() peer.TxValidationCode
- func (*CommitStatusResponse) ProtoMessage()
- func (x *CommitStatusResponse) ProtoReflect() protoreflect.Message
- func (x *CommitStatusResponse) Reset()
- func (x *CommitStatusResponse) String() string
- type EndorseRequest
- func (*EndorseRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EndorseRequest) GetChannelId() string
- func (x *EndorseRequest) GetEndorsingOrganizations() []string
- func (x *EndorseRequest) GetProposedTransaction() *peer.SignedProposal
- func (x *EndorseRequest) GetTransactionId() string
- func (*EndorseRequest) ProtoMessage()
- func (x *EndorseRequest) ProtoReflect() protoreflect.Message
- func (x *EndorseRequest) Reset()
- func (x *EndorseRequest) String() string
- type EndorseResponse
- func (*EndorseResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EndorseResponse) GetPreparedTransaction() *common.Envelope
- func (*EndorseResponse) ProtoMessage()
- func (x *EndorseResponse) ProtoReflect() protoreflect.Message
- func (x *EndorseResponse) Reset()
- func (x *EndorseResponse) String() string
- type ErrorDetail
- func (*ErrorDetail) Descriptor() ([]byte, []int)deprecated
- func (x *ErrorDetail) GetAddress() string
- func (x *ErrorDetail) GetMessage() string
- func (x *ErrorDetail) GetMspId() string
- func (*ErrorDetail) ProtoMessage()
- func (x *ErrorDetail) ProtoReflect() protoreflect.Message
- func (x *ErrorDetail) Reset()
- func (x *ErrorDetail) String() string
- type EvaluateRequest
- func (*EvaluateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EvaluateRequest) GetChannelId() string
- func (x *EvaluateRequest) GetProposedTransaction() *peer.SignedProposal
- func (x *EvaluateRequest) GetTargetOrganizations() []string
- func (x *EvaluateRequest) GetTransactionId() string
- func (*EvaluateRequest) ProtoMessage()
- func (x *EvaluateRequest) ProtoReflect() protoreflect.Message
- func (x *EvaluateRequest) Reset()
- func (x *EvaluateRequest) String() string
- type EvaluateResponse
- type GatewayClient
- type GatewayServer
- type Gateway_ChaincodeEventsClient
- type Gateway_ChaincodeEventsServer
- type PreparedTransaction
- func (*PreparedTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *PreparedTransaction) GetEnvelope() *common.Envelope
- func (x *PreparedTransaction) GetTransactionId() string
- func (*PreparedTransaction) ProtoMessage()
- func (x *PreparedTransaction) ProtoReflect() protoreflect.Message
- func (x *PreparedTransaction) Reset()
- func (x *PreparedTransaction) String() string
- type ProposedTransaction
- func (*ProposedTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *ProposedTransaction) GetEndorsingOrganizations() []string
- func (x *ProposedTransaction) GetProposal() *peer.SignedProposal
- func (x *ProposedTransaction) GetTransactionId() string
- func (*ProposedTransaction) ProtoMessage()
- func (x *ProposedTransaction) ProtoReflect() protoreflect.Message
- func (x *ProposedTransaction) Reset()
- func (x *ProposedTransaction) String() string
- type SignedChaincodeEventsRequest
- func (*SignedChaincodeEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignedChaincodeEventsRequest) GetRequest() []byte
- func (x *SignedChaincodeEventsRequest) GetSignature() []byte
- func (*SignedChaincodeEventsRequest) ProtoMessage()
- func (x *SignedChaincodeEventsRequest) ProtoReflect() protoreflect.Message
- func (x *SignedChaincodeEventsRequest) Reset()
- func (x *SignedChaincodeEventsRequest) String() string
- type SignedCommitStatusRequest
- func (*SignedCommitStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignedCommitStatusRequest) GetRequest() []byte
- func (x *SignedCommitStatusRequest) GetSignature() []byte
- func (*SignedCommitStatusRequest) ProtoMessage()
- func (x *SignedCommitStatusRequest) ProtoReflect() protoreflect.Message
- func (x *SignedCommitStatusRequest) Reset()
- func (x *SignedCommitStatusRequest) String() string
- type SubmitRequest
- func (*SubmitRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubmitRequest) GetChannelId() string
- func (x *SubmitRequest) GetPreparedTransaction() *common.Envelope
- func (x *SubmitRequest) GetTransactionId() string
- func (*SubmitRequest) ProtoMessage()
- func (x *SubmitRequest) ProtoReflect() protoreflect.Message
- func (x *SubmitRequest) Reset()
- func (x *SubmitRequest) String() string
- type SubmitResponse
- type UnimplementedGatewayServer
- func (UnimplementedGatewayServer) ChaincodeEvents(*SignedChaincodeEventsRequest, Gateway_ChaincodeEventsServer) error
- func (UnimplementedGatewayServer) CommitStatus(context.Context, *SignedCommitStatusRequest) (*CommitStatusResponse, error)
- func (UnimplementedGatewayServer) Endorse(context.Context, *EndorseRequest) (*EndorseResponse, error)
- func (UnimplementedGatewayServer) Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error)
- func (UnimplementedGatewayServer) Submit(context.Context, *SubmitRequest) (*SubmitResponse, error)
- type UnsafeGatewayServer
Constants ¶
const ( Gateway_Endorse_FullMethodName = "/gateway.Gateway/Endorse" Gateway_Submit_FullMethodName = "/gateway.Gateway/Submit" Gateway_CommitStatus_FullMethodName = "/gateway.Gateway/CommitStatus" Gateway_Evaluate_FullMethodName = "/gateway.Gateway/Evaluate" Gateway_ChaincodeEvents_FullMethodName = "/gateway.Gateway/ChaincodeEvents" )
Variables ¶
var File_gateway_gateway_proto protoreflect.FileDescriptor
var Gateway_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gateway.Gateway", HandlerType: (*GatewayServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Endorse", Handler: _Gateway_Endorse_Handler, }, { MethodName: "Submit", Handler: _Gateway_Submit_Handler, }, { MethodName: "CommitStatus", Handler: _Gateway_CommitStatus_Handler, }, { MethodName: "Evaluate", Handler: _Gateway_Evaluate_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ChaincodeEvents", Handler: _Gateway_ChaincodeEvents_Handler, ServerStreams: true, }, }, Metadata: "gateway/gateway.proto", }
Gateway_ServiceDesc is the grpc.ServiceDesc for Gateway service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGatewayServer ¶
func RegisterGatewayServer(s grpc.ServiceRegistrar, srv GatewayServer)
Types ¶
type ChaincodeEventsRequest ¶
type ChaincodeEventsRequest struct { // Identifier of the channel this request is bound for. ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // Name of the chaincode for which events are requested. ChaincodeId string `protobuf:"bytes,2,opt,name=chaincode_id,json=chaincodeId,proto3" json:"chaincode_id,omitempty"` // Client requestor identity. Identity []byte `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // Position within the ledger at which to start reading events. StartPosition *orderer.SeekPosition `protobuf:"bytes,4,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` // Only returns events after this transaction ID. Transactions up to and including this one should be ignored. This // is used to allow resume of event listening from a certain position within a start block specified by // start_position. AfterTransactionId string `protobuf:"bytes,5,opt,name=after_transaction_id,json=afterTransactionId,proto3" json:"after_transaction_id,omitempty"` // contains filtered or unexported fields }
ChaincodeEventsRequest contains details of the chaincode events that the caller wants to receive.
func (*ChaincodeEventsRequest) Descriptor
deprecated
func (*ChaincodeEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeEventsRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeEventsRequest) GetAfterTransactionId ¶
func (x *ChaincodeEventsRequest) GetAfterTransactionId() string
func (*ChaincodeEventsRequest) GetChaincodeId ¶
func (x *ChaincodeEventsRequest) GetChaincodeId() string
func (*ChaincodeEventsRequest) GetChannelId ¶
func (x *ChaincodeEventsRequest) GetChannelId() string
func (*ChaincodeEventsRequest) GetIdentity ¶
func (x *ChaincodeEventsRequest) GetIdentity() []byte
func (*ChaincodeEventsRequest) GetStartPosition ¶
func (x *ChaincodeEventsRequest) GetStartPosition() *orderer.SeekPosition
func (*ChaincodeEventsRequest) ProtoMessage ¶
func (*ChaincodeEventsRequest) ProtoMessage()
func (*ChaincodeEventsRequest) ProtoReflect ¶
func (x *ChaincodeEventsRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeEventsRequest) Reset ¶
func (x *ChaincodeEventsRequest) Reset()
func (*ChaincodeEventsRequest) String ¶
func (x *ChaincodeEventsRequest) String() string
type ChaincodeEventsResponse ¶
type ChaincodeEventsResponse struct { // Chaincode events emitted by the requested chaincode. The events are presented in the same order that the // transactions that emitted them appear within the block. Events []*peer.ChaincodeEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // Block number in which the chaincode events were emitted. BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // contains filtered or unexported fields }
ChaincodeEventsResponse returns chaincode events emitted from a specific block.
func (*ChaincodeEventsResponse) Descriptor
deprecated
func (*ChaincodeEventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeEventsResponse.ProtoReflect.Descriptor instead.
func (*ChaincodeEventsResponse) GetBlockNumber ¶
func (x *ChaincodeEventsResponse) GetBlockNumber() uint64
func (*ChaincodeEventsResponse) GetEvents ¶
func (x *ChaincodeEventsResponse) GetEvents() []*peer.ChaincodeEvent
func (*ChaincodeEventsResponse) ProtoMessage ¶
func (*ChaincodeEventsResponse) ProtoMessage()
func (*ChaincodeEventsResponse) ProtoReflect ¶
func (x *ChaincodeEventsResponse) ProtoReflect() protoreflect.Message
func (*ChaincodeEventsResponse) Reset ¶
func (x *ChaincodeEventsResponse) Reset()
func (*ChaincodeEventsResponse) String ¶
func (x *ChaincodeEventsResponse) String() string
type CommitStatusRequest ¶
type CommitStatusRequest struct { // Identifier of the transaction to check. TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // Identifier of the channel this request is bound for. ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // Client requestor identity. Identity []byte `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // contains filtered or unexported fields }
CommitStatusRequest contains the details required to check whether a transaction has been successfully committed.
func (*CommitStatusRequest) Descriptor
deprecated
func (*CommitStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use CommitStatusRequest.ProtoReflect.Descriptor instead.
func (*CommitStatusRequest) GetChannelId ¶
func (x *CommitStatusRequest) GetChannelId() string
func (*CommitStatusRequest) GetIdentity ¶
func (x *CommitStatusRequest) GetIdentity() []byte
func (*CommitStatusRequest) GetTransactionId ¶
func (x *CommitStatusRequest) GetTransactionId() string
func (*CommitStatusRequest) ProtoMessage ¶
func (*CommitStatusRequest) ProtoMessage()
func (*CommitStatusRequest) ProtoReflect ¶
func (x *CommitStatusRequest) ProtoReflect() protoreflect.Message
func (*CommitStatusRequest) Reset ¶
func (x *CommitStatusRequest) Reset()
func (*CommitStatusRequest) String ¶
func (x *CommitStatusRequest) String() string
type CommitStatusResponse ¶
type CommitStatusResponse struct { // The result of the transaction commit, as defined in peer/transaction.proto. Result peer.TxValidationCode `protobuf:"varint,1,opt,name=result,proto3,enum=protos.TxValidationCode" json:"result,omitempty"` // Block number that contains the transaction. BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // contains filtered or unexported fields }
CommitStatusResponse returns the result of committing a transaction.
func (*CommitStatusResponse) Descriptor
deprecated
func (*CommitStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use CommitStatusResponse.ProtoReflect.Descriptor instead.
func (*CommitStatusResponse) GetBlockNumber ¶
func (x *CommitStatusResponse) GetBlockNumber() uint64
func (*CommitStatusResponse) GetResult ¶
func (x *CommitStatusResponse) GetResult() peer.TxValidationCode
func (*CommitStatusResponse) ProtoMessage ¶
func (*CommitStatusResponse) ProtoMessage()
func (*CommitStatusResponse) ProtoReflect ¶
func (x *CommitStatusResponse) ProtoReflect() protoreflect.Message
func (*CommitStatusResponse) Reset ¶
func (x *CommitStatusResponse) Reset()
func (*CommitStatusResponse) String ¶
func (x *CommitStatusResponse) String() string
type EndorseRequest ¶
type EndorseRequest struct { // The unique identifier for the transaction. TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // Identifier of the channel this request is bound for. ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // The signed proposal ready for endorsement. ProposedTransaction *peer.SignedProposal `protobuf:"bytes,3,opt,name=proposed_transaction,json=proposedTransaction,proto3" json:"proposed_transaction,omitempty"` // If targeting the peers of specific organizations (e.g. for private data scenarios), // the list of organizations' MSPIDs should be supplied here. EndorsingOrganizations []string `` /* 127-byte string literal not displayed */ // contains filtered or unexported fields }
EndorseRequest contains the details required to obtain sufficient endorsements for a transaction to be committed to the ledger.
func (*EndorseRequest) Descriptor
deprecated
func (*EndorseRequest) Descriptor() ([]byte, []int)
Deprecated: Use EndorseRequest.ProtoReflect.Descriptor instead.
func (*EndorseRequest) GetChannelId ¶
func (x *EndorseRequest) GetChannelId() string
func (*EndorseRequest) GetEndorsingOrganizations ¶
func (x *EndorseRequest) GetEndorsingOrganizations() []string
func (*EndorseRequest) GetProposedTransaction ¶
func (x *EndorseRequest) GetProposedTransaction() *peer.SignedProposal
func (*EndorseRequest) GetTransactionId ¶
func (x *EndorseRequest) GetTransactionId() string
func (*EndorseRequest) ProtoMessage ¶
func (*EndorseRequest) ProtoMessage()
func (*EndorseRequest) ProtoReflect ¶
func (x *EndorseRequest) ProtoReflect() protoreflect.Message
func (*EndorseRequest) Reset ¶
func (x *EndorseRequest) Reset()
func (*EndorseRequest) String ¶
func (x *EndorseRequest) String() string
type EndorseResponse ¶
type EndorseResponse struct { // The unsigned set of transaction responses from the endorsing peers for signing by the client // before submitting to ordering service (via gateway). PreparedTransaction *common.Envelope `protobuf:"bytes,1,opt,name=prepared_transaction,json=preparedTransaction,proto3" json:"prepared_transaction,omitempty"` // contains filtered or unexported fields }
EndorseResponse returns the result of endorsing a transaction.
func (*EndorseResponse) Descriptor
deprecated
func (*EndorseResponse) Descriptor() ([]byte, []int)
Deprecated: Use EndorseResponse.ProtoReflect.Descriptor instead.
func (*EndorseResponse) GetPreparedTransaction ¶
func (x *EndorseResponse) GetPreparedTransaction() *common.Envelope
func (*EndorseResponse) ProtoMessage ¶
func (*EndorseResponse) ProtoMessage()
func (*EndorseResponse) ProtoReflect ¶
func (x *EndorseResponse) ProtoReflect() protoreflect.Message
func (*EndorseResponse) Reset ¶
func (x *EndorseResponse) Reset()
func (*EndorseResponse) String ¶
func (x *EndorseResponse) String() string
type ErrorDetail ¶
type ErrorDetail struct { // The address of the endorsing peer or ordering node that returned an error. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // The MSP Identifier of this node. MspId string `protobuf:"bytes,2,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"` // The error message returned by this node. Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
If any of the functions in the Gateway service returns an error, then it will be in the format of a google.rpc.Status message. The 'details' field of this message will be populated with extra information if the error is a result of one or more failed requests to remote peers or orderer nodes. ErrorDetail contains details of errors that are received by any of the endorsing peers as a result of processing the Evaluate or Endorse services, or from the ordering node(s) as a result of processing the Submit service.
func (*ErrorDetail) Descriptor
deprecated
func (*ErrorDetail) Descriptor() ([]byte, []int)
Deprecated: Use ErrorDetail.ProtoReflect.Descriptor instead.
func (*ErrorDetail) GetAddress ¶
func (x *ErrorDetail) GetAddress() string
func (*ErrorDetail) GetMessage ¶
func (x *ErrorDetail) GetMessage() string
func (*ErrorDetail) GetMspId ¶
func (x *ErrorDetail) GetMspId() string
func (*ErrorDetail) ProtoMessage ¶
func (*ErrorDetail) ProtoMessage()
func (*ErrorDetail) ProtoReflect ¶
func (x *ErrorDetail) ProtoReflect() protoreflect.Message
func (*ErrorDetail) Reset ¶
func (x *ErrorDetail) Reset()
func (*ErrorDetail) String ¶
func (x *ErrorDetail) String() string
type EvaluateRequest ¶
type EvaluateRequest struct { // Identifier of the transaction to evaluate. TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // Identifier of the channel this request is bound for. ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // The signed proposal ready for evaluation. ProposedTransaction *peer.SignedProposal `protobuf:"bytes,3,opt,name=proposed_transaction,json=proposedTransaction,proto3" json:"proposed_transaction,omitempty"` // If targeting the peers of specific organizations (e.g. for private data scenarios), // the list of organizations' MSPIDs should be supplied here. TargetOrganizations []string `protobuf:"bytes,4,rep,name=target_organizations,json=targetOrganizations,proto3" json:"target_organizations,omitempty"` // contains filtered or unexported fields }
EvaluateRequest contains the details required to evaluate a transaction (query the ledger).
func (*EvaluateRequest) Descriptor
deprecated
func (*EvaluateRequest) Descriptor() ([]byte, []int)
Deprecated: Use EvaluateRequest.ProtoReflect.Descriptor instead.
func (*EvaluateRequest) GetChannelId ¶
func (x *EvaluateRequest) GetChannelId() string
func (*EvaluateRequest) GetProposedTransaction ¶
func (x *EvaluateRequest) GetProposedTransaction() *peer.SignedProposal
func (*EvaluateRequest) GetTargetOrganizations ¶
func (x *EvaluateRequest) GetTargetOrganizations() []string
func (*EvaluateRequest) GetTransactionId ¶
func (x *EvaluateRequest) GetTransactionId() string
func (*EvaluateRequest) ProtoMessage ¶
func (*EvaluateRequest) ProtoMessage()
func (*EvaluateRequest) ProtoReflect ¶
func (x *EvaluateRequest) ProtoReflect() protoreflect.Message
func (*EvaluateRequest) Reset ¶
func (x *EvaluateRequest) Reset()
func (*EvaluateRequest) String ¶
func (x *EvaluateRequest) String() string
type EvaluateResponse ¶
type EvaluateResponse struct { // The response that is returned by the transaction function, as defined // in peer/proposal_response.proto. Result *peer.Response `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
EvaluateResponse returns the result of evaluating a transaction.
func (*EvaluateResponse) Descriptor
deprecated
func (*EvaluateResponse) Descriptor() ([]byte, []int)
Deprecated: Use EvaluateResponse.ProtoReflect.Descriptor instead.
func (*EvaluateResponse) GetResult ¶
func (x *EvaluateResponse) GetResult() *peer.Response
func (*EvaluateResponse) ProtoMessage ¶
func (*EvaluateResponse) ProtoMessage()
func (*EvaluateResponse) ProtoReflect ¶
func (x *EvaluateResponse) ProtoReflect() protoreflect.Message
func (*EvaluateResponse) Reset ¶
func (x *EvaluateResponse) Reset()
func (*EvaluateResponse) String ¶
func (x *EvaluateResponse) String() string
type GatewayClient ¶
type GatewayClient interface { // The Endorse service passes a proposed transaction to the gateway in order to // obtain sufficient endorsement. // The gateway will determine the endorsement plan for the requested chaincode and // forward to the appropriate peers for endorsement. It will return to the client a // prepared transaction in the form of an Envelope message as defined // in common/common.proto. The client must sign the contents of this envelope // before invoking the Submit service. Endorse(ctx context.Context, in *EndorseRequest, opts ...grpc.CallOption) (*EndorseResponse, error) // The Submit service will process the prepared transaction returned from Endorse service // once it has been signed by the client. It will wait for the transaction to be submitted to the // ordering service but the client must invoke the CommitStatus service to wait for the transaction // to be committed. Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*SubmitResponse, error) // The CommitStatus service will indicate whether a prepared transaction previously submitted to // the Submit service has been committed. It will wait for the commit to occur if it hasn’t already // committed. CommitStatus(ctx context.Context, in *SignedCommitStatusRequest, opts ...grpc.CallOption) (*CommitStatusResponse, error) // The Evaluate service passes a proposed transaction to the gateway in order to invoke the // transaction function and return the result to the client. No ledger updates are made. // The gateway will select an appropriate peer to query based on block height and load. Evaluate(ctx context.Context, in *EvaluateRequest, opts ...grpc.CallOption) (*EvaluateResponse, error) // The ChaincodeEvents service supplies a stream of responses, each containing all the events emitted by the // requested chaincode for a specific block. The streamed responses are ordered by ascending block number. Responses // are only returned for blocks that contain the requested events, while blocks not containing any of the requested // events are skipped. ChaincodeEvents(ctx context.Context, in *SignedChaincodeEventsRequest, opts ...grpc.CallOption) (Gateway_ChaincodeEventsClient, error) }
GatewayClient is the client API for Gateway 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 NewGatewayClient ¶
func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient
type GatewayServer ¶
type GatewayServer interface { // The Endorse service passes a proposed transaction to the gateway in order to // obtain sufficient endorsement. // The gateway will determine the endorsement plan for the requested chaincode and // forward to the appropriate peers for endorsement. It will return to the client a // prepared transaction in the form of an Envelope message as defined // in common/common.proto. The client must sign the contents of this envelope // before invoking the Submit service. Endorse(context.Context, *EndorseRequest) (*EndorseResponse, error) // The Submit service will process the prepared transaction returned from Endorse service // once it has been signed by the client. It will wait for the transaction to be submitted to the // ordering service but the client must invoke the CommitStatus service to wait for the transaction // to be committed. Submit(context.Context, *SubmitRequest) (*SubmitResponse, error) // The CommitStatus service will indicate whether a prepared transaction previously submitted to // the Submit service has been committed. It will wait for the commit to occur if it hasn’t already // committed. CommitStatus(context.Context, *SignedCommitStatusRequest) (*CommitStatusResponse, error) // The Evaluate service passes a proposed transaction to the gateway in order to invoke the // transaction function and return the result to the client. No ledger updates are made. // The gateway will select an appropriate peer to query based on block height and load. Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error) // The ChaincodeEvents service supplies a stream of responses, each containing all the events emitted by the // requested chaincode for a specific block. The streamed responses are ordered by ascending block number. Responses // are only returned for blocks that contain the requested events, while blocks not containing any of the requested // events are skipped. ChaincodeEvents(*SignedChaincodeEventsRequest, Gateway_ChaincodeEventsServer) error }
GatewayServer is the server API for Gateway service. All implementations should embed UnimplementedGatewayServer for forward compatibility
type Gateway_ChaincodeEventsClient ¶
type Gateway_ChaincodeEventsClient interface { Recv() (*ChaincodeEventsResponse, error) grpc.ClientStream }
type Gateway_ChaincodeEventsServer ¶
type Gateway_ChaincodeEventsServer interface { Send(*ChaincodeEventsResponse) error grpc.ServerStream }
type PreparedTransaction ¶
type PreparedTransaction struct { // Identifier of the prepared transaction. TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // The transaction envelope. Envelope *common.Envelope `protobuf:"bytes,2,opt,name=envelope,proto3" json:"envelope,omitempty"` // contains filtered or unexported fields }
PreparedTransaction contains the details required for offline signing prior to submitting a transaction.
func (*PreparedTransaction) Descriptor
deprecated
func (*PreparedTransaction) Descriptor() ([]byte, []int)
Deprecated: Use PreparedTransaction.ProtoReflect.Descriptor instead.
func (*PreparedTransaction) GetEnvelope ¶
func (x *PreparedTransaction) GetEnvelope() *common.Envelope
func (*PreparedTransaction) GetTransactionId ¶
func (x *PreparedTransaction) GetTransactionId() string
func (*PreparedTransaction) ProtoMessage ¶
func (*PreparedTransaction) ProtoMessage()
func (*PreparedTransaction) ProtoReflect ¶
func (x *PreparedTransaction) ProtoReflect() protoreflect.Message
func (*PreparedTransaction) Reset ¶
func (x *PreparedTransaction) Reset()
func (*PreparedTransaction) String ¶
func (x *PreparedTransaction) String() string
type ProposedTransaction ¶
type ProposedTransaction struct { // Identifier of the proposed transaction. TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // The signed proposal. Proposal *peer.SignedProposal `protobuf:"bytes,2,opt,name=proposal,proto3" json:"proposal,omitempty"` // The list of endorsing organizations. EndorsingOrganizations []string `` /* 127-byte string literal not displayed */ // contains filtered or unexported fields }
ProposedTransaction contains the details required for offline signing prior to evaluating or endorsing a transaction.
func (*ProposedTransaction) Descriptor
deprecated
func (*ProposedTransaction) Descriptor() ([]byte, []int)
Deprecated: Use ProposedTransaction.ProtoReflect.Descriptor instead.
func (*ProposedTransaction) GetEndorsingOrganizations ¶
func (x *ProposedTransaction) GetEndorsingOrganizations() []string
func (*ProposedTransaction) GetProposal ¶
func (x *ProposedTransaction) GetProposal() *peer.SignedProposal
func (*ProposedTransaction) GetTransactionId ¶
func (x *ProposedTransaction) GetTransactionId() string
func (*ProposedTransaction) ProtoMessage ¶
func (*ProposedTransaction) ProtoMessage()
func (*ProposedTransaction) ProtoReflect ¶
func (x *ProposedTransaction) ProtoReflect() protoreflect.Message
func (*ProposedTransaction) Reset ¶
func (x *ProposedTransaction) Reset()
func (*ProposedTransaction) String ¶
func (x *ProposedTransaction) String() string
type SignedChaincodeEventsRequest ¶
type SignedChaincodeEventsRequest struct { // Serialized ChaincodeEventsRequest message. Request []byte `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // Signature for request message. Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
SignedChaincodeEventsRequest contains a serialized ChaincodeEventsRequest message, and a digital signature for the serialized request message.
func (*SignedChaincodeEventsRequest) Descriptor
deprecated
func (*SignedChaincodeEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignedChaincodeEventsRequest.ProtoReflect.Descriptor instead.
func (*SignedChaincodeEventsRequest) GetRequest ¶
func (x *SignedChaincodeEventsRequest) GetRequest() []byte
func (*SignedChaincodeEventsRequest) GetSignature ¶
func (x *SignedChaincodeEventsRequest) GetSignature() []byte
func (*SignedChaincodeEventsRequest) ProtoMessage ¶
func (*SignedChaincodeEventsRequest) ProtoMessage()
func (*SignedChaincodeEventsRequest) ProtoReflect ¶
func (x *SignedChaincodeEventsRequest) ProtoReflect() protoreflect.Message
func (*SignedChaincodeEventsRequest) Reset ¶
func (x *SignedChaincodeEventsRequest) Reset()
func (*SignedChaincodeEventsRequest) String ¶
func (x *SignedChaincodeEventsRequest) String() string
type SignedCommitStatusRequest ¶
type SignedCommitStatusRequest struct { // Serialized CommitStatusRequest message. Request []byte `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // Signature for request message. Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
SignedCommitStatusRequest contains a serialized CommitStatusRequest message, and a digital signature for the serialized request message.
func (*SignedCommitStatusRequest) Descriptor
deprecated
func (*SignedCommitStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignedCommitStatusRequest.ProtoReflect.Descriptor instead.
func (*SignedCommitStatusRequest) GetRequest ¶
func (x *SignedCommitStatusRequest) GetRequest() []byte
func (*SignedCommitStatusRequest) GetSignature ¶
func (x *SignedCommitStatusRequest) GetSignature() []byte
func (*SignedCommitStatusRequest) ProtoMessage ¶
func (*SignedCommitStatusRequest) ProtoMessage()
func (*SignedCommitStatusRequest) ProtoReflect ¶
func (x *SignedCommitStatusRequest) ProtoReflect() protoreflect.Message
func (*SignedCommitStatusRequest) Reset ¶
func (x *SignedCommitStatusRequest) Reset()
func (*SignedCommitStatusRequest) String ¶
func (x *SignedCommitStatusRequest) String() string
type SubmitRequest ¶
type SubmitRequest struct { // Identifier of the transaction to submit. TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // Identifier of the channel this request is bound for. ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // The signed set of endorsed transaction responses to submit. PreparedTransaction *common.Envelope `protobuf:"bytes,3,opt,name=prepared_transaction,json=preparedTransaction,proto3" json:"prepared_transaction,omitempty"` // contains filtered or unexported fields }
SubmitRequest contains the details required to submit a transaction (update the ledger).
func (*SubmitRequest) Descriptor
deprecated
func (*SubmitRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubmitRequest.ProtoReflect.Descriptor instead.
func (*SubmitRequest) GetChannelId ¶
func (x *SubmitRequest) GetChannelId() string
func (*SubmitRequest) GetPreparedTransaction ¶
func (x *SubmitRequest) GetPreparedTransaction() *common.Envelope
func (*SubmitRequest) GetTransactionId ¶
func (x *SubmitRequest) GetTransactionId() string
func (*SubmitRequest) ProtoMessage ¶
func (*SubmitRequest) ProtoMessage()
func (*SubmitRequest) ProtoReflect ¶
func (x *SubmitRequest) ProtoReflect() protoreflect.Message
func (*SubmitRequest) Reset ¶
func (x *SubmitRequest) Reset()
func (*SubmitRequest) String ¶
func (x *SubmitRequest) String() string
type SubmitResponse ¶
type SubmitResponse struct {
// contains filtered or unexported fields
}
SubmitResponse returns the result of submitting a transaction.
func (*SubmitResponse) Descriptor
deprecated
func (*SubmitResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubmitResponse.ProtoReflect.Descriptor instead.
func (*SubmitResponse) ProtoMessage ¶
func (*SubmitResponse) ProtoMessage()
func (*SubmitResponse) ProtoReflect ¶
func (x *SubmitResponse) ProtoReflect() protoreflect.Message
func (*SubmitResponse) Reset ¶
func (x *SubmitResponse) Reset()
func (*SubmitResponse) String ¶
func (x *SubmitResponse) String() string
type UnimplementedGatewayServer ¶
type UnimplementedGatewayServer struct { }
UnimplementedGatewayServer should be embedded to have forward compatible implementations.
func (UnimplementedGatewayServer) ChaincodeEvents ¶
func (UnimplementedGatewayServer) ChaincodeEvents(*SignedChaincodeEventsRequest, Gateway_ChaincodeEventsServer) error
func (UnimplementedGatewayServer) CommitStatus ¶
func (UnimplementedGatewayServer) CommitStatus(context.Context, *SignedCommitStatusRequest) (*CommitStatusResponse, error)
func (UnimplementedGatewayServer) Endorse ¶
func (UnimplementedGatewayServer) Endorse(context.Context, *EndorseRequest) (*EndorseResponse, error)
func (UnimplementedGatewayServer) Evaluate ¶
func (UnimplementedGatewayServer) Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error)
func (UnimplementedGatewayServer) Submit ¶
func (UnimplementedGatewayServer) Submit(context.Context, *SubmitRequest) (*SubmitResponse, error)
type UnsafeGatewayServer ¶
type UnsafeGatewayServer interface {
// contains filtered or unexported methods
}
UnsafeGatewayServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GatewayServer will result in compilation errors.