Documentation ¶
Index ¶
- Variables
- func RegisterGatewayServer(s *grpc.Server, 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() *porderer.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() []*ppeer.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() ppeer.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() *ppeer.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() *pcommon.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() *ppeer.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() *pcommon.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() *ppeer.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() *pcommon.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)
Constants ¶
This section is empty.
Variables ¶
var File_gateway_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGatewayServer ¶
func RegisterGatewayServer(s *grpc.Server, srv GatewayServer)
Types ¶
type ChaincodeEventsRequest ¶
type ChaincodeEventsRequest struct { // ChannelId 此请求所属通道的标识符。 ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // ChaincodeId 要查询的事件所属的链码的标识符。 ChaincodeId string `protobuf:"bytes,2,opt,name=chaincode_id,json=chaincodeId,proto3" json:"chaincode_id,omitempty"` // Identity 表示客户都安的身份。 Identity []byte `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // StartPosition 在分类账中开始读取事件的位置。 StartPosition *porderer.SeekPosition `protobuf:"bytes,4,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"` // AfterTransactionId 仅返回此事务 ID 之后的事件。应该忽略包括此在内的事务。这用于允许从 StartPosition // 指定的开始块中的某个位置恢复事件侦听。 AfterTransactionId string `protobuf:"bytes,5,opt,name=after_transaction_id,json=afterTransactionId,proto3" json:"after_transaction_id,omitempty"` // contains filtered or unexported fields }
ChaincodeEventsRequest 包含调用者想要接收的链码时间的详细信息。
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() *porderer.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 { // Events 由请求的链码发出的链码事件。事件的呈现顺序与发出事件的事务在块中出现的顺序相同。 Events []*ppeer.ChaincodeEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // BlockNumber 发出链码事件的区块编号。 BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // contains filtered or unexported fields }
ChaincodeEventsResponse 返回从特定区块发出的链码事件。
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() []*ppeer.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 { // TransactionId 想确认是否上链的交易的标识符。 TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // ChannelId 此请求消息所属的通道的标识符。 ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // Identity 发出此请求的客户端的身份信息。 Identity []byte `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // contains filtered or unexported fields }
CommitStatusRequest 结构体包含了想确认一个交易是否成功上链的请求消息。
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 { // Result 返回交易是否成功上链的结果。 Result ppeer.TxValidationCode `protobuf:"varint,1,opt,name=result,proto3,enum=ppeer.TxValidationCode" json:"result,omitempty"` // BlockNumber 返回包含指定交易的区块的区块号。 BlockNumber uint64 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` // contains filtered or unexported fields }
CommitStatusResponse 结构体返回指定交易是否上链的结果信息。
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() ppeer.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 { // TransactionId 交易标识符。 TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // ChannelId 该请求所属的通道的标识符。 ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // ProposedTransaction 已签名的待背书交易。 ProposedTransaction *ppeer.SignedProposal `protobuf:"bytes,3,opt,name=proposed_transaction,json=proposedTransaction,proto3" json:"proposed_transaction,omitempty"` // EndorsingOrganizations 如果针对特定组织的对等节点(例如用于私有数据场景), // 则应该在此处提供组织的 id 列表。 EndorsingOrganizations []string `` /* 127-byte string literal not displayed */ // contains filtered or unexported fields }
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() *ppeer.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 { // PreparedTransaction 由背书节点生成的未签名的交易响应集合,需要由客户端签名后提交给排序服务。 PreparedTransaction *pcommon.Envelope `protobuf:"bytes,1,opt,name=prepared_transaction,json=preparedTransaction,proto3" json:"prepared_transaction,omitempty"` // contains filtered or unexported fields }
func (*EndorseResponse) Descriptor
deprecated
func (*EndorseResponse) Descriptor() ([]byte, []int)
Deprecated: Use EndorseResponse.ProtoReflect.Descriptor instead.
func (*EndorseResponse) GetPreparedTransaction ¶
func (x *EndorseResponse) GetPreparedTransaction() *pcommon.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 { // Address 返回错误的背书节点或排序节点的地址。 Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // MspId 当前节点的 MSP 标识符。 MspId string `protobuf:"bytes,2,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"` // Message 节点返回的错误消息。 Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
ErrorDetail 如果 Gateway 服务中的任何函数返回一个错误,那么它将以 google.rpc.Status 消息的 格式出现。如果错误是一个或多个对远程对等点或订购节点的失败请求的结果,则此消息的 “details” 字 段将填充额外的信息。ErrorDetail 包含作为处理 Evaluate 或 Endorse 服务的结果,或作为处理 Submit 服务的结果从排序节点接收到的错误的详细信息。
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 { // TransactionId 所需查询的交易的标识符。 TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // ChannelId 此请求消息所属通道的标识符。 ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // ProposedTransaction 待查询的已签名的提案。 ProposedTransaction *ppeer.SignedProposal `protobuf:"bytes,3,opt,name=proposed_transaction,json=proposedTransaction,proto3" json:"proposed_transaction,omitempty"` // TargetOrganizations 如果针对特定组织的对等节点(例如用于私有数据场景), // 则应该在此处提供组织的 id 列表。 TargetOrganizations []string `protobuf:"bytes,4,rep,name=target_organizations,json=targetOrganizations,proto3" json:"target_organizations,omitempty"` // contains filtered or unexported fields }
EvaluateRequest 结构体包含了查询交易请求的详细信息。
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() *ppeer.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 { Result *ppeer.Response `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
EvaluateResponse 返回查询交易的结果。
func (*EvaluateResponse) Descriptor
deprecated
func (*EvaluateResponse) Descriptor() ([]byte, []int)
Deprecated: Use EvaluateResponse.ProtoReflect.Descriptor instead.
func (*EvaluateResponse) GetResult ¶
func (x *EvaluateResponse) GetResult() *ppeer.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 { // Endorse 方法将提议的交易传递给 Gateway 服务,以获得足够的背书。Gateway 将确定请求的链码的背书计划, // 并将其转发给适当的对等节点进行背书。该方法将返回一个准备好的交易,以 Envelope 消息的形式返回给客户 // 端。客户端必须在调用 Submit 服务之前对此信封的内容进行签名。 Endorse(ctx context.Context, in *EndorseRequest, opts ...grpc.CallOption) (*EndorseResponse, error) // Submit 方法将处理从 Endorse 方法返回的准备好的交易,一旦客户端对其进行签名。它将等待交易提交到排序 // 服务,但客户端必须调用 CommitStatus 方法以等待交易的提交。 Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*SubmitResponse, error) // CommitStatus 方法将指示之前通过 Submit 服务提交的准备好的交易是否已经提交。如果尚未提交,则它将等 // 待提交的发生。 CommitStatus(ctx context.Context, in *SignedCommitStatusRequest, opts ...grpc.CallOption) (*CommitStatusResponse, error) // Evaluate 方法将提议的交易传递给 Gateway,以调用交易函数并将结果返回给客户端。不会进行账本更新。Gateway // 将根据区块高度和负载选择适当的对等节点进行查询。 Evaluate(ctx context.Context, in *EvaluateRequest, opts ...grpc.CallOption) (*EvaluateResponse, error) // ChaincodeEvents 服务提供一个流式响应,每个响应包含特定区块中请求的链码发出的所有事件。流式响应按照升 // 序的区块编号排序。只有包含请求事件的区块才会返回响应,而不包含任何请求事件的区块将被跳过。 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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGatewayClient ¶
func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient
type GatewayServer ¶
type GatewayServer interface { // Endorse 方法将提议的交易传递给 Gateway 服务,以获得足够的背书。Gateway 将确定请求的链码的背书计划, // 并将其转发给适当的对等节点进行背书。该方法将返回一个准备好的交易,以 Envelope 消息的形式返回给客户 // 端。客户端必须在调用 Submit 服务之前对此信封的内容进行签名。 Endorse(context.Context, *EndorseRequest) (*EndorseResponse, error) // Submit 方法将处理从 Endorse 方法返回的准备好的交易,一旦客户端对其进行签名。它将等待交易提交到排序 // 服务,但客户端必须调用 CommitStatus 方法以等待交易的提交。 Submit(context.Context, *SubmitRequest) (*SubmitResponse, error) // CommitStatus 方法将指示之前通过 Submit 服务提交的准备好的交易是否已经提交。如果尚未提交,则它将等 // 待提交的发生。 CommitStatus(context.Context, *SignedCommitStatusRequest) (*CommitStatusResponse, error) // Evaluate 方法将提议的交易传递给 Gateway,以调用交易函数并将结果返回给客户端。不会进行账本更新。Gateway // 将根据区块高度和负载选择适当的对等节点进行查询。 Evaluate(context.Context, *EvaluateRequest) (*EvaluateResponse, error) // ChaincodeEvents 服务提供一个流式响应,每个响应包含特定区块中请求的链码发出的所有事件。流式响应按照升 // 序的区块编号排序。只有包含请求事件的区块才会返回响应,而不包含任何请求事件的区块将被跳过。 ChaincodeEvents(*SignedChaincodeEventsRequest, Gateway_ChaincodeEventsServer) error }
GatewayServer is the server API for Gateway service.
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 { // TransactionId 已准备事务的标识符。 TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // Envelope 信封内包含交易。 Envelope *pcommon.Envelope `protobuf:"bytes,2,opt,name=envelope,proto3" json:"envelope,omitempty"` // contains filtered or unexported fields }
PreparedTransaction 包含提交事务之前进行脱机签名所需的详细信息。
func (*PreparedTransaction) Descriptor
deprecated
func (*PreparedTransaction) Descriptor() ([]byte, []int)
Deprecated: Use PreparedTransaction.ProtoReflect.Descriptor instead.
func (*PreparedTransaction) GetEnvelope ¶
func (x *PreparedTransaction) GetEnvelope() *pcommon.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 { // TransactionId 提出的交易的标识符。 TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // Proposal 经过签名的提案。 Proposal *ppeer.SignedProposal `protobuf:"bytes,2,opt,name=proposal,proto3" json:"proposal,omitempty"` // EndorsingOrganizations 背书组织的列表。 EndorsingOrganizations []string `` /* 127-byte string literal not displayed */ // contains filtered or unexported fields }
ProposedTransaction 用于在进行离线签名之前,提供评估或背书事务所需的详细信息。它包含了要签名的 提案以及参与背书的组织列表。
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() *ppeer.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 { // Request 经过序列化后的 ChaincodeEventsRequest 请求消息。 Request []byte `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // Signature 关于请求的签名。 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
SignedChaincodeEventsRequest 结构体包含一个经过序列化后的 ChaincodeEventsRequest 请求消息, 以及一个关于请求的签名。
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 { // Request 序列化后的 CommitStatusRequest 消息请求。 Request []byte `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` // Signature 关于请求的签名。 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
SignedCommitStatusRequest 结构体包含一个经过序列化后的 CommitStatusRequest 消息请求, 以及一个关于请求的签名。
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 { // TransactionId 要提交的交易的标识符。 TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` // ChannelId 此请求消息所属的通道的标识符。 ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // PreparedTransaction 已经过背书签名并准备提交的交易响应集合。 PreparedTransaction *pcommon.Envelope `protobuf:"bytes,3,opt,name=prepared_transaction,json=preparedTransaction,proto3" json:"prepared_transaction,omitempty"` // contains filtered or unexported fields }
SubmitRequest 结构体包含了需要被提交的交易的信息,此行为可能会对账本进行更新。
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() *pcommon.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 { Status pcommon.Status `protobuf:"varint,1,opt,name=status,proto3,enum=pcommon.Status" json:"status,omitempty"` // contains filtered or unexported fields }
SubmitResponse 结构体包含返回交易提交后的结果。
func (*SubmitResponse) Descriptor
deprecated
func (*SubmitResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubmitResponse.ProtoReflect.Descriptor instead.
func (*SubmitResponse) GetStatus ¶
func (x *SubmitResponse) GetStatus() pcommon.Status
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 can 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)