Documentation
¶
Overview ¶
Package service is a generated protocol buffer package.
It is generated from these files:
chaincode.proto
It has these top-level messages:
ChaincodeInput ChaincodeLocator
Package service is a generated protocol buffer package.
It is generated from these files:
chaincode.proto
It has these top-level messages:
ChaincodeInput ChaincodeLocator
Index ¶
- Constants
- Variables
- func ContextWithDefaultSigner(ctx context.Context, defaultSigner msp.SigningIdentity) context.Context
- func ContextWithSigner(ctx context.Context, signer msp.SigningIdentity) context.Context
- func RegisterChaincodeServer(s *grpc.Server, srv ChaincodeServer)
- func SignerFromContext(ctx context.Context) (msp.SigningIdentity, error)
- type Chaincode
- type ChaincodeClient
- type ChaincodeEventsServer
- type ChaincodeInput
- func (*ChaincodeInput) Descriptor() ([]byte, []int)
- func (m *ChaincodeInput) GetArgs() [][]byte
- func (m *ChaincodeInput) GetChaincode() string
- func (m *ChaincodeInput) GetChannel() string
- func (m *ChaincodeInput) GetTransient() map[string][]byte
- func (*ChaincodeInput) ProtoMessage()
- func (m *ChaincodeInput) Reset()
- func (m *ChaincodeInput) String() string
- func (this *ChaincodeInput) Validate() error
- type ChaincodeLocator
- func (*ChaincodeLocator) Descriptor() ([]byte, []int)
- func (m *ChaincodeLocator) GetChaincode() string
- func (m *ChaincodeLocator) GetChannel() string
- func (*ChaincodeLocator) ProtoMessage()
- func (m *ChaincodeLocator) Reset()
- func (m *ChaincodeLocator) String() string
- func (this *ChaincodeLocator) Validate() error
- type ChaincodeServer
- type ChaincodeService
- func (cs *ChaincodeService) Events(in *ChaincodeLocator, stream Chaincode_EventsServer) error
- func (cs *ChaincodeService) Invoke(ctx context.Context, in *ChaincodeInput) (*peer.ProposalResponse, error)
- func (cs *ChaincodeService) Query(ctx context.Context, in *ChaincodeInput) (*peer.ProposalResponse, error)
- type Chaincode_EventsClient
- type Chaincode_EventsServer
Constants ¶
View Source
const CtxSignerKey = `SigningIdentity`
Variables ¶
View Source
var ( // ErrChaincodeNotExists occurs when attempting to invoke a nonexostent external chaincode ErrChaincodeNotExists = errors.New(`chaincode not exists`) ErrSignerNotDefinedInContext = errors.New(`signer is not defined in context`) )
Functions ¶
func ContextWithSigner ¶
func RegisterChaincodeServer ¶
func RegisterChaincodeServer(s *grpc.Server, srv ChaincodeServer)
func SignerFromContext ¶
func SignerFromContext(ctx context.Context) (msp.SigningIdentity, error)
Types ¶
type Chaincode ¶
type Chaincode = ChaincodeServer
type ChaincodeClient ¶
type ChaincodeClient interface {
// Query chaincode on home peer
Query(ctx context.Context, in *ChaincodeInput, opts ...grpc.CallOption) (*protos.ProposalResponse, error)
Invoke(ctx context.Context, in *ChaincodeInput, opts ...grpc.CallOption) (*protos.ProposalResponse, error)
Events(ctx context.Context, in *ChaincodeLocator, opts ...grpc.CallOption) (Chaincode_EventsClient, error)
}
func NewChaincodeClient ¶
func NewChaincodeClient(cc *grpc.ClientConn) ChaincodeClient
type ChaincodeEventsServer ¶
type ChaincodeEventsServer = chaincodeEventsServer
type ChaincodeInput ¶
type ChaincodeInput struct {
// Chaincode name
Chaincode string `protobuf:"bytes,1,opt,name=chaincode" json:"chaincode,omitempty"`
// Channel name
Channel string `protobuf:"bytes,2,opt,name=channel" json:"channel,omitempty"`
// Input contains the arguments for invocation.
Args [][]byte `protobuf:"bytes,3,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 `` /* 145-byte string literal not displayed */
}
func (*ChaincodeInput) Descriptor ¶
func (*ChaincodeInput) Descriptor() ([]byte, []int)
func (*ChaincodeInput) GetArgs ¶
func (m *ChaincodeInput) GetArgs() [][]byte
func (*ChaincodeInput) GetChaincode ¶
func (m *ChaincodeInput) GetChaincode() string
func (*ChaincodeInput) GetChannel ¶
func (m *ChaincodeInput) GetChannel() string
func (*ChaincodeInput) GetTransient ¶
func (m *ChaincodeInput) GetTransient() map[string][]byte
func (*ChaincodeInput) ProtoMessage ¶
func (*ChaincodeInput) ProtoMessage()
func (*ChaincodeInput) Reset ¶
func (m *ChaincodeInput) Reset()
func (*ChaincodeInput) String ¶
func (m *ChaincodeInput) String() string
func (*ChaincodeInput) Validate ¶
func (this *ChaincodeInput) Validate() error
type ChaincodeLocator ¶
type ChaincodeLocator struct {
// Chaincode name
Chaincode string `protobuf:"bytes,1,opt,name=chaincode" json:"chaincode,omitempty"`
// Channel name
Channel string `protobuf:"bytes,2,opt,name=channel" json:"channel,omitempty"`
}
func (*ChaincodeLocator) Descriptor ¶
func (*ChaincodeLocator) Descriptor() ([]byte, []int)
func (*ChaincodeLocator) GetChaincode ¶
func (m *ChaincodeLocator) GetChaincode() string
func (*ChaincodeLocator) GetChannel ¶
func (m *ChaincodeLocator) GetChannel() string
func (*ChaincodeLocator) ProtoMessage ¶
func (*ChaincodeLocator) ProtoMessage()
func (*ChaincodeLocator) Reset ¶
func (m *ChaincodeLocator) Reset()
func (*ChaincodeLocator) String ¶
func (m *ChaincodeLocator) String() string
func (*ChaincodeLocator) Validate ¶
func (this *ChaincodeLocator) Validate() error
type ChaincodeServer ¶
type ChaincodeServer interface {
// Query chaincode on home peer
Query(context.Context, *ChaincodeInput) (*protos.ProposalResponse, error)
Invoke(context.Context, *ChaincodeInput) (*protos.ProposalResponse, error)
Events(*ChaincodeLocator, Chaincode_EventsServer) error
}
type ChaincodeService ¶
type ChaincodeService struct {
// contains filtered or unexported fields
}
func New ¶
func New(sdk api.Core) *ChaincodeService
func (*ChaincodeService) Events ¶
func (cs *ChaincodeService) Events(in *ChaincodeLocator, stream Chaincode_EventsServer) error
func (*ChaincodeService) Invoke ¶
func (cs *ChaincodeService) Invoke(ctx context.Context, in *ChaincodeInput) (*peer.ProposalResponse, error)
func (*ChaincodeService) Query ¶
func (cs *ChaincodeService) Query(ctx context.Context, in *ChaincodeInput) (*peer.ProposalResponse, error)
type Chaincode_EventsClient ¶
type Chaincode_EventsClient interface {
Recv() (*protos1.ChaincodeEvent, error)
grpc.ClientStream
}
type Chaincode_EventsServer ¶
type Chaincode_EventsServer interface {
Send(*protos1.ChaincodeEvent) error
grpc.ServerStream
}
Click to show internal directories.
Click to hide internal directories.