Documentation
¶
Index ¶
- Constants
- Variables
- func ContextWithTransientMap(ctx context.Context, transient map[string][]byte) context.Context
- func ContextWithTransientValue(ctx context.Context, key string, value []byte) context.Context
- func NewChaincode(service service.Chaincode, channelName, chaincodeName string, opts ...Opt) *chaincode
- func NewChaincodeClient(channelName, chaincodeName string, opts ...Opt) *chaincodeClient
- func TransientFromContext(ctx context.Context) (map[string][]byte, error)
- type Action
- type Chaincode
- type ChaincodeClient
- type ChaincodeEventServerStream
- func (s *ChaincodeEventServerStream) Close()
- func (s *ChaincodeEventServerStream) Context() context.Context
- func (s *ChaincodeEventServerStream) Events() <-chan *peer.ChaincodeEvent
- func (s *ChaincodeEventServerStream) Recv(e *peer.ChaincodeEvent) error
- func (s *ChaincodeEventServerStream) RecvMsg(m interface{}) error
- func (*ChaincodeEventServerStream) SendHeader(metadata.MD) error
- func (s *ChaincodeEventServerStream) SendMsg(m interface{}) (err error)
- func (*ChaincodeEventServerStream) SetHeader(metadata.MD) error
- func (*ChaincodeEventServerStream) SetTrailer(metadata.MD)
- type ChaincodeEventSub
- type ClientOpt
- type ContextOpt
- type EventOpt
- type InputOpt
- type Opt
- type OutputOpt
- type RegisterHandlerFromEndpoint
- type ServiceDef
Constants ¶
View Source
const CtxTransientKey = `TransientMap`
Variables ¶
View Source
var (
ErrEventChannelClosed = errors.New(`event channel is closed`)
)
Functions ¶
func ContextWithTransientMap ¶
func NewChaincode ¶
func NewChaincodeClient ¶ added in v0.6.0
Types ¶
type Chaincode ¶
type Chaincode 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) Events(ctx context.Context) (ChaincodeEventSub, error) }
Chaincode interface for work with chaincode
type ChaincodeClient ¶ added in v0.6.0
type ChaincodeClient interface {
Query(stub shim.ChaincodeStubInterface, fn string, args []interface{}, target interface{}) (interface{}, error)
}
type ChaincodeEventServerStream ¶
type ChaincodeEventServerStream struct {
// contains filtered or unexported fields
}
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 *peer.ChaincodeEvent
func (*ChaincodeEventServerStream) Recv ¶
func (s *ChaincodeEventServerStream) Recv(e *peer.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{}) (err error)
func (*ChaincodeEventServerStream) SetHeader ¶
func (*ChaincodeEventServerStream) SetHeader(metadata.MD) error
func (*ChaincodeEventServerStream) SetTrailer ¶
func (*ChaincodeEventServerStream) SetTrailer(metadata.MD)
type ChaincodeEventSub ¶
type ChaincodeEventSub interface { Context() context.Context Events() <-chan *peer.ChaincodeEvent Recv(*peer.ChaincodeEvent) error Close() }
type EventOpt ¶
type EventOpt func(event *peer.ChaincodeEvent) error
type Opt ¶
type Opt func(*chaincode)
func WithArgsEncryption ¶
func WithDefaultSigner ¶
func WithDefaultSigner(defaultSigner msp.SigningIdentity) Opt
func WithEncryption ¶
func WithEventDecryption ¶
func WithTransientValue ¶
type ServiceDef ¶
type ServiceDef struct { Desc *grpc.ServiceDesc Service interface{} HandlerFromEndpointRegister RegisterHandlerFromEndpoint }
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package service is a generated protocol buffer package.
|
Package service is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.