Documentation ¶
Overview ¶
Package gateway is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func BlockRange(from, to *BlockLimit) []int64
- func ContextWithDefaultSigner(ctx context.Context, defaultSigner msp.SigningIdentity) context.Context
- func ContextWithSigner(ctx context.Context, signer msp.SigningIdentity) context.Context
- func ContextWithTransientMap(ctx context.Context, transient map[string][]byte) context.Context
- func ContextWithTransientValue(ctx context.Context, key string, value []byte) context.Context
- func ContextWithTxWaiter(ctx context.Context, txWaiterType string) context.Context
- func MatchEventName(eventName string, expectedNames []string) bool
- func RegisterChaincodeEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterChaincodeEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterChaincodeEventsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterChaincodeEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterChaincodeEventsServiceServer(s *grpc.Server, srv ChaincodeEventsServiceServer)
- func RegisterChaincodeInstanceEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterChaincodeInstanceEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterChaincodeInstanceEventsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterChaincodeInstanceEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterChaincodeInstanceEventsServiceServer(s *grpc.Server, srv ChaincodeInstanceEventsServiceServer)
- func RegisterChaincodeInstanceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterChaincodeInstanceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterChaincodeInstanceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterChaincodeInstanceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterChaincodeInstanceServiceServer(s *grpc.Server, srv ChaincodeInstanceServiceServer)
- func RegisterChaincodeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterChaincodeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChaincodeServiceClient) error
- func RegisterChaincodeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterChaincodeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChaincodeServiceServer) error
- func RegisterChaincodeServiceServer(s *grpc.Server, srv ChaincodeServiceServer)
- func SignerFromContext(ctx context.Context) (msp.SigningIdentity, error)
- func TransientFromContext(ctx context.Context) (map[string][]byte, error)
- func TxWaiterFromContext(ctx context.Context) string
- type BlockLimit
- type ChaincodeEvent
- func (*ChaincodeEvent) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeEvent) GetBlock() uint64
- func (x *ChaincodeEvent) GetEvent() *peer.ChaincodeEvent
- func (x *ChaincodeEvent) GetPayload() *RawJson
- func (x *ChaincodeEvent) GetTxTimestamp() *timestamppb.Timestamp
- func (*ChaincodeEvent) ProtoMessage()
- func (x *ChaincodeEvent) ProtoReflect() protoreflect.Message
- func (x *ChaincodeEvent) Reset()
- func (x *ChaincodeEvent) String() string
- func (this *ChaincodeEvent) Validate() error
- type ChaincodeEventServerStream
- func (s *ChaincodeEventServerStream) Close()
- func (s *ChaincodeEventServerStream) Context() context.Context
- func (s *ChaincodeEventServerStream) Events() <-chan *ChaincodeEvent
- func (s *ChaincodeEventServerStream) Recv(e *ChaincodeEvent) error
- func (s *ChaincodeEventServerStream) RecvMsg(m interface{}) error
- func (*ChaincodeEventServerStream) SendHeader(metadata.MD) error
- func (s *ChaincodeEventServerStream) SendMsg(m interface{}) error
- func (*ChaincodeEventServerStream) SetHeader(metadata.MD) error
- func (*ChaincodeEventServerStream) SetTrailer(metadata.MD)
- type ChaincodeEventService
- func (ce *ChaincodeEventService) Events(ctx context.Context, req *ChaincodeEventsRequest) (*ChaincodeEvents, error)
- func (ce *ChaincodeEventService) EventsChan(ctx context.Context, req *ChaincodeEventsStreamRequest) (_ chan *ChaincodeEvent, closer func() error, _ error)
- func (ce *ChaincodeEventService) EventsStream(req *ChaincodeEventsStreamRequest, ...) error
- func (ce *ChaincodeEventService) ServiceDef() ServiceDef
- type ChaincodeEvents
- func (*ChaincodeEvents) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeEvents) GetFromBlock() *BlockLimit
- func (x *ChaincodeEvents) GetItems() []*ChaincodeEvent
- func (x *ChaincodeEvents) GetLocator() *ChaincodeLocator
- func (x *ChaincodeEvents) GetToBlock() *BlockLimit
- func (*ChaincodeEvents) ProtoMessage()
- func (x *ChaincodeEvents) ProtoReflect() protoreflect.Message
- func (x *ChaincodeEvents) Reset()
- func (x *ChaincodeEvents) String() string
- func (this *ChaincodeEvents) Validate() error
- type ChaincodeEventsRequest
- func (*ChaincodeEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeEventsRequest) GetEventName() []string
- func (x *ChaincodeEventsRequest) GetFromBlock() *BlockLimit
- func (x *ChaincodeEventsRequest) GetLimit() uint32
- func (x *ChaincodeEventsRequest) GetLocator() *ChaincodeLocator
- func (x *ChaincodeEventsRequest) GetToBlock() *BlockLimit
- func (*ChaincodeEventsRequest) ProtoMessage()
- func (x *ChaincodeEventsRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeEventsRequest) Reset()
- func (x *ChaincodeEventsRequest) String() string
- func (this *ChaincodeEventsRequest) Validate() error
- type ChaincodeEventsServer
- type ChaincodeEventsServiceClient
- type ChaincodeEventsServiceServer
- type ChaincodeEventsService_EventsStreamClient
- type ChaincodeEventsService_EventsStreamServer
- type ChaincodeEventsStreamRequest
- func (*ChaincodeEventsStreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeEventsStreamRequest) GetEventName() []string
- func (x *ChaincodeEventsStreamRequest) GetFromBlock() *BlockLimit
- func (x *ChaincodeEventsStreamRequest) GetLocator() *ChaincodeLocator
- func (x *ChaincodeEventsStreamRequest) GetToBlock() *BlockLimit
- func (*ChaincodeEventsStreamRequest) ProtoMessage()
- func (x *ChaincodeEventsStreamRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeEventsStreamRequest) Reset()
- func (x *ChaincodeEventsStreamRequest) String() string
- func (this *ChaincodeEventsStreamRequest) Validate() error
- type ChaincodeExecRequest
- func (*ChaincodeExecRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeExecRequest) GetInput() *ChaincodeInput
- func (x *ChaincodeExecRequest) GetLocator() *ChaincodeLocator
- func (x *ChaincodeExecRequest) GetType() InvocationType
- func (*ChaincodeExecRequest) ProtoMessage()
- func (x *ChaincodeExecRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeExecRequest) Reset()
- func (x *ChaincodeExecRequest) String() string
- func (this *ChaincodeExecRequest) Validate() error
- type ChaincodeInput
- func (*ChaincodeInput) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeInput) GetArgs() [][]byte
- func (x *ChaincodeInput) GetTransient() map[string][]byte
- func (*ChaincodeInput) ProtoMessage()
- func (x *ChaincodeInput) ProtoReflect() protoreflect.Message
- func (x *ChaincodeInput) Reset()
- func (x *ChaincodeInput) String() string
- func (this *ChaincodeInput) Validate() error
- type ChaincodeInstance
- type ChaincodeInstanceEventService
- func (ces *ChaincodeInstanceEventService) Events(ctx context.Context, req *ChaincodeInstanceEventsRequest) (*ChaincodeEvents, error)
- func (ces *ChaincodeInstanceEventService) EventsChan(ctx context.Context, rr ...*ChaincodeInstanceEventsStreamRequest) (_ chan *ChaincodeEvent, closer func() error, _ error)
- func (ces *ChaincodeInstanceEventService) EventsStream(req *ChaincodeInstanceEventsStreamRequest, ...) error
- func (ces *ChaincodeInstanceEventService) ServiceDef() ServiceDef
- type ChaincodeInstanceEvents
- type ChaincodeInstanceEventsRequest
- func (*ChaincodeInstanceEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeInstanceEventsRequest) GetEventName() []string
- func (x *ChaincodeInstanceEventsRequest) GetFromBlock() *BlockLimit
- func (x *ChaincodeInstanceEventsRequest) GetLimit() uint32
- func (x *ChaincodeInstanceEventsRequest) GetToBlock() *BlockLimit
- func (*ChaincodeInstanceEventsRequest) ProtoMessage()
- func (x *ChaincodeInstanceEventsRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeInstanceEventsRequest) Reset()
- func (x *ChaincodeInstanceEventsRequest) String() string
- func (this *ChaincodeInstanceEventsRequest) Validate() error
- type ChaincodeInstanceEventsServiceClient
- type ChaincodeInstanceEventsServiceServer
- type ChaincodeInstanceEventsService_EventsStreamClient
- type ChaincodeInstanceEventsService_EventsStreamServer
- type ChaincodeInstanceEventsStreamRequest
- func (*ChaincodeInstanceEventsStreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeInstanceEventsStreamRequest) GetEventName() []string
- func (x *ChaincodeInstanceEventsStreamRequest) GetFromBlock() *BlockLimit
- func (x *ChaincodeInstanceEventsStreamRequest) GetToBlock() *BlockLimit
- func (*ChaincodeInstanceEventsStreamRequest) ProtoMessage()
- func (x *ChaincodeInstanceEventsStreamRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeInstanceEventsStreamRequest) Reset()
- func (x *ChaincodeInstanceEventsStreamRequest) String() string
- func (this *ChaincodeInstanceEventsStreamRequest) Validate() error
- type ChaincodeInstanceExecRequest
- func (*ChaincodeInstanceExecRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeInstanceExecRequest) GetInput() *ChaincodeInput
- func (x *ChaincodeInstanceExecRequest) GetType() InvocationType
- func (*ChaincodeInstanceExecRequest) ProtoMessage()
- func (x *ChaincodeInstanceExecRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeInstanceExecRequest) Reset()
- func (x *ChaincodeInstanceExecRequest) String() string
- func (this *ChaincodeInstanceExecRequest) Validate() error
- type ChaincodeInstanceInvokeRequest
- func (*ChaincodeInstanceInvokeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeInstanceInvokeRequest) GetInput() *ChaincodeInput
- func (*ChaincodeInstanceInvokeRequest) ProtoMessage()
- func (x *ChaincodeInstanceInvokeRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeInstanceInvokeRequest) Reset()
- func (x *ChaincodeInstanceInvokeRequest) String() string
- func (this *ChaincodeInstanceInvokeRequest) Validate() error
- type ChaincodeInstanceInvoker
- type ChaincodeInstanceQueryRequest
- func (*ChaincodeInstanceQueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeInstanceQueryRequest) GetInput() *ChaincodeInput
- func (*ChaincodeInstanceQueryRequest) ProtoMessage()
- func (x *ChaincodeInstanceQueryRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeInstanceQueryRequest) Reset()
- func (x *ChaincodeInstanceQueryRequest) String() string
- func (this *ChaincodeInstanceQueryRequest) Validate() error
- type ChaincodeInstanceService
- func (cis *ChaincodeInstanceService) EventService() *ChaincodeInstanceEventService
- func (cis *ChaincodeInstanceService) Events(ctx context.Context, req *ChaincodeInstanceEventsRequest) (*ChaincodeEvents, error)
- func (cis *ChaincodeInstanceService) EventsChan(ctx context.Context, rr ...*ChaincodeInstanceEventsStreamRequest) (_ chan *ChaincodeEvent, closer func() error, _ error)
- func (cis *ChaincodeInstanceService) EventsStream(req *ChaincodeInstanceEventsStreamRequest, ...) error
- func (cis *ChaincodeInstanceService) Exec(ctx context.Context, req *ChaincodeInstanceExecRequest) (*peer.Response, error)
- func (cis *ChaincodeInstanceService) Invoke(ctx context.Context, req *ChaincodeInstanceInvokeRequest) (*peer.Response, error)
- func (cis *ChaincodeInstanceService) Query(ctx context.Context, req *ChaincodeInstanceQueryRequest) (*peer.Response, error)
- func (cis *ChaincodeInstanceService) ServiceDef() ServiceDef
- type ChaincodeInstanceServiceClient
- type ChaincodeInstanceServiceInvoker
- type ChaincodeInstanceServiceServer
- type ChaincodeInstanceService_EventsStreamClient
- type ChaincodeInstanceService_EventsStreamServer
- type ChaincodeInvokeRequest
- func (*ChaincodeInvokeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeInvokeRequest) GetInput() *ChaincodeInput
- func (x *ChaincodeInvokeRequest) GetLocator() *ChaincodeLocator
- func (*ChaincodeInvokeRequest) ProtoMessage()
- func (x *ChaincodeInvokeRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeInvokeRequest) Reset()
- func (x *ChaincodeInvokeRequest) String() string
- func (this *ChaincodeInvokeRequest) Validate() error
- type ChaincodeLocator
- func (*ChaincodeLocator) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeLocator) GetChaincode() string
- func (x *ChaincodeLocator) GetChannel() string
- func (*ChaincodeLocator) ProtoMessage()
- func (x *ChaincodeLocator) ProtoReflect() protoreflect.Message
- func (x *ChaincodeLocator) Reset()
- func (x *ChaincodeLocator) String() string
- func (this *ChaincodeLocator) Validate() error
- type ChaincodeLocatorResolver
- type ChaincodeQueryRequest
- func (*ChaincodeQueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChaincodeQueryRequest) GetInput() *ChaincodeInput
- func (x *ChaincodeQueryRequest) GetLocator() *ChaincodeLocator
- func (*ChaincodeQueryRequest) ProtoMessage()
- func (x *ChaincodeQueryRequest) ProtoReflect() protoreflect.Message
- func (x *ChaincodeQueryRequest) Reset()
- func (x *ChaincodeQueryRequest) String() string
- func (this *ChaincodeQueryRequest) Validate() error
- type ChaincodeService
- func (cs *ChaincodeService) Events(ctx context.Context, req *ChaincodeEventsRequest) (*ChaincodeEvents, error)
- func (cs *ChaincodeService) EventsChan(ctx context.Context, req *ChaincodeEventsStreamRequest) (_ chan *ChaincodeEvent, closer func() error, _ error)
- func (cs *ChaincodeService) EventsStream(req *ChaincodeEventsStreamRequest, stream ChaincodeService_EventsStreamServer) error
- func (cs *ChaincodeService) Exec(ctx context.Context, req *ChaincodeExecRequest) (*peer.Response, error)
- func (cs *ChaincodeService) InstanceService(locator *ChaincodeLocator, opts ...Opt) *ChaincodeInstanceService
- func (cs *ChaincodeService) Invoke(ctx context.Context, req *ChaincodeInvokeRequest) (*peer.Response, error)
- func (cs *ChaincodeService) Query(ctx context.Context, req *ChaincodeQueryRequest) (*peer.Response, error)
- func (cs *ChaincodeService) ServiceDef() ServiceDef
- type ChaincodeServiceClient
- type ChaincodeServiceServer
- type ChaincodeService_EventsStreamClient
- type ChaincodeService_EventsStreamServer
- type ChaincodeStubInvoker
- type ContextOpt
- type EventOpt
- type InputOpt
- type InstanceOpts
- type InvocationType
- func (InvocationType) Descriptor() protoreflect.EnumDescriptor
- func (x InvocationType) Enum() *InvocationType
- func (InvocationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x InvocationType) Number() protoreflect.EnumNumber
- func (x InvocationType) String() string
- func (InvocationType) Type() protoreflect.EnumType
- type InvokerOpt
- type LocatorChaincodeStubInvoker
- type Opt
- func WithArgsEncryption(encKey []byte) Opt
- func WithDefaultSigner(defaultSigner msp.SigningIdentity) Opt
- func WithDefaultTransientMapValue(key string, value []byte) Opt
- func WithEncryption(encKey []byte) Opt
- func WithEventDecryption(encKey []byte) Opt
- func WithEventResolver(resolver mapping.EventResolver, ...) Opt
- func WithInvokePayloadDecryption(encKey []byte) Opt
- type Opts
- type OutputOpt
- type RawJson
- func (*RawJson) Descriptor() ([]byte, []int)deprecated
- func (x *RawJson) GetValue() []byte
- func (x *RawJson) MarshalJSON() ([]byte, error)
- func (x *RawJson) MarshalJSONPB(_ *jsonpb.Marshaler) ([]byte, error)
- func (*RawJson) ProtoMessage()
- func (x *RawJson) ProtoReflect() protoreflect.Message
- func (x *RawJson) Reset()
- func (x *RawJson) String() string
- func (this *RawJson) Validate() error
- type RegisterHandlerFromEndpoint
- type Service
- type ServiceDef
- type UnimplementedChaincodeEventsServiceServer
- type UnimplementedChaincodeInstanceEventsServiceServer
- type UnimplementedChaincodeInstanceServiceServer
- func (*UnimplementedChaincodeInstanceServiceServer) Events(context.Context, *ChaincodeInstanceEventsRequest) (*ChaincodeEvents, error)
- func (*UnimplementedChaincodeInstanceServiceServer) EventsStream(*ChaincodeInstanceEventsStreamRequest, ...) error
- func (*UnimplementedChaincodeInstanceServiceServer) Exec(context.Context, *ChaincodeInstanceExecRequest) (*peer.Response, error)
- func (*UnimplementedChaincodeInstanceServiceServer) Invoke(context.Context, *ChaincodeInstanceInvokeRequest) (*peer.Response, error)
- func (*UnimplementedChaincodeInstanceServiceServer) Query(context.Context, *ChaincodeInstanceQueryRequest) (*peer.Response, error)
- type UnimplementedChaincodeServiceServer
- func (*UnimplementedChaincodeServiceServer) Events(context.Context, *ChaincodeEventsRequest) (*ChaincodeEvents, error)
- func (*UnimplementedChaincodeServiceServer) EventsStream(*ChaincodeEventsStreamRequest, ChaincodeService_EventsStreamServer) error
- func (*UnimplementedChaincodeServiceServer) Exec(context.Context, *ChaincodeExecRequest) (*peer.Response, error)
- func (*UnimplementedChaincodeServiceServer) Invoke(context.Context, *ChaincodeInvokeRequest) (*peer.Response, error)
- func (*UnimplementedChaincodeServiceServer) Query(context.Context, *ChaincodeQueryRequest) (*peer.Response, error)
Constants ¶
const ( CtxTransientKey = contextKey(`TransientMap`) CtxSignerKey = contextKey(`SigningIdentity`) CtxTxWaiterKey = contextKey(`TxWaiter`) )
const EventListStreamTimeout = 500 * time.Millisecond
Variables ¶
var ( InvocationType_name = map[int32]string{ 0: "INVOCATION_TYPE_QUERY", 1: "INVOCATION_TYPE_INVOKE", } InvocationType_value = map[string]int32{ "INVOCATION_TYPE_QUERY": 0, "INVOCATION_TYPE_INVOKE": 1, } )
Enum value maps for InvocationType.
var ( ErrEventChannelClosed = errors.New(`event channel is closed`) // ErrChaincodeNotExists occurs when attempting to invoke a nonexostent external chaincode ErrChaincodeNotExists = errors.New(`chaincode not exists`) // ErrSignerNotDefinedInContext msp.SigningIdentity is not defined in context ErrSignerNotDefinedInContext = errors.New(`signer is not defined in context`) // ErrUnknownInvocationType query or invoke ErrUnknownInvocationType = errors.New(`unknown invocation type`) // ErrNewInvokerNotDefinedInContext is not defined in context ErrNewInvokerNotDefinedInContext = errors.New(`new invoker is not defined in context`) )
var ErrInvokeMethodNotAllowed = errors.New(`invoke method not allowed`)
var File_chaincode_proto protoreflect.FileDescriptor
Functions ¶
func BlockRange ¶
func BlockRange(from, to *BlockLimit) []int64
func ContextWithSigner ¶
func ContextWithTransientMap ¶
func ContextWithTxWaiter ¶
func MatchEventName ¶
func RegisterChaincodeEventsServiceHandler ¶
func RegisterChaincodeEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterChaincodeEventsServiceHandler registers the http handlers for service ChaincodeEventsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterChaincodeEventsServiceHandlerClient ¶
func RegisterChaincodeEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChaincodeEventsServiceClient) error
RegisterChaincodeEventsServiceHandlerClient registers the http handlers for service ChaincodeEventsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChaincodeEventsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChaincodeEventsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ChaincodeEventsServiceClient" to call the correct interceptors.
func RegisterChaincodeEventsServiceHandlerFromEndpoint ¶
func RegisterChaincodeEventsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterChaincodeEventsServiceHandlerFromEndpoint is same as RegisterChaincodeEventsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterChaincodeEventsServiceHandlerServer ¶
func RegisterChaincodeEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChaincodeEventsServiceServer) error
RegisterChaincodeEventsServiceHandlerServer registers the http handlers for service ChaincodeEventsService to "mux". UnaryRPC :call ChaincodeEventsServiceServer 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 RegisterChaincodeEventsServiceHandlerFromEndpoint instead.
func RegisterChaincodeEventsServiceServer ¶
func RegisterChaincodeEventsServiceServer(s *grpc.Server, srv ChaincodeEventsServiceServer)
func RegisterChaincodeInstanceEventsServiceHandler ¶
func RegisterChaincodeInstanceEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterChaincodeInstanceEventsServiceHandler registers the http handlers for service ChaincodeInstanceEventsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterChaincodeInstanceEventsServiceHandlerClient ¶
func RegisterChaincodeInstanceEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChaincodeInstanceEventsServiceClient) error
RegisterChaincodeInstanceEventsServiceHandlerClient registers the http handlers for service ChaincodeInstanceEventsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChaincodeInstanceEventsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChaincodeInstanceEventsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ChaincodeInstanceEventsServiceClient" to call the correct interceptors.
func RegisterChaincodeInstanceEventsServiceHandlerFromEndpoint ¶
func RegisterChaincodeInstanceEventsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterChaincodeInstanceEventsServiceHandlerFromEndpoint is same as RegisterChaincodeInstanceEventsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterChaincodeInstanceEventsServiceHandlerServer ¶
func RegisterChaincodeInstanceEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChaincodeInstanceEventsServiceServer) error
RegisterChaincodeInstanceEventsServiceHandlerServer registers the http handlers for service ChaincodeInstanceEventsService to "mux". UnaryRPC :call ChaincodeInstanceEventsServiceServer 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 RegisterChaincodeInstanceEventsServiceHandlerFromEndpoint instead.
func RegisterChaincodeInstanceEventsServiceServer ¶
func RegisterChaincodeInstanceEventsServiceServer(s *grpc.Server, srv ChaincodeInstanceEventsServiceServer)
func RegisterChaincodeInstanceServiceHandler ¶
func RegisterChaincodeInstanceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterChaincodeInstanceServiceHandler registers the http handlers for service ChaincodeInstanceService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterChaincodeInstanceServiceHandlerClient ¶
func RegisterChaincodeInstanceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChaincodeInstanceServiceClient) error
RegisterChaincodeInstanceServiceHandlerClient registers the http handlers for service ChaincodeInstanceService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChaincodeInstanceServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChaincodeInstanceServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ChaincodeInstanceServiceClient" to call the correct interceptors.
func RegisterChaincodeInstanceServiceHandlerFromEndpoint ¶
func RegisterChaincodeInstanceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterChaincodeInstanceServiceHandlerFromEndpoint is same as RegisterChaincodeInstanceServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterChaincodeInstanceServiceHandlerServer ¶
func RegisterChaincodeInstanceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChaincodeInstanceServiceServer) error
RegisterChaincodeInstanceServiceHandlerServer registers the http handlers for service ChaincodeInstanceService to "mux". UnaryRPC :call ChaincodeInstanceServiceServer 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 RegisterChaincodeInstanceServiceHandlerFromEndpoint instead.
func RegisterChaincodeInstanceServiceServer ¶
func RegisterChaincodeInstanceServiceServer(s *grpc.Server, srv ChaincodeInstanceServiceServer)
func RegisterChaincodeServiceHandler ¶
func RegisterChaincodeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterChaincodeServiceHandler registers the http handlers for service ChaincodeService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterChaincodeServiceHandlerClient ¶
func RegisterChaincodeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ChaincodeServiceClient) error
RegisterChaincodeServiceHandlerClient registers the http handlers for service ChaincodeService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ChaincodeServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ChaincodeServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ChaincodeServiceClient" to call the correct interceptors.
func RegisterChaincodeServiceHandlerFromEndpoint ¶
func RegisterChaincodeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterChaincodeServiceHandlerFromEndpoint is same as RegisterChaincodeServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterChaincodeServiceHandlerServer ¶
func RegisterChaincodeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ChaincodeServiceServer) error
RegisterChaincodeServiceHandlerServer registers the http handlers for service ChaincodeService to "mux". UnaryRPC :call ChaincodeServiceServer 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 RegisterChaincodeServiceHandlerFromEndpoint instead.
func RegisterChaincodeServiceServer ¶
func RegisterChaincodeServiceServer(s *grpc.Server, srv ChaincodeServiceServer)
func SignerFromContext ¶
func SignerFromContext(ctx context.Context) (msp.SigningIdentity, error)
func TransientFromContext ¶
func TxWaiterFromContext ¶
TxWaiterFromContext - fetch 'txWaiterType' param which identify transaction waiting policy what params you'll have depends on your implementation for example, in hlf-sdk: available: 'self'(wait for one peer of endorser org), 'all'(wait for each organizations from endorsement policy) default is 'self'(even if you pass empty string)
Types ¶
type BlockLimit ¶
type BlockLimit struct { // Block number Num int64 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"` // contains filtered or unexported fields }
Block limit number for event stream subscription or event list Values can be negative
func (*BlockLimit) Descriptor
deprecated
func (*BlockLimit) Descriptor() ([]byte, []int)
Deprecated: Use BlockLimit.ProtoReflect.Descriptor instead.
func (*BlockLimit) GetNum ¶
func (x *BlockLimit) GetNum() int64
func (*BlockLimit) ProtoMessage ¶
func (*BlockLimit) ProtoMessage()
func (*BlockLimit) ProtoReflect ¶
func (x *BlockLimit) ProtoReflect() protoreflect.Message
func (*BlockLimit) Reset ¶
func (x *BlockLimit) Reset()
func (*BlockLimit) String ¶
func (x *BlockLimit) String() string
func (*BlockLimit) Validate ¶
func (this *BlockLimit) Validate() error
type ChaincodeEvent ¶
type ChaincodeEvent struct { Event *peer.ChaincodeEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` Block uint64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"` TxTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=tx_timestamp,json=txTimestamp,proto3" json:"tx_timestamp,omitempty"` Payload *RawJson `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func ProcessEvent ¶
func ProcessEvent(event interface { Event() *peer.ChaincodeEvent Block() uint64 TxTimestamp() *timestamp.Timestamp }, opts []EventOpt, matchName []string) (*ChaincodeEvent, error)
func (*ChaincodeEvent) Descriptor
deprecated
func (*ChaincodeEvent) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeEvent.ProtoReflect.Descriptor instead.
func (*ChaincodeEvent) GetBlock ¶
func (x *ChaincodeEvent) GetBlock() uint64
func (*ChaincodeEvent) GetEvent ¶
func (x *ChaincodeEvent) GetEvent() *peer.ChaincodeEvent
func (*ChaincodeEvent) GetPayload ¶
func (x *ChaincodeEvent) GetPayload() *RawJson
func (*ChaincodeEvent) GetTxTimestamp ¶
func (x *ChaincodeEvent) GetTxTimestamp() *timestamppb.Timestamp
func (*ChaincodeEvent) ProtoMessage ¶
func (*ChaincodeEvent) ProtoMessage()
func (*ChaincodeEvent) ProtoReflect ¶
func (x *ChaincodeEvent) ProtoReflect() protoreflect.Message
func (*ChaincodeEvent) Reset ¶
func (x *ChaincodeEvent) Reset()
func (*ChaincodeEvent) String ¶
func (x *ChaincodeEvent) String() string
func (*ChaincodeEvent) Validate ¶
func (this *ChaincodeEvent) Validate() error
type ChaincodeEventServerStream ¶
type ChaincodeEventServerStream struct {
// contains filtered or unexported fields
}
ChaincodeEventServerStream implements gRPC server stream interfaces
func NewChaincodeEventServerStream ¶
func NewChaincodeEventServerStream(ctx context.Context, opts ...EventOpt) (stream *ChaincodeEventServerStream)
func (*ChaincodeEventServerStream) Close ¶
func (s *ChaincodeEventServerStream) Close()
func (*ChaincodeEventServerStream) Context ¶
func (s *ChaincodeEventServerStream) Context() context.Context
func (*ChaincodeEventServerStream) Events ¶
func (s *ChaincodeEventServerStream) Events() <-chan *ChaincodeEvent
func (*ChaincodeEventServerStream) Recv ¶
func (s *ChaincodeEventServerStream) Recv(e *ChaincodeEvent) error
func (*ChaincodeEventServerStream) RecvMsg ¶
func (s *ChaincodeEventServerStream) RecvMsg(m interface{}) error
func (*ChaincodeEventServerStream) SendHeader ¶
func (*ChaincodeEventServerStream) SendHeader(metadata.MD) error
func (*ChaincodeEventServerStream) SendMsg ¶
func (s *ChaincodeEventServerStream) SendMsg(m interface{}) error
func (*ChaincodeEventServerStream) SetHeader ¶
func (*ChaincodeEventServerStream) SetHeader(metadata.MD) error
func (*ChaincodeEventServerStream) SetTrailer ¶
func (*ChaincodeEventServerStream) SetTrailer(metadata.MD)
type ChaincodeEventService ¶
type ChaincodeEventService struct {
EventDelivery sdk.EventDelivery
}
func NewChaincodeEventService ¶
func NewChaincodeEventService(eventDelivery sdk.EventDelivery) *ChaincodeEventService
func (*ChaincodeEventService) Events ¶
func (ce *ChaincodeEventService) Events(ctx context.Context, req *ChaincodeEventsRequest) (*ChaincodeEvents, error)
func (*ChaincodeEventService) EventsChan ¶
func (ce *ChaincodeEventService) EventsChan( ctx context.Context, req *ChaincodeEventsStreamRequest) (_ chan *ChaincodeEvent, closer func() error, _ error)
func (*ChaincodeEventService) EventsStream ¶
func (ce *ChaincodeEventService) EventsStream(req *ChaincodeEventsStreamRequest, stream ChaincodeEventsService_EventsStreamServer) error
func (*ChaincodeEventService) ServiceDef ¶
func (ce *ChaincodeEventService) ServiceDef() ServiceDef
ServiceDef returns service definition
type ChaincodeEvents ¶
type ChaincodeEvents struct { Locator *ChaincodeLocator `protobuf:"bytes,1,opt,name=locator,proto3" json:"locator,omitempty"` FromBlock *BlockLimit `protobuf:"bytes,2,opt,name=from_block,json=fromBlock,proto3" json:"from_block,omitempty"` ToBlock *BlockLimit `protobuf:"bytes,3,opt,name=to_block,json=toBlock,proto3" json:"to_block,omitempty"` Items []*ChaincodeEvent `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ChaincodeEvents) Descriptor
deprecated
func (*ChaincodeEvents) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeEvents.ProtoReflect.Descriptor instead.
func (*ChaincodeEvents) GetFromBlock ¶
func (x *ChaincodeEvents) GetFromBlock() *BlockLimit
func (*ChaincodeEvents) GetItems ¶
func (x *ChaincodeEvents) GetItems() []*ChaincodeEvent
func (*ChaincodeEvents) GetLocator ¶
func (x *ChaincodeEvents) GetLocator() *ChaincodeLocator
func (*ChaincodeEvents) GetToBlock ¶
func (x *ChaincodeEvents) GetToBlock() *BlockLimit
func (*ChaincodeEvents) ProtoMessage ¶
func (*ChaincodeEvents) ProtoMessage()
func (*ChaincodeEvents) ProtoReflect ¶
func (x *ChaincodeEvents) ProtoReflect() protoreflect.Message
func (*ChaincodeEvents) Reset ¶
func (x *ChaincodeEvents) Reset()
func (*ChaincodeEvents) String ¶
func (x *ChaincodeEvents) String() string
func (*ChaincodeEvents) Validate ¶
func (this *ChaincodeEvents) Validate() error
type ChaincodeEventsRequest ¶
type ChaincodeEventsRequest struct { Locator *ChaincodeLocator `protobuf:"bytes,1,opt,name=locator,proto3" json:"locator,omitempty"` FromBlock *BlockLimit `protobuf:"bytes,2,opt,name=from_block,json=fromBlock,proto3" json:"from_block,omitempty"` ToBlock *BlockLimit `protobuf:"bytes,3,opt,name=to_block,json=toBlock,proto3" json:"to_block,omitempty"` EventName []string `protobuf:"bytes,4,rep,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` Limit uint32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
Chaincode events list request
func (*ChaincodeEventsRequest) Descriptor
deprecated
func (*ChaincodeEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeEventsRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeEventsRequest) GetEventName ¶
func (x *ChaincodeEventsRequest) GetEventName() []string
func (*ChaincodeEventsRequest) GetFromBlock ¶
func (x *ChaincodeEventsRequest) GetFromBlock() *BlockLimit
func (*ChaincodeEventsRequest) GetLimit ¶
func (x *ChaincodeEventsRequest) GetLimit() uint32
func (*ChaincodeEventsRequest) GetLocator ¶
func (x *ChaincodeEventsRequest) GetLocator() *ChaincodeLocator
func (*ChaincodeEventsRequest) GetToBlock ¶
func (x *ChaincodeEventsRequest) GetToBlock() *BlockLimit
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
func (*ChaincodeEventsRequest) Validate ¶
func (this *ChaincodeEventsRequest) Validate() error
type ChaincodeEventsServer ¶
type ChaincodeEventsServer = chaincodeServiceEventsStreamServer
ChaincodeEventsServer gateway/chaincode.go needs access to grpc stream
type ChaincodeEventsServiceClient ¶
type ChaincodeEventsServiceClient interface { // Chaincode events stream EventsStream(ctx context.Context, in *ChaincodeEventsStreamRequest, opts ...grpc.CallOption) (ChaincodeEventsService_EventsStreamClient, error) // Chaincode events Events(ctx context.Context, in *ChaincodeEventsRequest, opts ...grpc.CallOption) (*ChaincodeEvents, error) }
ChaincodeEventsServiceClient is the client API for ChaincodeEventsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChaincodeEventsServiceClient ¶
func NewChaincodeEventsServiceClient(cc grpc.ClientConnInterface) ChaincodeEventsServiceClient
type ChaincodeEventsServiceServer ¶
type ChaincodeEventsServiceServer interface { // Chaincode events stream EventsStream(*ChaincodeEventsStreamRequest, ChaincodeEventsService_EventsStreamServer) error // Chaincode events Events(context.Context, *ChaincodeEventsRequest) (*ChaincodeEvents, error) }
ChaincodeEventsServiceServer is the server API for ChaincodeEventsService service.
type ChaincodeEventsService_EventsStreamClient ¶
type ChaincodeEventsService_EventsStreamClient interface { Recv() (*ChaincodeEvent, error) grpc.ClientStream }
type ChaincodeEventsService_EventsStreamServer ¶
type ChaincodeEventsService_EventsStreamServer interface { Send(*ChaincodeEvent) error grpc.ServerStream }
type ChaincodeEventsStreamRequest ¶
type ChaincodeEventsStreamRequest struct { Locator *ChaincodeLocator `protobuf:"bytes,1,opt,name=locator,proto3" json:"locator,omitempty"` FromBlock *BlockLimit `protobuf:"bytes,2,opt,name=from_block,json=fromBlock,proto3" json:"from_block,omitempty"` ToBlock *BlockLimit `protobuf:"bytes,3,opt,name=to_block,json=toBlock,proto3" json:"to_block,omitempty"` EventName []string `protobuf:"bytes,4,rep,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` // contains filtered or unexported fields }
Chaincode events stream request
func (*ChaincodeEventsStreamRequest) Descriptor
deprecated
func (*ChaincodeEventsStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeEventsStreamRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeEventsStreamRequest) GetEventName ¶
func (x *ChaincodeEventsStreamRequest) GetEventName() []string
func (*ChaincodeEventsStreamRequest) GetFromBlock ¶
func (x *ChaincodeEventsStreamRequest) GetFromBlock() *BlockLimit
func (*ChaincodeEventsStreamRequest) GetLocator ¶
func (x *ChaincodeEventsStreamRequest) GetLocator() *ChaincodeLocator
func (*ChaincodeEventsStreamRequest) GetToBlock ¶
func (x *ChaincodeEventsStreamRequest) GetToBlock() *BlockLimit
func (*ChaincodeEventsStreamRequest) ProtoMessage ¶
func (*ChaincodeEventsStreamRequest) ProtoMessage()
func (*ChaincodeEventsStreamRequest) ProtoReflect ¶
func (x *ChaincodeEventsStreamRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeEventsStreamRequest) Reset ¶
func (x *ChaincodeEventsStreamRequest) Reset()
func (*ChaincodeEventsStreamRequest) String ¶
func (x *ChaincodeEventsStreamRequest) String() string
func (*ChaincodeEventsStreamRequest) Validate ¶
func (this *ChaincodeEventsStreamRequest) Validate() error
type ChaincodeExecRequest ¶
type ChaincodeExecRequest struct { Locator *ChaincodeLocator `protobuf:"bytes,1,opt,name=locator,proto3" json:"locator,omitempty"` Type InvocationType `protobuf:"varint,2,opt,name=type,proto3,enum=cckit.gateway.InvocationType" json:"type,omitempty"` Input *ChaincodeInput `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` // contains filtered or unexported fields }
Chaincode execution specification
func (*ChaincodeExecRequest) Descriptor
deprecated
func (*ChaincodeExecRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeExecRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeExecRequest) GetInput ¶
func (x *ChaincodeExecRequest) GetInput() *ChaincodeInput
func (*ChaincodeExecRequest) GetLocator ¶
func (x *ChaincodeExecRequest) GetLocator() *ChaincodeLocator
func (*ChaincodeExecRequest) GetType ¶
func (x *ChaincodeExecRequest) GetType() InvocationType
func (*ChaincodeExecRequest) ProtoMessage ¶
func (*ChaincodeExecRequest) ProtoMessage()
func (*ChaincodeExecRequest) ProtoReflect ¶
func (x *ChaincodeExecRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeExecRequest) Reset ¶
func (x *ChaincodeExecRequest) Reset()
func (*ChaincodeExecRequest) String ¶
func (x *ChaincodeExecRequest) String() string
func (*ChaincodeExecRequest) Validate ¶
func (this *ChaincodeExecRequest) Validate() error
type ChaincodeInput ¶
type ChaincodeInput struct { // Input contains the arguments for invocation. Args [][]byte `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"` // TransientMap contains data (e.g. cryptographic material) that might be used // to implement some form of application-level confidentiality. The contents // of this field are supposed to always be omitted from the transaction and // excluded from the ledger. Transient map[string][]byte `` /* 159-byte string literal not displayed */ // contains filtered or unexported fields }
Chaincode invocation input
func (*ChaincodeInput) Descriptor
deprecated
func (*ChaincodeInput) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeInput.ProtoReflect.Descriptor instead.
func (*ChaincodeInput) GetArgs ¶
func (x *ChaincodeInput) GetArgs() [][]byte
func (*ChaincodeInput) GetTransient ¶
func (x *ChaincodeInput) GetTransient() map[string][]byte
func (*ChaincodeInput) ProtoMessage ¶
func (*ChaincodeInput) ProtoMessage()
func (*ChaincodeInput) ProtoReflect ¶
func (x *ChaincodeInput) ProtoReflect() protoreflect.Message
func (*ChaincodeInput) Reset ¶
func (x *ChaincodeInput) Reset()
func (*ChaincodeInput) String ¶
func (x *ChaincodeInput) String() string
func (*ChaincodeInput) Validate ¶
func (this *ChaincodeInput) Validate() error
type ChaincodeInstance ¶
type ChaincodeInstance interface { ChaincodeInstanceServiceServer EventsChan(ctx context.Context, rr ...*ChaincodeInstanceEventsStreamRequest) ( _ chan *ChaincodeEvent, closer func() error, _ error) }
ChaincodeInstance base implementation ChaincodeInstanceService - via SDK but also possible another implementation (via REST, another SDK etc)
type ChaincodeInstanceEventService ¶
type ChaincodeInstanceEventService struct { EventDelivery sdk.EventDelivery Locator *ChaincodeLocator Opts *Opts Logger *zap.Logger }
func NewChaincodeInstanceEventService ¶
func NewChaincodeInstanceEventService(delivery sdk.EventDelivery, channel, chaincode string, opts ...Opt) *ChaincodeInstanceEventService
func (*ChaincodeInstanceEventService) Events ¶
func (ces *ChaincodeInstanceEventService) Events(ctx context.Context, req *ChaincodeInstanceEventsRequest) (*ChaincodeEvents, error)
func (*ChaincodeInstanceEventService) EventsChan ¶
func (ces *ChaincodeInstanceEventService) EventsChan(ctx context.Context, rr ...*ChaincodeInstanceEventsStreamRequest) (_ chan *ChaincodeEvent, closer func() error, _ error)
EventsChan is not part of ChaincodeInstanceEventService interface, for calls as component
func (*ChaincodeInstanceEventService) EventsStream ¶
func (ces *ChaincodeInstanceEventService) EventsStream( req *ChaincodeInstanceEventsStreamRequest, stream ChaincodeInstanceEventsService_EventsStreamServer) error
func (*ChaincodeInstanceEventService) ServiceDef ¶
func (ces *ChaincodeInstanceEventService) ServiceDef() ServiceDef
type ChaincodeInstanceEvents ¶
type ChaincodeInstanceEvents interface { ChaincodeInstanceEventsServiceServer EventsChan(ctx context.Context, rr ...*ChaincodeInstanceEventsStreamRequest) ( _ chan *ChaincodeEvent, closer func() error, _ error) }
type ChaincodeInstanceEventsRequest ¶
type ChaincodeInstanceEventsRequest struct { FromBlock *BlockLimit `protobuf:"bytes,1,opt,name=from_block,json=fromBlock,proto3" json:"from_block,omitempty"` ToBlock *BlockLimit `protobuf:"bytes,2,opt,name=to_block,json=toBlock,proto3" json:"to_block,omitempty"` EventName []string `protobuf:"bytes,3,rep,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*ChaincodeInstanceEventsRequest) Descriptor
deprecated
func (*ChaincodeInstanceEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeInstanceEventsRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeInstanceEventsRequest) GetEventName ¶
func (x *ChaincodeInstanceEventsRequest) GetEventName() []string
func (*ChaincodeInstanceEventsRequest) GetFromBlock ¶
func (x *ChaincodeInstanceEventsRequest) GetFromBlock() *BlockLimit
func (*ChaincodeInstanceEventsRequest) GetLimit ¶
func (x *ChaincodeInstanceEventsRequest) GetLimit() uint32
func (*ChaincodeInstanceEventsRequest) GetToBlock ¶
func (x *ChaincodeInstanceEventsRequest) GetToBlock() *BlockLimit
func (*ChaincodeInstanceEventsRequest) ProtoMessage ¶
func (*ChaincodeInstanceEventsRequest) ProtoMessage()
func (*ChaincodeInstanceEventsRequest) ProtoReflect ¶
func (x *ChaincodeInstanceEventsRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeInstanceEventsRequest) Reset ¶
func (x *ChaincodeInstanceEventsRequest) Reset()
func (*ChaincodeInstanceEventsRequest) String ¶
func (x *ChaincodeInstanceEventsRequest) String() string
func (*ChaincodeInstanceEventsRequest) Validate ¶
func (this *ChaincodeInstanceEventsRequest) Validate() error
type ChaincodeInstanceEventsServiceClient ¶
type ChaincodeInstanceEventsServiceClient interface { // Chaincode events stream EventsStream(ctx context.Context, in *ChaincodeInstanceEventsStreamRequest, opts ...grpc.CallOption) (ChaincodeInstanceEventsService_EventsStreamClient, error) // Chaincode events s Events(ctx context.Context, in *ChaincodeInstanceEventsRequest, opts ...grpc.CallOption) (*ChaincodeEvents, error) }
ChaincodeInstanceEventsServiceClient is the client API for ChaincodeInstanceEventsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChaincodeInstanceEventsServiceClient ¶
func NewChaincodeInstanceEventsServiceClient(cc grpc.ClientConnInterface) ChaincodeInstanceEventsServiceClient
type ChaincodeInstanceEventsServiceServer ¶
type ChaincodeInstanceEventsServiceServer interface { // Chaincode events stream EventsStream(*ChaincodeInstanceEventsStreamRequest, ChaincodeInstanceEventsService_EventsStreamServer) error // Chaincode events s Events(context.Context, *ChaincodeInstanceEventsRequest) (*ChaincodeEvents, error) }
ChaincodeInstanceEventsServiceServer is the server API for ChaincodeInstanceEventsService service.
type ChaincodeInstanceEventsService_EventsStreamClient ¶
type ChaincodeInstanceEventsService_EventsStreamClient interface { Recv() (*ChaincodeEvent, error) grpc.ClientStream }
type ChaincodeInstanceEventsService_EventsStreamServer ¶
type ChaincodeInstanceEventsService_EventsStreamServer interface { Send(*ChaincodeEvent) error grpc.ServerStream }
type ChaincodeInstanceEventsStreamRequest ¶
type ChaincodeInstanceEventsStreamRequest struct { FromBlock *BlockLimit `protobuf:"bytes,1,opt,name=from_block,json=fromBlock,proto3" json:"from_block,omitempty"` ToBlock *BlockLimit `protobuf:"bytes,2,opt,name=to_block,json=toBlock,proto3" json:"to_block,omitempty"` EventName []string `protobuf:"bytes,3,rep,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` // contains filtered or unexported fields }
func (*ChaincodeInstanceEventsStreamRequest) Descriptor
deprecated
func (*ChaincodeInstanceEventsStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeInstanceEventsStreamRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeInstanceEventsStreamRequest) GetEventName ¶
func (x *ChaincodeInstanceEventsStreamRequest) GetEventName() []string
func (*ChaincodeInstanceEventsStreamRequest) GetFromBlock ¶
func (x *ChaincodeInstanceEventsStreamRequest) GetFromBlock() *BlockLimit
func (*ChaincodeInstanceEventsStreamRequest) GetToBlock ¶
func (x *ChaincodeInstanceEventsStreamRequest) GetToBlock() *BlockLimit
func (*ChaincodeInstanceEventsStreamRequest) ProtoMessage ¶
func (*ChaincodeInstanceEventsStreamRequest) ProtoMessage()
func (*ChaincodeInstanceEventsStreamRequest) ProtoReflect ¶
func (x *ChaincodeInstanceEventsStreamRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeInstanceEventsStreamRequest) Reset ¶
func (x *ChaincodeInstanceEventsStreamRequest) Reset()
func (*ChaincodeInstanceEventsStreamRequest) String ¶
func (x *ChaincodeInstanceEventsStreamRequest) String() string
func (*ChaincodeInstanceEventsStreamRequest) Validate ¶
func (this *ChaincodeInstanceEventsStreamRequest) Validate() error
type ChaincodeInstanceExecRequest ¶
type ChaincodeInstanceExecRequest struct { Type InvocationType `protobuf:"varint,1,opt,name=type,proto3,enum=cckit.gateway.InvocationType" json:"type,omitempty"` Input *ChaincodeInput `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` // contains filtered or unexported fields }
func (*ChaincodeInstanceExecRequest) Descriptor
deprecated
func (*ChaincodeInstanceExecRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeInstanceExecRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeInstanceExecRequest) GetInput ¶
func (x *ChaincodeInstanceExecRequest) GetInput() *ChaincodeInput
func (*ChaincodeInstanceExecRequest) GetType ¶
func (x *ChaincodeInstanceExecRequest) GetType() InvocationType
func (*ChaincodeInstanceExecRequest) ProtoMessage ¶
func (*ChaincodeInstanceExecRequest) ProtoMessage()
func (*ChaincodeInstanceExecRequest) ProtoReflect ¶
func (x *ChaincodeInstanceExecRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeInstanceExecRequest) Reset ¶
func (x *ChaincodeInstanceExecRequest) Reset()
func (*ChaincodeInstanceExecRequest) String ¶
func (x *ChaincodeInstanceExecRequest) String() string
func (*ChaincodeInstanceExecRequest) Validate ¶
func (this *ChaincodeInstanceExecRequest) Validate() error
type ChaincodeInstanceInvokeRequest ¶
type ChaincodeInstanceInvokeRequest struct { Input *ChaincodeInput `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // contains filtered or unexported fields }
func (*ChaincodeInstanceInvokeRequest) Descriptor
deprecated
func (*ChaincodeInstanceInvokeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeInstanceInvokeRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeInstanceInvokeRequest) GetInput ¶
func (x *ChaincodeInstanceInvokeRequest) GetInput() *ChaincodeInput
func (*ChaincodeInstanceInvokeRequest) ProtoMessage ¶
func (*ChaincodeInstanceInvokeRequest) ProtoMessage()
func (*ChaincodeInstanceInvokeRequest) ProtoReflect ¶
func (x *ChaincodeInstanceInvokeRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeInstanceInvokeRequest) Reset ¶
func (x *ChaincodeInstanceInvokeRequest) Reset()
func (*ChaincodeInstanceInvokeRequest) String ¶
func (x *ChaincodeInstanceInvokeRequest) String() string
func (*ChaincodeInstanceInvokeRequest) Validate ¶
func (this *ChaincodeInstanceInvokeRequest) Validate() error
type ChaincodeInstanceInvoker ¶
type ChaincodeInstanceInvoker interface { Query(ctx context.Context, fn string, args []interface{}, target interface{}) (interface{}, error) Invoke(ctx context.Context, fn string, args []interface{}, target interface{}) (interface{}, error) }
ChaincodeInvoker used in generated service gateway code
type ChaincodeInstanceQueryRequest ¶
type ChaincodeInstanceQueryRequest struct { Input *ChaincodeInput `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` // contains filtered or unexported fields }
func (*ChaincodeInstanceQueryRequest) Descriptor
deprecated
func (*ChaincodeInstanceQueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeInstanceQueryRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeInstanceQueryRequest) GetInput ¶
func (x *ChaincodeInstanceQueryRequest) GetInput() *ChaincodeInput
func (*ChaincodeInstanceQueryRequest) ProtoMessage ¶
func (*ChaincodeInstanceQueryRequest) ProtoMessage()
func (*ChaincodeInstanceQueryRequest) ProtoReflect ¶
func (x *ChaincodeInstanceQueryRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeInstanceQueryRequest) Reset ¶
func (x *ChaincodeInstanceQueryRequest) Reset()
func (*ChaincodeInstanceQueryRequest) String ¶
func (x *ChaincodeInstanceQueryRequest) String() string
func (*ChaincodeInstanceQueryRequest) Validate ¶
func (this *ChaincodeInstanceQueryRequest) Validate() error
type ChaincodeInstanceService ¶
type ChaincodeInstanceService struct { SDK sdk.SDK Locator *ChaincodeLocator Opts *Opts }
func NewChaincodeInstanceService ¶
func NewChaincodeInstanceService(sdk sdk.SDK, locator *ChaincodeLocator, opts ...Opt) *ChaincodeInstanceService
func (*ChaincodeInstanceService) EventService ¶
func (cis *ChaincodeInstanceService) EventService() *ChaincodeInstanceEventService
func (*ChaincodeInstanceService) Events ¶
func (cis *ChaincodeInstanceService) Events( ctx context.Context, req *ChaincodeInstanceEventsRequest) (*ChaincodeEvents, error)
func (*ChaincodeInstanceService) EventsChan ¶
func (cis *ChaincodeInstanceService) EventsChan( ctx context.Context, rr ...*ChaincodeInstanceEventsStreamRequest) (_ chan *ChaincodeEvent, closer func() error, _ error)
func (*ChaincodeInstanceService) EventsStream ¶
func (cis *ChaincodeInstanceService) EventsStream( req *ChaincodeInstanceEventsStreamRequest, stream ChaincodeInstanceService_EventsStreamServer) error
func (*ChaincodeInstanceService) Exec ¶
func (cis *ChaincodeInstanceService) Exec(ctx context.Context, req *ChaincodeInstanceExecRequest) (*peer.Response, error)
func (*ChaincodeInstanceService) Invoke ¶
func (cis *ChaincodeInstanceService) Invoke(ctx context.Context, req *ChaincodeInstanceInvokeRequest) (*peer.Response, error)
func (*ChaincodeInstanceService) Query ¶
func (cis *ChaincodeInstanceService) Query(ctx context.Context, req *ChaincodeInstanceQueryRequest) (*peer.Response, error)
func (*ChaincodeInstanceService) ServiceDef ¶
func (cis *ChaincodeInstanceService) ServiceDef() ServiceDef
type ChaincodeInstanceServiceClient ¶
type ChaincodeInstanceServiceClient interface { // Exec: Query or Invoke Exec(ctx context.Context, in *ChaincodeInstanceExecRequest, opts ...grpc.CallOption) (*peer.Response, error) // Query chaincode on home peer. Do NOT send to orderer. Query(ctx context.Context, in *ChaincodeInstanceQueryRequest, opts ...grpc.CallOption) (*peer.Response, error) // Invoke chaincode on peers, according to endorsement policy and the SEND to orderer Invoke(ctx context.Context, in *ChaincodeInstanceInvokeRequest, opts ...grpc.CallOption) (*peer.Response, error) // Chaincode events stream EventsStream(ctx context.Context, in *ChaincodeInstanceEventsStreamRequest, opts ...grpc.CallOption) (ChaincodeInstanceService_EventsStreamClient, error) // Chaincode events Events(ctx context.Context, in *ChaincodeInstanceEventsRequest, opts ...grpc.CallOption) (*ChaincodeEvents, error) }
ChaincodeInstanceServiceClient is the client API for ChaincodeInstanceService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChaincodeInstanceServiceClient ¶
func NewChaincodeInstanceServiceClient(cc grpc.ClientConnInterface) ChaincodeInstanceServiceClient
type ChaincodeInstanceServiceInvoker ¶
type ChaincodeInstanceServiceInvoker struct { ChaincodeInstance ChaincodeInstanceServiceServer Serializer serialize.Serializer }
ChaincodeInvoker used in generated service gateway code
func NewChaincodeInstanceServiceInvoker ¶
func NewChaincodeInstanceServiceInvoker( ccInstance ChaincodeInstanceServiceServer, opts ...InvokerOpt) *ChaincodeInstanceServiceInvoker
NewChaincodeInstanceServiceInvoker
type ChaincodeInstanceServiceServer ¶
type ChaincodeInstanceServiceServer interface { // Exec: Query or Invoke Exec(context.Context, *ChaincodeInstanceExecRequest) (*peer.Response, error) // Query chaincode on home peer. Do NOT send to orderer. Query(context.Context, *ChaincodeInstanceQueryRequest) (*peer.Response, error) // Invoke chaincode on peers, according to endorsement policy and the SEND to orderer Invoke(context.Context, *ChaincodeInstanceInvokeRequest) (*peer.Response, error) // Chaincode events stream EventsStream(*ChaincodeInstanceEventsStreamRequest, ChaincodeInstanceService_EventsStreamServer) error // Chaincode events Events(context.Context, *ChaincodeInstanceEventsRequest) (*ChaincodeEvents, error) }
ChaincodeInstanceServiceServer is the server API for ChaincodeInstanceService service.
type ChaincodeInstanceService_EventsStreamClient ¶
type ChaincodeInstanceService_EventsStreamClient interface { Recv() (*ChaincodeEvent, error) grpc.ClientStream }
type ChaincodeInstanceService_EventsStreamServer ¶
type ChaincodeInstanceService_EventsStreamServer interface { Send(*ChaincodeEvent) error grpc.ServerStream }
type ChaincodeInvokeRequest ¶
type ChaincodeInvokeRequest struct { Locator *ChaincodeLocator `protobuf:"bytes,1,opt,name=locator,proto3" json:"locator,omitempty"` Input *ChaincodeInput `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` // contains filtered or unexported fields }
func (*ChaincodeInvokeRequest) Descriptor
deprecated
func (*ChaincodeInvokeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeInvokeRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeInvokeRequest) GetInput ¶
func (x *ChaincodeInvokeRequest) GetInput() *ChaincodeInput
func (*ChaincodeInvokeRequest) GetLocator ¶
func (x *ChaincodeInvokeRequest) GetLocator() *ChaincodeLocator
func (*ChaincodeInvokeRequest) ProtoMessage ¶
func (*ChaincodeInvokeRequest) ProtoMessage()
func (*ChaincodeInvokeRequest) ProtoReflect ¶
func (x *ChaincodeInvokeRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeInvokeRequest) Reset ¶
func (x *ChaincodeInvokeRequest) Reset()
func (*ChaincodeInvokeRequest) String ¶
func (x *ChaincodeInvokeRequest) String() string
func (*ChaincodeInvokeRequest) Validate ¶
func (this *ChaincodeInvokeRequest) Validate() error
type ChaincodeLocator ¶
type ChaincodeLocator struct { // Chaincode name Chaincode string `protobuf:"bytes,1,opt,name=chaincode,proto3" json:"chaincode,omitempty"` // Channel name Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` // contains filtered or unexported fields }
Chaincode locator - channel name and chaincode name
func (*ChaincodeLocator) Descriptor
deprecated
func (*ChaincodeLocator) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeLocator.ProtoReflect.Descriptor instead.
func (*ChaincodeLocator) GetChaincode ¶
func (x *ChaincodeLocator) GetChaincode() string
func (*ChaincodeLocator) GetChannel ¶
func (x *ChaincodeLocator) GetChannel() string
func (*ChaincodeLocator) ProtoMessage ¶
func (*ChaincodeLocator) ProtoMessage()
func (*ChaincodeLocator) ProtoReflect ¶
func (x *ChaincodeLocator) ProtoReflect() protoreflect.Message
func (*ChaincodeLocator) Reset ¶
func (x *ChaincodeLocator) Reset()
func (*ChaincodeLocator) String ¶
func (x *ChaincodeLocator) String() string
func (*ChaincodeLocator) Validate ¶
func (this *ChaincodeLocator) Validate() error
type ChaincodeLocatorResolver ¶
type ChaincodeLocatorResolver func(ctx router.Context, serviceName string) (*ChaincodeLocator, error)
type ChaincodeQueryRequest ¶
type ChaincodeQueryRequest struct { Locator *ChaincodeLocator `protobuf:"bytes,1,opt,name=locator,proto3" json:"locator,omitempty"` Input *ChaincodeInput `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` // contains filtered or unexported fields }
func (*ChaincodeQueryRequest) Descriptor
deprecated
func (*ChaincodeQueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChaincodeQueryRequest.ProtoReflect.Descriptor instead.
func (*ChaincodeQueryRequest) GetInput ¶
func (x *ChaincodeQueryRequest) GetInput() *ChaincodeInput
func (*ChaincodeQueryRequest) GetLocator ¶
func (x *ChaincodeQueryRequest) GetLocator() *ChaincodeLocator
func (*ChaincodeQueryRequest) ProtoMessage ¶
func (*ChaincodeQueryRequest) ProtoMessage()
func (*ChaincodeQueryRequest) ProtoReflect ¶
func (x *ChaincodeQueryRequest) ProtoReflect() protoreflect.Message
func (*ChaincodeQueryRequest) Reset ¶
func (x *ChaincodeQueryRequest) Reset()
func (*ChaincodeQueryRequest) String ¶
func (x *ChaincodeQueryRequest) String() string
func (*ChaincodeQueryRequest) Validate ¶
func (this *ChaincodeQueryRequest) Validate() error
type ChaincodeService ¶
type ChaincodeService struct { SDK sdk.SDK EventService *ChaincodeEventService }
func New
deprecated
func New(sdk sdk.SDK) *ChaincodeService
Deprecated: use NewChaincodeService instead
func NewChaincodeService ¶
func NewChaincodeService(sdk sdk.SDK) *ChaincodeService
func (*ChaincodeService) Events ¶
func (cs *ChaincodeService) Events(ctx context.Context, req *ChaincodeEventsRequest) (*ChaincodeEvents, error)
func (*ChaincodeService) EventsChan ¶
func (cs *ChaincodeService) EventsChan( ctx context.Context, req *ChaincodeEventsStreamRequest) (_ chan *ChaincodeEvent, closer func() error, _ error)
func (*ChaincodeService) EventsStream ¶
func (cs *ChaincodeService) EventsStream(req *ChaincodeEventsStreamRequest, stream ChaincodeService_EventsStreamServer) error
func (*ChaincodeService) Exec ¶
func (cs *ChaincodeService) Exec(ctx context.Context, req *ChaincodeExecRequest) (*peer.Response, error)
func (*ChaincodeService) InstanceService ¶
func (cs *ChaincodeService) InstanceService(locator *ChaincodeLocator, opts ...Opt) *ChaincodeInstanceService
InstanceService returns ChaincodeInstanceService for current Peer interface and provided channel and chaincode name
func (*ChaincodeService) Invoke ¶
func (cs *ChaincodeService) Invoke(ctx context.Context, req *ChaincodeInvokeRequest) (*peer.Response, error)
func (*ChaincodeService) Query ¶
func (cs *ChaincodeService) Query(ctx context.Context, req *ChaincodeQueryRequest) (*peer.Response, error)
func (*ChaincodeService) ServiceDef ¶
func (cs *ChaincodeService) ServiceDef() ServiceDef
ServiceDef returns service definition
type ChaincodeServiceClient ¶
type ChaincodeServiceClient interface { // Exec: Query or Invoke Exec(ctx context.Context, in *ChaincodeExecRequest, opts ...grpc.CallOption) (*peer.Response, error) // Query chaincode on home peer. Do NOT send to orderer. Query(ctx context.Context, in *ChaincodeQueryRequest, opts ...grpc.CallOption) (*peer.Response, error) // Invoke chaincode on peers, according to endorsement policy and the SEND to orderer Invoke(ctx context.Context, in *ChaincodeInvokeRequest, opts ...grpc.CallOption) (*peer.Response, error) // Chaincode events stream EventsStream(ctx context.Context, in *ChaincodeEventsStreamRequest, opts ...grpc.CallOption) (ChaincodeService_EventsStreamClient, error) // Chaincode events Events(ctx context.Context, in *ChaincodeEventsRequest, opts ...grpc.CallOption) (*ChaincodeEvents, error) }
ChaincodeServiceClient is the client API for ChaincodeService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewChaincodeServiceClient ¶
func NewChaincodeServiceClient(cc grpc.ClientConnInterface) ChaincodeServiceClient
type ChaincodeServiceServer ¶
type ChaincodeServiceServer interface { // Exec: Query or Invoke Exec(context.Context, *ChaincodeExecRequest) (*peer.Response, error) // Query chaincode on home peer. Do NOT send to orderer. Query(context.Context, *ChaincodeQueryRequest) (*peer.Response, error) // Invoke chaincode on peers, according to endorsement policy and the SEND to orderer Invoke(context.Context, *ChaincodeInvokeRequest) (*peer.Response, error) // Chaincode events stream EventsStream(*ChaincodeEventsStreamRequest, ChaincodeService_EventsStreamServer) error // Chaincode events Events(context.Context, *ChaincodeEventsRequest) (*ChaincodeEvents, error) }
ChaincodeServiceServer is the server API for ChaincodeService service.
type ChaincodeService_EventsStreamClient ¶
type ChaincodeService_EventsStreamClient interface { Recv() (*ChaincodeEvent, error) grpc.ClientStream }
type ChaincodeService_EventsStreamServer ¶
type ChaincodeService_EventsStreamServer interface { Send(*ChaincodeEvent) error grpc.ServerStream }
type ChaincodeStubInvoker ¶
type ChaincodeStubInvoker interface {
Query(stub shim.ChaincodeStubInterface, fn string, args []interface{}, target interface{}) (interface{}, error)
}
ChaincodeStubInvoker for cross chaincode calls - only query (read) methods context argument is router.Context, not context.Context
type EventOpt ¶
type EventOpt func(event *ChaincodeEvent) error
type InstanceOpts ¶
type InstanceOpts struct { Locator *ChaincodeLocator Opts Opts }
type InvocationType ¶
type InvocationType int32
Chaincode invocation type
const ( // Simulation InvocationType_INVOCATION_TYPE_QUERY InvocationType = 0 // Simulation and applying to ledger InvocationType_INVOCATION_TYPE_INVOKE InvocationType = 1 )
func (InvocationType) Descriptor ¶
func (InvocationType) Descriptor() protoreflect.EnumDescriptor
func (InvocationType) Enum ¶
func (x InvocationType) Enum() *InvocationType
func (InvocationType) EnumDescriptor
deprecated
func (InvocationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use InvocationType.Descriptor instead.
func (InvocationType) Number ¶
func (x InvocationType) Number() protoreflect.EnumNumber
func (InvocationType) String ¶
func (x InvocationType) String() string
func (InvocationType) Type ¶
func (InvocationType) Type() protoreflect.EnumType
type InvokerOpt ¶ added in v1.0.2
type InvokerOpt func(*ChaincodeInstanceServiceInvoker)
func WithInvokerSerializer ¶ added in v1.0.2
func WithInvokerSerializer(s serialize.Serializer) InvokerOpt
type LocatorChaincodeStubInvoker ¶
type LocatorChaincodeStubInvoker struct { Locator *ChaincodeLocator Serializer serialize.Serializer }
func (*LocatorChaincodeStubInvoker) Query ¶
func (c *LocatorChaincodeStubInvoker) Query( stub shim.ChaincodeStubInterface, fn string, args []interface{}, target interface{}) (interface{}, error)
type Opt ¶
type Opt func(*Opts)
func WithArgsEncryption ¶
func WithDefaultSigner ¶
func WithDefaultSigner(defaultSigner msp.SigningIdentity) Opt
func WithEncryption ¶
func WithEventDecryption ¶
func WithEventResolver ¶
func WithEventResolver(resolver mapping.EventResolver, fromBytesConverter serialize.FromBytesConverter) Opt
type Opts ¶
type Opts struct { Context []ContextOpt Input []InputOpt Output []OutputOpt Event []EventOpt }
type RawJson ¶
type RawJson struct { Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*RawJson) Descriptor
deprecated
func (*RawJson) MarshalJSON ¶
func (*RawJson) MarshalJSONPB ¶
func (*RawJson) ProtoMessage ¶
func (*RawJson) ProtoMessage()
func (*RawJson) ProtoReflect ¶
func (x *RawJson) ProtoReflect() protoreflect.Message
type ServiceDef ¶
type ServiceDef struct { Desc *grpc.ServiceDesc Service interface{} HandlerFromEndpointRegister RegisterHandlerFromEndpoint // contains filtered or unexported fields }
func NewServiceDef ¶
func NewServiceDef(name string, swagger []byte, desc *grpc.ServiceDesc, service interface{}, registerHandler RegisterHandlerFromEndpoint) ServiceDef
func (ServiceDef) GRPCDesc ¶
func (s ServiceDef) GRPCDesc() *grpc.ServiceDesc
func (ServiceDef) GRPCGatewayRegister ¶
func (s ServiceDef) GRPCGatewayRegister() func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
func (ServiceDef) Impl ¶
func (s ServiceDef) Impl() interface{}
func (ServiceDef) Name ¶
func (s ServiceDef) Name() string
func (ServiceDef) Swagger ¶
func (s ServiceDef) Swagger() []byte
type UnimplementedChaincodeEventsServiceServer ¶
type UnimplementedChaincodeEventsServiceServer struct { }
UnimplementedChaincodeEventsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedChaincodeEventsServiceServer) Events ¶
func (*UnimplementedChaincodeEventsServiceServer) Events(context.Context, *ChaincodeEventsRequest) (*ChaincodeEvents, error)
func (*UnimplementedChaincodeEventsServiceServer) EventsStream ¶
type UnimplementedChaincodeInstanceEventsServiceServer ¶
type UnimplementedChaincodeInstanceEventsServiceServer struct { }
UnimplementedChaincodeInstanceEventsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedChaincodeInstanceEventsServiceServer) EventsStream ¶
type UnimplementedChaincodeInstanceServiceServer ¶
type UnimplementedChaincodeInstanceServiceServer struct { }
UnimplementedChaincodeInstanceServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedChaincodeInstanceServiceServer) Events ¶
func (*UnimplementedChaincodeInstanceServiceServer) Events(context.Context, *ChaincodeInstanceEventsRequest) (*ChaincodeEvents, error)
func (*UnimplementedChaincodeInstanceServiceServer) EventsStream ¶
func (*UnimplementedChaincodeInstanceServiceServer) Exec ¶
func (*UnimplementedChaincodeInstanceServiceServer) Exec(context.Context, *ChaincodeInstanceExecRequest) (*peer.Response, error)
func (*UnimplementedChaincodeInstanceServiceServer) Invoke ¶
func (*UnimplementedChaincodeInstanceServiceServer) Invoke(context.Context, *ChaincodeInstanceInvokeRequest) (*peer.Response, error)
func (*UnimplementedChaincodeInstanceServiceServer) Query ¶
func (*UnimplementedChaincodeInstanceServiceServer) Query(context.Context, *ChaincodeInstanceQueryRequest) (*peer.Response, error)
type UnimplementedChaincodeServiceServer ¶
type UnimplementedChaincodeServiceServer struct { }
UnimplementedChaincodeServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedChaincodeServiceServer) Events ¶
func (*UnimplementedChaincodeServiceServer) Events(context.Context, *ChaincodeEventsRequest) (*ChaincodeEvents, error)
func (*UnimplementedChaincodeServiceServer) EventsStream ¶
func (*UnimplementedChaincodeServiceServer) EventsStream(*ChaincodeEventsStreamRequest, ChaincodeService_EventsStreamServer) error
func (*UnimplementedChaincodeServiceServer) Exec ¶
func (*UnimplementedChaincodeServiceServer) Exec(context.Context, *ChaincodeExecRequest) (*peer.Response, error)
func (*UnimplementedChaincodeServiceServer) Invoke ¶
func (*UnimplementedChaincodeServiceServer) Invoke(context.Context, *ChaincodeInvokeRequest) (*peer.Response, error)
func (*UnimplementedChaincodeServiceServer) Query ¶
func (*UnimplementedChaincodeServiceServer) Query(context.Context, *ChaincodeQueryRequest) (*peer.Response, error)
Source Files ¶
- api.go
- chaincode.pb.go
- chaincode.pb.gw.go
- chaincode.validator.pb.go
- chaincode_event_service.go
- chaincode_instance_event_service.go
- chaincode_instance_service.go
- chaincode_service.go
- context.go
- errors.go
- event_stream.go
- invoker_input_output.go
- invoker_instance.go
- invoker_stub.go
- opt.go
- raw_json.go
- service_def.go
Directories ¶
Path | Synopsis |
---|---|
Deprecated: use github.com/hyperledger-labs/cckit/gateway package
|
Deprecated: use github.com/hyperledger-labs/cckit/gateway package |