Documentation ¶
Overview ¶
Package proto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client APIClient) error
- func RegisterAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server APIServer) error
- func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)
- func RegisterTaskExecutorAdapterServer(s grpc.ServiceRegistrar, srv TaskExecutorAdapterServer)
- type APIClient
- type APIServer
- type ErrorResponse
- type GeneralParams
- func (*GeneralParams) Descriptor() ([]byte, []int)deprecated
- func (x *GeneralParams) GetChaincode() string
- func (x *GeneralParams) GetChannel() string
- func (x *GeneralParams) GetMethodName() string
- func (x *GeneralParams) GetNonce() string
- func (x *GeneralParams) GetOptions() []*typepb.Option
- func (x *GeneralParams) GetPublicKey() string
- func (x *GeneralParams) GetRequestId() string
- func (x *GeneralParams) GetSign() string
- func (*GeneralParams) ProtoMessage()
- func (x *GeneralParams) ProtoReflect() protoreflect.Message
- func (x *GeneralParams) Reset()
- func (x *GeneralParams) String() string
- type MultiTransferBeginAdminRequest
- func (*MultiTransferBeginAdminRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MultiTransferBeginAdminRequest) GetAddress() string
- func (x *MultiTransferBeginAdminRequest) GetChannelTo() string
- func (x *MultiTransferBeginAdminRequest) GetGenerals() *GeneralParams
- func (x *MultiTransferBeginAdminRequest) GetIdTransfer() string
- func (x *MultiTransferBeginAdminRequest) GetItems() []*TransferItem
- func (x *MultiTransferBeginAdminRequest) GetOptions() []*typepb.Option
- func (*MultiTransferBeginAdminRequest) ProtoMessage()
- func (x *MultiTransferBeginAdminRequest) ProtoReflect() protoreflect.Message
- func (x *MultiTransferBeginAdminRequest) Reset()
- func (x *MultiTransferBeginAdminRequest) String() string
- type MultiTransferBeginCustomerRequest
- func (*MultiTransferBeginCustomerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MultiTransferBeginCustomerRequest) GetChannelTo() string
- func (x *MultiTransferBeginCustomerRequest) GetGenerals() *GeneralParams
- func (x *MultiTransferBeginCustomerRequest) GetIdTransfer() string
- func (x *MultiTransferBeginCustomerRequest) GetItems() []*TransferItem
- func (x *MultiTransferBeginCustomerRequest) GetOptions() []*typepb.Option
- func (*MultiTransferBeginCustomerRequest) ProtoMessage()
- func (x *MultiTransferBeginCustomerRequest) ProtoReflect() protoreflect.Message
- func (x *MultiTransferBeginCustomerRequest) Reset()
- func (x *MultiTransferBeginCustomerRequest) String() string
- type TaskExecutorAdapterClient
- type TaskExecutorAdapterServer
- type TaskExecutorRequest
- func (*TaskExecutorRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TaskExecutorRequest) GetArgs() [][]byte
- func (x *TaskExecutorRequest) GetChaincode() string
- func (x *TaskExecutorRequest) GetChannel() string
- func (x *TaskExecutorRequest) GetMethod() string
- func (*TaskExecutorRequest) ProtoMessage()
- func (x *TaskExecutorRequest) ProtoReflect() protoreflect.Message
- func (x *TaskExecutorRequest) Reset()
- func (x *TaskExecutorRequest) String() string
- type TaskExecutorResponse
- func (*TaskExecutorResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TaskExecutorResponse) GetMessage() string
- func (x *TaskExecutorResponse) GetStatus() TaskExecutorResponse_Status
- func (*TaskExecutorResponse) ProtoMessage()
- func (x *TaskExecutorResponse) ProtoReflect() protoreflect.Message
- func (x *TaskExecutorResponse) Reset()
- func (x *TaskExecutorResponse) String() string
- type TaskExecutorResponse_Status
- func (TaskExecutorResponse_Status) Descriptor() protoreflect.EnumDescriptor
- func (x TaskExecutorResponse_Status) Enum() *TaskExecutorResponse_Status
- func (TaskExecutorResponse_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x TaskExecutorResponse_Status) Number() protoreflect.EnumNumber
- func (x TaskExecutorResponse_Status) String() string
- func (TaskExecutorResponse_Status) Type() protoreflect.EnumType
- type TransferBeginAdminRequest
- func (*TransferBeginAdminRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TransferBeginAdminRequest) GetAddress() string
- func (x *TransferBeginAdminRequest) GetAmount() string
- func (x *TransferBeginAdminRequest) GetChannelTo() string
- func (x *TransferBeginAdminRequest) GetGenerals() *GeneralParams
- func (x *TransferBeginAdminRequest) GetIdTransfer() string
- func (x *TransferBeginAdminRequest) GetOptions() []*typepb.Option
- func (x *TransferBeginAdminRequest) GetToken() string
- func (*TransferBeginAdminRequest) ProtoMessage()
- func (x *TransferBeginAdminRequest) ProtoReflect() protoreflect.Message
- func (x *TransferBeginAdminRequest) Reset()
- func (x *TransferBeginAdminRequest) String() string
- type TransferBeginCustomerRequest
- func (*TransferBeginCustomerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TransferBeginCustomerRequest) GetAmount() string
- func (x *TransferBeginCustomerRequest) GetChannelTo() string
- func (x *TransferBeginCustomerRequest) GetGenerals() *GeneralParams
- func (x *TransferBeginCustomerRequest) GetIdTransfer() string
- func (x *TransferBeginCustomerRequest) GetOptions() []*typepb.Option
- func (x *TransferBeginCustomerRequest) GetToken() string
- func (*TransferBeginCustomerRequest) ProtoMessage()
- func (x *TransferBeginCustomerRequest) ProtoReflect() protoreflect.Message
- func (x *TransferBeginCustomerRequest) Reset()
- func (x *TransferBeginCustomerRequest) String() string
- type TransferItem
- func (*TransferItem) Descriptor() ([]byte, []int)deprecated
- func (x *TransferItem) GetAmount() string
- func (x *TransferItem) GetToken() string
- func (*TransferItem) ProtoMessage()
- func (x *TransferItem) ProtoReflect() protoreflect.Message
- func (x *TransferItem) Reset()
- func (x *TransferItem) String() string
- type TransferStatusRequest
- func (*TransferStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TransferStatusRequest) GetIdTransfer() string
- func (x *TransferStatusRequest) GetOptions() []*typepb.Option
- func (*TransferStatusRequest) ProtoMessage()
- func (x *TransferStatusRequest) ProtoReflect() protoreflect.Message
- func (x *TransferStatusRequest) Reset()
- func (x *TransferStatusRequest) String() string
- type TransferStatusResponse
- func (*TransferStatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TransferStatusResponse) GetIdTransfer() string
- func (x *TransferStatusResponse) GetMessage() string
- func (x *TransferStatusResponse) GetStatus() TransferStatusResponse_Status
- func (*TransferStatusResponse) ProtoMessage()
- func (x *TransferStatusResponse) ProtoReflect() protoreflect.Message
- func (x *TransferStatusResponse) Reset()
- func (x *TransferStatusResponse) String() string
- type TransferStatusResponse_Status
- func (TransferStatusResponse_Status) Descriptor() protoreflect.EnumDescriptor
- func (x TransferStatusResponse_Status) Enum() *TransferStatusResponse_Status
- func (TransferStatusResponse_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x TransferStatusResponse_Status) Number() protoreflect.EnumNumber
- func (x TransferStatusResponse_Status) String() string
- func (TransferStatusResponse_Status) Type() protoreflect.EnumType
- type UnimplementedAPIServer
- func (UnimplementedAPIServer) MultiTransferByAdmin(context.Context, *MultiTransferBeginAdminRequest) (*TransferStatusResponse, error)
- func (UnimplementedAPIServer) MultiTransferByCustomer(context.Context, *MultiTransferBeginCustomerRequest) (*TransferStatusResponse, error)
- func (UnimplementedAPIServer) TransferByAdmin(context.Context, *TransferBeginAdminRequest) (*TransferStatusResponse, error)
- func (UnimplementedAPIServer) TransferByCustomer(context.Context, *TransferBeginCustomerRequest) (*TransferStatusResponse, error)
- func (UnimplementedAPIServer) TransferStatus(context.Context, *TransferStatusRequest) (*TransferStatusResponse, error)
- type UnimplementedTaskExecutorAdapterServer
- type UnsafeAPIServer
- type UnsafeTaskExecutorAdapterServer
Constants ¶
const ( API_TransferByCustomer_FullMethodName = "/core.channel_transfer.API/TransferByCustomer" API_TransferByAdmin_FullMethodName = "/core.channel_transfer.API/TransferByAdmin" API_MultiTransferByCustomer_FullMethodName = "/core.channel_transfer.API/MultiTransferByCustomer" API_MultiTransferByAdmin_FullMethodName = "/core.channel_transfer.API/MultiTransferByAdmin" API_TransferStatus_FullMethodName = "/core.channel_transfer.API/TransferStatus" )
const (
TaskExecutorAdapter_SubmitTransaction_FullMethodName = "/core.task_executor.TaskExecutorAdapter/SubmitTransaction"
)
Variables ¶
var ( TransferStatusResponse_Status_name = map[int32]string{ 0: "STATUS_IN_PROCESS", 1: "STATUS_UNDEFINED", 2: "STATUS_COMPLETED", 3: "STATUS_CANCELED", 4: "STATUS_ERROR", } TransferStatusResponse_Status_value = map[string]int32{ "STATUS_IN_PROCESS": 0, "STATUS_UNDEFINED": 1, "STATUS_COMPLETED": 2, "STATUS_CANCELED": 3, "STATUS_ERROR": 4, } )
Enum value maps for TransferStatusResponse_Status.
var ( TaskExecutorResponse_Status_name = map[int32]string{ 0: "STATUS_UNKNOWN", 1: "STATUS_ACCEPTED", 2: "STATUS_REJECTED", } TaskExecutorResponse_Status_value = map[string]int32{ "STATUS_UNKNOWN": 0, "STATUS_ACCEPTED": 1, "STATUS_REJECTED": 2, } )
Enum value maps for TaskExecutorResponse_Status.
var API_ServiceDesc = grpc.ServiceDesc{ ServiceName: "core.channel_transfer.API", HandlerType: (*APIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TransferByCustomer", Handler: _API_TransferByCustomer_Handler, }, { MethodName: "TransferByAdmin", Handler: _API_TransferByAdmin_Handler, }, { MethodName: "MultiTransferByCustomer", Handler: _API_MultiTransferByCustomer_Handler, }, { MethodName: "MultiTransferByAdmin", Handler: _API_MultiTransferByAdmin_Handler, }, { MethodName: "TransferStatus", Handler: _API_TransferStatus_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service.proto", }
API_ServiceDesc is the grpc.ServiceDesc for API service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_service_proto protoreflect.FileDescriptor
var File_task_executor_proto protoreflect.FileDescriptor
var SwaggerJSON []byte
var TaskExecutorAdapter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "core.task_executor.TaskExecutorAdapter", HandlerType: (*TaskExecutorAdapterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SubmitTransaction", Handler: _TaskExecutorAdapter_SubmitTransaction_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "task_executor.proto", }
TaskExecutorAdapter_ServiceDesc is the grpc.ServiceDesc for TaskExecutorAdapter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAPIHandler ¶
RegisterAPIHandler registers the http handlers for service API to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAPIHandlerClient ¶
RegisterAPIHandlerClient registers the http handlers for service API to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "APIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "APIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "APIClient" to call the correct interceptors.
func RegisterAPIHandlerFromEndpoint ¶
func RegisterAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAPIHandlerFromEndpoint is same as RegisterAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAPIHandlerServer ¶
RegisterAPIHandlerServer registers the http handlers for service API to "mux". UnaryRPC :call APIServer 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 RegisterAPIHandlerFromEndpoint instead.
func RegisterAPIServer ¶
func RegisterAPIServer(s grpc.ServiceRegistrar, srv APIServer)
func RegisterTaskExecutorAdapterServer ¶ added in v0.0.6
func RegisterTaskExecutorAdapterServer(s grpc.ServiceRegistrar, srv TaskExecutorAdapterServer)
Types ¶
type APIClient ¶
type APIClient interface { TransferByCustomer(ctx context.Context, in *TransferBeginCustomerRequest, opts ...grpc.CallOption) (*TransferStatusResponse, error) TransferByAdmin(ctx context.Context, in *TransferBeginAdminRequest, opts ...grpc.CallOption) (*TransferStatusResponse, error) MultiTransferByCustomer(ctx context.Context, in *MultiTransferBeginCustomerRequest, opts ...grpc.CallOption) (*TransferStatusResponse, error) MultiTransferByAdmin(ctx context.Context, in *MultiTransferBeginAdminRequest, opts ...grpc.CallOption) (*TransferStatusResponse, error) TransferStatus(ctx context.Context, in *TransferStatusRequest, opts ...grpc.CallOption) (*TransferStatusResponse, error) }
APIClient is the client API for API 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 NewAPIClient ¶
func NewAPIClient(cc grpc.ClientConnInterface) APIClient
type APIServer ¶
type APIServer interface { TransferByCustomer(context.Context, *TransferBeginCustomerRequest) (*TransferStatusResponse, error) TransferByAdmin(context.Context, *TransferBeginAdminRequest) (*TransferStatusResponse, error) MultiTransferByCustomer(context.Context, *MultiTransferBeginCustomerRequest) (*TransferStatusResponse, error) MultiTransferByAdmin(context.Context, *MultiTransferBeginAdminRequest) (*TransferStatusResponse, error) TransferStatus(context.Context, *TransferStatusRequest) (*TransferStatusResponse, error) // contains filtered or unexported methods }
APIServer is the server API for API service. All implementations must embed UnimplementedAPIServer for forward compatibility.
type ErrorResponse ¶
type ErrorResponse struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // error message // contains filtered or unexported fields }
ErrorResponse response with an error
func (*ErrorResponse) Descriptor
deprecated
func (*ErrorResponse) Descriptor() ([]byte, []int)
Deprecated: Use ErrorResponse.ProtoReflect.Descriptor instead.
func (*ErrorResponse) GetError ¶
func (x *ErrorResponse) GetError() string
func (*ErrorResponse) ProtoMessage ¶
func (*ErrorResponse) ProtoMessage()
func (*ErrorResponse) ProtoReflect ¶
func (x *ErrorResponse) ProtoReflect() protoreflect.Message
func (*ErrorResponse) Reset ¶
func (x *ErrorResponse) Reset()
func (*ErrorResponse) String ¶
func (x *ErrorResponse) String() string
type GeneralParams ¶
type GeneralParams struct { MethodName string `protobuf:"bytes,1,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` // method name RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` // request ID (may be empty) Chaincode string `protobuf:"bytes,3,opt,name=chaincode,proto3" json:"chaincode,omitempty"` // chaincode name Channel string `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel,omitempty"` // channel name Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` // request nonce PublicKey string `protobuf:"bytes,6,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // public key of user, signed the request Sign string `protobuf:"bytes,7,opt,name=sign,proto3" json:"sign,omitempty"` // request sign Options []*typepb.Option `protobuf:"bytes,8,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
GeneralParams general parameters for every request
func (*GeneralParams) Descriptor
deprecated
func (*GeneralParams) Descriptor() ([]byte, []int)
Deprecated: Use GeneralParams.ProtoReflect.Descriptor instead.
func (*GeneralParams) GetChaincode ¶
func (x *GeneralParams) GetChaincode() string
func (*GeneralParams) GetChannel ¶
func (x *GeneralParams) GetChannel() string
func (*GeneralParams) GetMethodName ¶
func (x *GeneralParams) GetMethodName() string
func (*GeneralParams) GetNonce ¶
func (x *GeneralParams) GetNonce() string
func (*GeneralParams) GetOptions ¶
func (x *GeneralParams) GetOptions() []*typepb.Option
func (*GeneralParams) GetPublicKey ¶
func (x *GeneralParams) GetPublicKey() string
func (*GeneralParams) GetRequestId ¶
func (x *GeneralParams) GetRequestId() string
func (*GeneralParams) GetSign ¶
func (x *GeneralParams) GetSign() string
func (*GeneralParams) ProtoMessage ¶
func (*GeneralParams) ProtoMessage()
func (*GeneralParams) ProtoReflect ¶
func (x *GeneralParams) ProtoReflect() protoreflect.Message
func (*GeneralParams) Reset ¶
func (x *GeneralParams) Reset()
func (*GeneralParams) String ¶
func (x *GeneralParams) String() string
type MultiTransferBeginAdminRequest ¶ added in v0.0.5
type MultiTransferBeginAdminRequest struct { Generals *GeneralParams `protobuf:"bytes,1,opt,name=generals,proto3" json:"generals,omitempty"` // general parameters IdTransfer string `protobuf:"bytes,2,opt,name=id_transfer,json=idTransfer,proto3" json:"id_transfer,omitempty"` // transfer ID (should be unique) ChannelTo string `protobuf:"bytes,3,opt,name=channel_to,json=channelTo,proto3" json:"channel_to,omitempty"` // destination channel Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` // token's owner address Items []*TransferItem `protobuf:"bytes,5,rep,name=items,proto3" json:"items,omitempty"` // items to transfer Options []*typepb.Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
MultiTransferBeginAdminRequest request for tokens transfer by platform administrator
func (*MultiTransferBeginAdminRequest) Descriptor
deprecated
added in
v0.0.5
func (*MultiTransferBeginAdminRequest) Descriptor() ([]byte, []int)
Deprecated: Use MultiTransferBeginAdminRequest.ProtoReflect.Descriptor instead.
func (*MultiTransferBeginAdminRequest) GetAddress ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) GetAddress() string
func (*MultiTransferBeginAdminRequest) GetChannelTo ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) GetChannelTo() string
func (*MultiTransferBeginAdminRequest) GetGenerals ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) GetGenerals() *GeneralParams
func (*MultiTransferBeginAdminRequest) GetIdTransfer ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) GetIdTransfer() string
func (*MultiTransferBeginAdminRequest) GetItems ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) GetItems() []*TransferItem
func (*MultiTransferBeginAdminRequest) GetOptions ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) GetOptions() []*typepb.Option
func (*MultiTransferBeginAdminRequest) ProtoMessage ¶ added in v0.0.5
func (*MultiTransferBeginAdminRequest) ProtoMessage()
func (*MultiTransferBeginAdminRequest) ProtoReflect ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) ProtoReflect() protoreflect.Message
func (*MultiTransferBeginAdminRequest) Reset ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) Reset()
func (*MultiTransferBeginAdminRequest) String ¶ added in v0.0.5
func (x *MultiTransferBeginAdminRequest) String() string
type MultiTransferBeginCustomerRequest ¶ added in v0.0.5
type MultiTransferBeginCustomerRequest struct { Generals *GeneralParams `protobuf:"bytes,1,opt,name=generals,proto3" json:"generals,omitempty"` // general parameters IdTransfer string `protobuf:"bytes,2,opt,name=id_transfer,json=idTransfer,proto3" json:"id_transfer,omitempty"` // transfer ID (should be unique) ChannelTo string `protobuf:"bytes,3,opt,name=channel_to,json=channelTo,proto3" json:"channel_to,omitempty"` // destination channel Items []*TransferItem `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` // items to transfer Options []*typepb.Option `protobuf:"bytes,5,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
MultiTransferBeginAdminRequest request for tokens transfer by tokens owner
func (*MultiTransferBeginCustomerRequest) Descriptor
deprecated
added in
v0.0.5
func (*MultiTransferBeginCustomerRequest) Descriptor() ([]byte, []int)
Deprecated: Use MultiTransferBeginCustomerRequest.ProtoReflect.Descriptor instead.
func (*MultiTransferBeginCustomerRequest) GetChannelTo ¶ added in v0.0.5
func (x *MultiTransferBeginCustomerRequest) GetChannelTo() string
func (*MultiTransferBeginCustomerRequest) GetGenerals ¶ added in v0.0.5
func (x *MultiTransferBeginCustomerRequest) GetGenerals() *GeneralParams
func (*MultiTransferBeginCustomerRequest) GetIdTransfer ¶ added in v0.0.5
func (x *MultiTransferBeginCustomerRequest) GetIdTransfer() string
func (*MultiTransferBeginCustomerRequest) GetItems ¶ added in v0.0.5
func (x *MultiTransferBeginCustomerRequest) GetItems() []*TransferItem
func (*MultiTransferBeginCustomerRequest) GetOptions ¶ added in v0.0.5
func (x *MultiTransferBeginCustomerRequest) GetOptions() []*typepb.Option
func (*MultiTransferBeginCustomerRequest) ProtoMessage ¶ added in v0.0.5
func (*MultiTransferBeginCustomerRequest) ProtoMessage()
func (*MultiTransferBeginCustomerRequest) ProtoReflect ¶ added in v0.0.5
func (x *MultiTransferBeginCustomerRequest) ProtoReflect() protoreflect.Message
func (*MultiTransferBeginCustomerRequest) Reset ¶ added in v0.0.5
func (x *MultiTransferBeginCustomerRequest) Reset()
func (*MultiTransferBeginCustomerRequest) String ¶ added in v0.0.5
func (x *MultiTransferBeginCustomerRequest) String() string
type TaskExecutorAdapterClient ¶ added in v0.0.6
type TaskExecutorAdapterClient interface {
SubmitTransaction(ctx context.Context, in *TaskExecutorRequest, opts ...grpc.CallOption) (*TaskExecutorResponse, error)
}
TaskExecutorAdapterClient is the client API for TaskExecutorAdapter 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.
gRPC service for interaction between Channel Transfer and HLF Batcher
func NewTaskExecutorAdapterClient ¶ added in v0.0.6
func NewTaskExecutorAdapterClient(cc grpc.ClientConnInterface) TaskExecutorAdapterClient
type TaskExecutorAdapterServer ¶ added in v0.0.6
type TaskExecutorAdapterServer interface { SubmitTransaction(context.Context, *TaskExecutorRequest) (*TaskExecutorResponse, error) // contains filtered or unexported methods }
TaskExecutorAdapterServer is the server API for TaskExecutorAdapter service. All implementations must embed UnimplementedTaskExecutorAdapterServer for forward compatibility.
gRPC service for interaction between Channel Transfer and HLF Batcher
type TaskExecutorRequest ¶ added in v0.0.6
type TaskExecutorRequest struct { Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` // Channel identifier (mandatory) Chaincode string `protobuf:"bytes,2,opt,name=chaincode,proto3" json:"chaincode,omitempty"` // Chaincode identifier (mandatory) Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` // Method, the chaincode function to invoke (mandatory) Args [][]byte `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"` // Arguments for the chaincode function (mandatory) // contains filtered or unexported fields }
Simplified request for gRPC Task Executor service
func (*TaskExecutorRequest) Descriptor
deprecated
added in
v0.0.6
func (*TaskExecutorRequest) Descriptor() ([]byte, []int)
Deprecated: Use TaskExecutorRequest.ProtoReflect.Descriptor instead.
func (*TaskExecutorRequest) GetArgs ¶ added in v0.0.6
func (x *TaskExecutorRequest) GetArgs() [][]byte
func (*TaskExecutorRequest) GetChaincode ¶ added in v0.0.6
func (x *TaskExecutorRequest) GetChaincode() string
func (*TaskExecutorRequest) GetChannel ¶ added in v0.0.6
func (x *TaskExecutorRequest) GetChannel() string
func (*TaskExecutorRequest) GetMethod ¶ added in v0.0.6
func (x *TaskExecutorRequest) GetMethod() string
func (*TaskExecutorRequest) ProtoMessage ¶ added in v0.0.6
func (*TaskExecutorRequest) ProtoMessage()
func (*TaskExecutorRequest) ProtoReflect ¶ added in v0.0.6
func (x *TaskExecutorRequest) ProtoReflect() protoreflect.Message
func (*TaskExecutorRequest) Reset ¶ added in v0.0.6
func (x *TaskExecutorRequest) Reset()
func (*TaskExecutorRequest) String ¶ added in v0.0.6
func (x *TaskExecutorRequest) String() string
type TaskExecutorResponse ¶ added in v0.0.6
type TaskExecutorResponse struct { Status TaskExecutorResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=core.task_executor.TaskExecutorResponse_Status" json:"status,omitempty"` // Status of the request ("accepted" or "rejected") Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // Confirmation or error message (optional) // contains filtered or unexported fields }
Response from Task Executor to Channel Transfer
func (*TaskExecutorResponse) Descriptor
deprecated
added in
v0.0.6
func (*TaskExecutorResponse) Descriptor() ([]byte, []int)
Deprecated: Use TaskExecutorResponse.ProtoReflect.Descriptor instead.
func (*TaskExecutorResponse) GetMessage ¶ added in v0.0.6
func (x *TaskExecutorResponse) GetMessage() string
func (*TaskExecutorResponse) GetStatus ¶ added in v0.0.6
func (x *TaskExecutorResponse) GetStatus() TaskExecutorResponse_Status
func (*TaskExecutorResponse) ProtoMessage ¶ added in v0.0.6
func (*TaskExecutorResponse) ProtoMessage()
func (*TaskExecutorResponse) ProtoReflect ¶ added in v0.0.6
func (x *TaskExecutorResponse) ProtoReflect() protoreflect.Message
func (*TaskExecutorResponse) Reset ¶ added in v0.0.6
func (x *TaskExecutorResponse) Reset()
func (*TaskExecutorResponse) String ¶ added in v0.0.6
func (x *TaskExecutorResponse) String() string
type TaskExecutorResponse_Status ¶ added in v0.0.6
type TaskExecutorResponse_Status int32
Enumeration for response status
const ( TaskExecutorResponse_STATUS_UNKNOWN TaskExecutorResponse_Status = 0 // Default, unspecified status TaskExecutorResponse_STATUS_ACCEPTED TaskExecutorResponse_Status = 1 // Request accepted for processing TaskExecutorResponse_STATUS_REJECTED TaskExecutorResponse_Status = 2 // Request rejected )
func (TaskExecutorResponse_Status) Descriptor ¶ added in v0.0.6
func (TaskExecutorResponse_Status) Descriptor() protoreflect.EnumDescriptor
func (TaskExecutorResponse_Status) Enum ¶ added in v0.0.6
func (x TaskExecutorResponse_Status) Enum() *TaskExecutorResponse_Status
func (TaskExecutorResponse_Status) EnumDescriptor
deprecated
added in
v0.0.6
func (TaskExecutorResponse_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use TaskExecutorResponse_Status.Descriptor instead.
func (TaskExecutorResponse_Status) Number ¶ added in v0.0.6
func (x TaskExecutorResponse_Status) Number() protoreflect.EnumNumber
func (TaskExecutorResponse_Status) String ¶ added in v0.0.6
func (x TaskExecutorResponse_Status) String() string
func (TaskExecutorResponse_Status) Type ¶ added in v0.0.6
func (TaskExecutorResponse_Status) Type() protoreflect.EnumType
type TransferBeginAdminRequest ¶
type TransferBeginAdminRequest struct { Generals *GeneralParams `protobuf:"bytes,1,opt,name=generals,proto3" json:"generals,omitempty"` // general parameters IdTransfer string `protobuf:"bytes,2,opt,name=id_transfer,json=idTransfer,proto3" json:"id_transfer,omitempty"` // transfer ID (should be unique) ChannelTo string `protobuf:"bytes,3,opt,name=channel_to,json=channelTo,proto3" json:"channel_to,omitempty"` // destination channel Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` // token's owner address Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` // tokens to transfer Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` // amount of tokens to transfer Options []*typepb.Option `protobuf:"bytes,7,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
TransferBeginAdminRequest request for tokens transfer by platform administrator
func (*TransferBeginAdminRequest) Descriptor
deprecated
func (*TransferBeginAdminRequest) Descriptor() ([]byte, []int)
Deprecated: Use TransferBeginAdminRequest.ProtoReflect.Descriptor instead.
func (*TransferBeginAdminRequest) GetAddress ¶
func (x *TransferBeginAdminRequest) GetAddress() string
func (*TransferBeginAdminRequest) GetAmount ¶
func (x *TransferBeginAdminRequest) GetAmount() string
func (*TransferBeginAdminRequest) GetChannelTo ¶
func (x *TransferBeginAdminRequest) GetChannelTo() string
func (*TransferBeginAdminRequest) GetGenerals ¶
func (x *TransferBeginAdminRequest) GetGenerals() *GeneralParams
func (*TransferBeginAdminRequest) GetIdTransfer ¶
func (x *TransferBeginAdminRequest) GetIdTransfer() string
func (*TransferBeginAdminRequest) GetOptions ¶
func (x *TransferBeginAdminRequest) GetOptions() []*typepb.Option
func (*TransferBeginAdminRequest) GetToken ¶
func (x *TransferBeginAdminRequest) GetToken() string
func (*TransferBeginAdminRequest) ProtoMessage ¶
func (*TransferBeginAdminRequest) ProtoMessage()
func (*TransferBeginAdminRequest) ProtoReflect ¶
func (x *TransferBeginAdminRequest) ProtoReflect() protoreflect.Message
func (*TransferBeginAdminRequest) Reset ¶
func (x *TransferBeginAdminRequest) Reset()
func (*TransferBeginAdminRequest) String ¶
func (x *TransferBeginAdminRequest) String() string
type TransferBeginCustomerRequest ¶
type TransferBeginCustomerRequest struct { Generals *GeneralParams `protobuf:"bytes,1,opt,name=generals,proto3" json:"generals,omitempty"` // general parameters IdTransfer string `protobuf:"bytes,2,opt,name=id_transfer,json=idTransfer,proto3" json:"id_transfer,omitempty"` // transfer ID (should be unique) ChannelTo string `protobuf:"bytes,3,opt,name=channel_to,json=channelTo,proto3" json:"channel_to,omitempty"` // destination channel Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // Tokens to transfer Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` // Amount of tokens to transfer Options []*typepb.Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
TransferBeginCustomerRequest request for tokens transfer by tokens owner
func (*TransferBeginCustomerRequest) Descriptor
deprecated
func (*TransferBeginCustomerRequest) Descriptor() ([]byte, []int)
Deprecated: Use TransferBeginCustomerRequest.ProtoReflect.Descriptor instead.
func (*TransferBeginCustomerRequest) GetAmount ¶
func (x *TransferBeginCustomerRequest) GetAmount() string
func (*TransferBeginCustomerRequest) GetChannelTo ¶
func (x *TransferBeginCustomerRequest) GetChannelTo() string
func (*TransferBeginCustomerRequest) GetGenerals ¶
func (x *TransferBeginCustomerRequest) GetGenerals() *GeneralParams
func (*TransferBeginCustomerRequest) GetIdTransfer ¶
func (x *TransferBeginCustomerRequest) GetIdTransfer() string
func (*TransferBeginCustomerRequest) GetOptions ¶
func (x *TransferBeginCustomerRequest) GetOptions() []*typepb.Option
func (*TransferBeginCustomerRequest) GetToken ¶
func (x *TransferBeginCustomerRequest) GetToken() string
func (*TransferBeginCustomerRequest) ProtoMessage ¶
func (*TransferBeginCustomerRequest) ProtoMessage()
func (*TransferBeginCustomerRequest) ProtoReflect ¶
func (x *TransferBeginCustomerRequest) ProtoReflect() protoreflect.Message
func (*TransferBeginCustomerRequest) Reset ¶
func (x *TransferBeginCustomerRequest) Reset()
func (*TransferBeginCustomerRequest) String ¶
func (x *TransferBeginCustomerRequest) String() string
type TransferItem ¶ added in v0.0.5
type TransferItem struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // Token to transfer Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` // Amount of token to transfer // contains filtered or unexported fields }
TransferItem item parameters for MultiTransferBeginCustomerRequest and MultiTransferBeginAdminRequest
func (*TransferItem) Descriptor
deprecated
added in
v0.0.5
func (*TransferItem) Descriptor() ([]byte, []int)
Deprecated: Use TransferItem.ProtoReflect.Descriptor instead.
func (*TransferItem) GetAmount ¶ added in v0.0.5
func (x *TransferItem) GetAmount() string
func (*TransferItem) GetToken ¶ added in v0.0.5
func (x *TransferItem) GetToken() string
func (*TransferItem) ProtoMessage ¶ added in v0.0.5
func (*TransferItem) ProtoMessage()
func (*TransferItem) ProtoReflect ¶ added in v0.0.5
func (x *TransferItem) ProtoReflect() protoreflect.Message
func (*TransferItem) Reset ¶ added in v0.0.5
func (x *TransferItem) Reset()
func (*TransferItem) String ¶ added in v0.0.5
func (x *TransferItem) String() string
type TransferStatusRequest ¶
type TransferStatusRequest struct { IdTransfer string `protobuf:"bytes,1,opt,name=id_transfer,json=idTransfer,proto3" json:"id_transfer,omitempty"` // transfer ID Options []*typepb.Option `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
TransferStatusRequest request for transfer status
func (*TransferStatusRequest) Descriptor
deprecated
func (*TransferStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use TransferStatusRequest.ProtoReflect.Descriptor instead.
func (*TransferStatusRequest) GetIdTransfer ¶
func (x *TransferStatusRequest) GetIdTransfer() string
func (*TransferStatusRequest) GetOptions ¶
func (x *TransferStatusRequest) GetOptions() []*typepb.Option
func (*TransferStatusRequest) ProtoMessage ¶
func (*TransferStatusRequest) ProtoMessage()
func (*TransferStatusRequest) ProtoReflect ¶
func (x *TransferStatusRequest) ProtoReflect() protoreflect.Message
func (*TransferStatusRequest) Reset ¶
func (x *TransferStatusRequest) Reset()
func (*TransferStatusRequest) String ¶
func (x *TransferStatusRequest) String() string
type TransferStatusResponse ¶
type TransferStatusResponse struct { IdTransfer string `protobuf:"bytes,1,opt,name=id_transfer,json=idTransfer,proto3" json:"id_transfer,omitempty"` // transfer ID Status TransferStatusResponse_Status `protobuf:"varint,2,opt,name=status,proto3,enum=core.channel_transfer.TransferStatusResponse_Status" json:"status,omitempty"` // transfer status Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // error message (may be empty) // contains filtered or unexported fields }
TransferStatusResponse response for TransferStatus transaction
func (*TransferStatusResponse) Descriptor
deprecated
func (*TransferStatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use TransferStatusResponse.ProtoReflect.Descriptor instead.
func (*TransferStatusResponse) GetIdTransfer ¶
func (x *TransferStatusResponse) GetIdTransfer() string
func (*TransferStatusResponse) GetMessage ¶
func (x *TransferStatusResponse) GetMessage() string
func (*TransferStatusResponse) GetStatus ¶
func (x *TransferStatusResponse) GetStatus() TransferStatusResponse_Status
func (*TransferStatusResponse) ProtoMessage ¶
func (*TransferStatusResponse) ProtoMessage()
func (*TransferStatusResponse) ProtoReflect ¶
func (x *TransferStatusResponse) ProtoReflect() protoreflect.Message
func (*TransferStatusResponse) Reset ¶
func (x *TransferStatusResponse) Reset()
func (*TransferStatusResponse) String ¶
func (x *TransferStatusResponse) String() string
type TransferStatusResponse_Status ¶
type TransferStatusResponse_Status int32
const ( TransferStatusResponse_STATUS_IN_PROCESS TransferStatusResponse_Status = 0 TransferStatusResponse_STATUS_UNDEFINED TransferStatusResponse_Status = 1 TransferStatusResponse_STATUS_COMPLETED TransferStatusResponse_Status = 2 TransferStatusResponse_STATUS_CANCELED TransferStatusResponse_Status = 3 TransferStatusResponse_STATUS_ERROR TransferStatusResponse_Status = 4 )
func (TransferStatusResponse_Status) Descriptor ¶
func (TransferStatusResponse_Status) Descriptor() protoreflect.EnumDescriptor
func (TransferStatusResponse_Status) Enum ¶
func (x TransferStatusResponse_Status) Enum() *TransferStatusResponse_Status
func (TransferStatusResponse_Status) EnumDescriptor
deprecated
func (TransferStatusResponse_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use TransferStatusResponse_Status.Descriptor instead.
func (TransferStatusResponse_Status) Number ¶
func (x TransferStatusResponse_Status) Number() protoreflect.EnumNumber
func (TransferStatusResponse_Status) String ¶
func (x TransferStatusResponse_Status) String() string
func (TransferStatusResponse_Status) Type ¶
func (TransferStatusResponse_Status) Type() protoreflect.EnumType
type UnimplementedAPIServer ¶
type UnimplementedAPIServer struct{}
UnimplementedAPIServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAPIServer) MultiTransferByAdmin ¶ added in v0.0.5
func (UnimplementedAPIServer) MultiTransferByAdmin(context.Context, *MultiTransferBeginAdminRequest) (*TransferStatusResponse, error)
func (UnimplementedAPIServer) MultiTransferByCustomer ¶ added in v0.0.5
func (UnimplementedAPIServer) MultiTransferByCustomer(context.Context, *MultiTransferBeginCustomerRequest) (*TransferStatusResponse, error)
func (UnimplementedAPIServer) TransferByAdmin ¶
func (UnimplementedAPIServer) TransferByAdmin(context.Context, *TransferBeginAdminRequest) (*TransferStatusResponse, error)
func (UnimplementedAPIServer) TransferByCustomer ¶
func (UnimplementedAPIServer) TransferByCustomer(context.Context, *TransferBeginCustomerRequest) (*TransferStatusResponse, error)
func (UnimplementedAPIServer) TransferStatus ¶
func (UnimplementedAPIServer) TransferStatus(context.Context, *TransferStatusRequest) (*TransferStatusResponse, error)
type UnimplementedTaskExecutorAdapterServer ¶ added in v0.0.6
type UnimplementedTaskExecutorAdapterServer struct{}
UnimplementedTaskExecutorAdapterServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedTaskExecutorAdapterServer) SubmitTransaction ¶ added in v0.0.6
func (UnimplementedTaskExecutorAdapterServer) SubmitTransaction(context.Context, *TaskExecutorRequest) (*TaskExecutorResponse, error)
type UnsafeAPIServer ¶
type UnsafeAPIServer interface {
// contains filtered or unexported methods
}
UnsafeAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APIServer will result in compilation errors.
type UnsafeTaskExecutorAdapterServer ¶ added in v0.0.6
type UnsafeTaskExecutorAdapterServer interface {
// contains filtered or unexported methods
}
UnsafeTaskExecutorAdapterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TaskExecutorAdapterServer will result in compilation errors.