Documentation ¶
Index ¶
- func DiscoveredIdentities(d []DiscoveredPeer) []view.Identity
- func GetFabricNetworkNames(sp view2.ServiceProvider) []string
- type Block
- type Chaincode
- func (c *Chaincode) Discover() *ChaincodeDiscover
- func (c *Chaincode) Endorse(function string, args ...interface{}) *ChaincodeEndorse
- func (c *Chaincode) Invoke(function string, args ...interface{}) *ChaincodeInvocation
- func (c *Chaincode) IsAvailable() (bool, error)
- func (c *Chaincode) IsPrivate() bool
- func (c *Chaincode) Query(function string, args ...interface{}) *ChaincodeQuery
- func (c *Chaincode) Version() (string, error)
- type ChaincodeDiscover
- type ChaincodeEndorse
- func (i *ChaincodeEndorse) Call() (*Envelope, error)
- func (i *ChaincodeEndorse) WithContext(context context.Context) *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithEndorsersByMSPIDs(mspIDs ...string) *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithEndorsersFromMyOrg() *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithImplicitCollections(mspIDs ...string) *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithInvokerIdentity(id view.Identity) *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithNumRetries(numRetries uint) *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithRetrySleep(duration time.Duration) *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithTransientEntry(k string, v interface{}) *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithTxID(id TxID) *ChaincodeEndorse
- type ChaincodeInvocation
- func (i *ChaincodeInvocation) Call() (string, []byte, error)
- func (i *ChaincodeInvocation) WithContext(context context.Context) *ChaincodeInvocation
- func (i *ChaincodeInvocation) WithEndorsersByMSPIDs(mspIDs ...string) *ChaincodeInvocation
- func (i *ChaincodeInvocation) WithEndorsersFromMyOrg() *ChaincodeInvocation
- func (i *ChaincodeInvocation) WithInvokerIdentity(id view.Identity) *ChaincodeInvocation
- func (i *ChaincodeInvocation) WithNumRetries(numRetries uint) *ChaincodeInvocation
- func (i *ChaincodeInvocation) WithRetrySleep(duration time.Duration) *ChaincodeInvocation
- func (i *ChaincodeInvocation) WithTransientEntry(k string, v interface{}) *ChaincodeInvocation
- type ChaincodeQuery
- func (i *ChaincodeQuery) Call() ([]byte, error)
- func (i *ChaincodeQuery) WithContext(context context.Context) *ChaincodeQuery
- func (i *ChaincodeQuery) WithDiscoveredEndorsersByEndpoints(endpoints ...string) *ChaincodeQuery
- func (i *ChaincodeQuery) WithEndorsersByMSPIDs(mspIDs ...string) *ChaincodeQuery
- func (i *ChaincodeQuery) WithEndorsersFromMyOrg() *ChaincodeQuery
- func (i *ChaincodeQuery) WithInvokerIdentity(id view.Identity) *ChaincodeQuery
- func (i *ChaincodeQuery) WithMatchEndorsementPolicy() *ChaincodeQuery
- func (i *ChaincodeQuery) WithNumRetries(numRetries uint) *ChaincodeQuery
- func (i *ChaincodeQuery) WithRetrySleep(duration time.Duration) *ChaincodeQuery
- func (i *ChaincodeQuery) WithTransientEntry(k string, v interface{}) *ChaincodeQuery
- func (i *ChaincodeQuery) WithTxID(id TxID) *ChaincodeQuery
- type Channel
- func (c *Channel) Chaincode(name string) *Chaincode
- func (c *Channel) Committer() *Committer
- func (c *Channel) Delivery() *Delivery
- func (c *Channel) EnvelopeService() *EnvelopeService
- func (c *Channel) Finality() *Finality
- func (c *Channel) Ledger() *Ledger
- func (c *Channel) MSPManager() *MSPManager
- func (c *Channel) MetadataService() *MetadataService
- func (c *Channel) Name() string
- func (c *Channel) Vault() *Vault
- type Committer
- func (c *Committer) ProcessNamespace(nss ...string) error
- func (c *Committer) Status(txid string) (ValidationCode, []string, error)
- func (c *Committer) SubscribeTxStatusChanges(txID string, listener TxStatusChangeListener) error
- func (c *Committer) UnsubscribeTxStatusChanges(txID string, listener TxStatusChangeListener) error
- type ConfigService
- type Delivery
- type DeliveryCallback
- type DiscoveredPeer
- type Envelope
- func (e *Envelope) Bytes() ([]byte, error)
- func (e *Envelope) Creator() []byte
- func (e *Envelope) FromBytes(raw []byte) error
- func (e *Envelope) MarshalJSON() ([]byte, error)
- func (e *Envelope) Nonce() []byte
- func (e *Envelope) Results() []byte
- func (e *Envelope) String() string
- func (e *Envelope) TxID() string
- func (e *Envelope) UnmarshalJSON(raw []byte) error
- type EnvelopeService
- type EventListener
- type Finality
- type GetIdentityFunc
- type GetStateOpt
- type IdentityInfo
- type IdentityOption
- type IdentityOptions
- type IdentityProvider
- type Ledger
- type LocalMembership
- func (s *LocalMembership) AnonymousIdentity() view.Identity
- func (s *LocalMembership) DefaultIdentity() view.Identity
- func (s *LocalMembership) DefaultSigningIdentity() SigningIdentity
- func (s *LocalMembership) GetIdentityByID(id string) (view.Identity, error)
- func (s *LocalMembership) GetIdentityInfoByIdentity(mspType string, id view.Identity) *IdentityInfo
- func (s *LocalMembership) GetIdentityInfoByLabel(mspType string, label string) *IdentityInfo
- func (s *LocalMembership) IsMe(id view.Identity) bool
- func (s *LocalMembership) Refresh() error
- func (s *LocalMembership) RegisterIdemixMSP(id string, path string, mspID string) error
- func (s *LocalMembership) RegisterX509MSP(id string, path string, mspID string) error
- type MSPManager
- type MetadataService
- type NetworkService
- func (n *NetworkService) Channel(id string) (*Channel, error)
- func (n *NetworkService) Channels() []string
- func (n *NetworkService) ConfigService() *ConfigService
- func (n *NetworkService) DefaultChannel() string
- func (n *NetworkService) IdentityProvider() *IdentityProvider
- func (n *NetworkService) LocalMembership() *LocalMembership
- func (n *NetworkService) Name() string
- func (n *NetworkService) Ordering() *Ordering
- func (n *NetworkService) Peers() []*grpc.ConnectionConfig
- func (n *NetworkService) ProcessorManager() *ProcessorManager
- func (n *NetworkService) SignerService() *SignerService
- func (n *NetworkService) TransactionManager() *TransactionManager
- type NetworkServiceProvider
- type Ordering
- type ProcessTransaction
- type ProcessedTransaction
- type Processor
- type ProcessorManager
- type Proposal
- type ProposalResponse
- func (r *ProposalResponse) Bytes() ([]byte, error)
- func (r *ProposalResponse) Endorser() []byte
- func (r *ProposalResponse) EndorserSignature() []byte
- func (r *ProposalResponse) Payload() []byte
- func (r *ProposalResponse) ResponseMessage() string
- func (r *ProposalResponse) ResponseStatus() int32
- func (r *ProposalResponse) Results() []byte
- type QueryExecutor
- func (qe *QueryExecutor) Done()
- func (qe *QueryExecutor) GetState(namespace string, key string) ([]byte, error)
- func (qe *QueryExecutor) GetStateMetadata(namespace, key string) (map[string][]byte, uint64, uint64, error)
- func (qe *QueryExecutor) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (*ResultsIterator, error)
- type RWSet
- func (r *RWSet) AppendRWSet(raw []byte, nss ...string) error
- func (r *RWSet) Bytes() ([]byte, error)
- func (r *RWSet) Clear(ns string) error
- func (r *RWSet) DeleteState(namespace string, key string) error
- func (r *RWSet) Done()
- func (r *RWSet) Equals(rws interface{}, nss ...string) error
- func (r *RWSet) GetReadAt(ns string, i int) (string, []byte, error)
- func (r *RWSet) GetReadKeyAt(ns string, i int) (string, error)
- func (r *RWSet) GetState(namespace string, key string, opts ...GetStateOpt) ([]byte, error)
- func (r *RWSet) GetStateMetadata(namespace, key string, opts ...GetStateOpt) (map[string][]byte, error)
- func (r *RWSet) GetWriteAt(ns string, i int) (string, []byte, error)
- func (r *RWSet) IsValid() error
- func (r *RWSet) KeyExist(key string, ns string) (bool, error)
- func (r *RWSet) Namespaces() []string
- func (r *RWSet) NumReads(ns string) int
- func (r *RWSet) NumWrites(ns string) int
- func (r *RWSet) RWS() fdriver.RWSet
- func (r *RWSet) SetState(namespace string, key string, value []byte) error
- func (r *RWSet) SetStateMetadata(namespace, key string, metadata map[string][]byte) error
- type Read
- type Request
- type ResultsIterator
- type SeekEnd
- type SeekPos
- type SeekStart
- type SignedProposal
- type Signer
- type SignerService
- type SigningIdentity
- type Transaction
- func (t *Transaction) AppendParameter(p []byte)
- func (t *Transaction) AppendProposalResponse(response *ProposalResponse) error
- func (t *Transaction) Bytes() ([]byte, error)
- func (t *Transaction) BytesNoTransient() ([]byte, error)
- func (t *Transaction) Chaincode() string
- func (t *Transaction) ChaincodeVersion() string
- func (t *Transaction) Channel() string
- func (t *Transaction) Close()
- func (t *Transaction) Creator() view.Identity
- func (t *Transaction) Done() error
- func (t *Transaction) Endorse() error
- func (t *Transaction) EndorseProposal() error
- func (t *Transaction) EndorseProposalResponse() error
- func (t *Transaction) EndorseProposalResponseWithIdentity(identity view.Identity) error
- func (t *Transaction) EndorseProposalWithIdentity(identity view.Identity) error
- func (t *Transaction) EndorseWithIdentity(identity view.Identity) error
- func (t *Transaction) EndorseWithSigner(identity view.Identity, s Signer) error
- func (t *Transaction) Envelope() (*Envelope, error)
- func (t *Transaction) FabricNetworkService() *NetworkService
- func (t *Transaction) From(payload *Transaction) (err error)
- func (t *Transaction) Function() string
- func (t *Transaction) GetRWSet() (*RWSet, error)
- func (t *Transaction) ID() string
- func (t *Transaction) Network() string
- func (t *Transaction) Nonce() []byte
- func (t *Transaction) Parameters() [][]byte
- func (t *Transaction) Proposal() *Proposal
- func (t *Transaction) ProposalHasBeenEndorsedBy(party view.Identity) error
- func (t *Transaction) ProposalResponse() ([]byte, error)
- func (t *Transaction) ProposalResponses() []*ProposalResponse
- func (t *Transaction) RWS() *RWSet
- func (t *Transaction) Raw() ([]byte, error)
- func (t *Transaction) ResetTransient()
- func (t *Transaction) Results() ([]byte, error)
- func (t *Transaction) SetFromBytes(raw []byte) error
- func (t *Transaction) SetFromEnvelopeBytes(raw []byte) error
- func (t *Transaction) SetParameterAt(i int, p []byte) error
- func (t *Transaction) SetProposal(chaincode string, version string, function string, params ...string)
- func (t *Transaction) SetRWSet() error
- func (t *Transaction) SignedProposal() *SignedProposal
- func (t *Transaction) StoreTransient() error
- func (t *Transaction) Transient() TransientMap
- type TransactionManager
- func (t *TransactionManager) ComputeTxID(id *TxID) string
- func (t *TransactionManager) NewEnvelope() *Envelope
- func (t *TransactionManager) NewProposalResponseFromBytes(raw []byte) (*ProposalResponse, error)
- func (t *TransactionManager) NewTransaction(opts ...TransactionOption) (*Transaction, error)
- func (t *TransactionManager) NewTransactionFromBytes(raw []byte, opts ...TransactionOption) (*Transaction, error)
- type TransactionOption
- type TransactionOptions
- type TransientMap
- func (m TransientMap) Exists(key string) bool
- func (m TransientMap) Get(id string) []byte
- func (m TransientMap) GetState(key string, state interface{}) error
- func (m TransientMap) IsEmpty() bool
- func (m TransientMap) Set(key string, raw []byte) error
- func (m TransientMap) SetState(key string, state interface{}) error
- type TxID
- type TxIDEntry
- type TxIDIterator
- type TxStatusChangeListener
- type ValidationCode
- type Vault
- func (c *Vault) CommitTX(txid string, block uint64, indexInBloc int) error
- func (c *Vault) DiscardTx(txid string) error
- func (c *Vault) GetEphemeralRWSet(rwset []byte, namespaces ...string) (*RWSet, error)
- func (c *Vault) GetLastTxID() (string, error)
- func (c *Vault) GetRWSet(txid string, rwset []byte) (*RWSet, error)
- func (c *Vault) NewQueryExecutor() (*QueryExecutor, error)
- func (c *Vault) NewRWSet(txid string) (*RWSet, error)
- func (c *Vault) Status(txid string) (ValidationCode, []string, error)
- func (c *Vault) StoreEnvelope(id string, env []byte) error
- func (c *Vault) StoreTransaction(id string, raw []byte) error
- func (c *Vault) StoreTransient(id string, tm TransientMap) error
- func (c *Vault) TxIDIterator(pos interface{}) (*TxIDIterator, error)
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoveredIdentities ¶
func DiscoveredIdentities(d []DiscoveredPeer) []view.Identity
DiscoveredIdentities extract the identities of the discovered peers
func GetFabricNetworkNames ¶
func GetFabricNetworkNames(sp view2.ServiceProvider) []string
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block models a Fabric block
type Chaincode ¶
type Chaincode struct { EventListener *EventListener // contains filtered or unexported fields }
func (*Chaincode) Discover ¶
func (c *Chaincode) Discover() *ChaincodeDiscover
func (*Chaincode) Endorse ¶
func (c *Chaincode) Endorse(function string, args ...interface{}) *ChaincodeEndorse
func (*Chaincode) Invoke ¶
func (c *Chaincode) Invoke(function string, args ...interface{}) *ChaincodeInvocation
Invoke returns a chaincode invocation proxy struct for the passed function and arguments
func (*Chaincode) IsAvailable ¶
func (*Chaincode) Query ¶
func (c *Chaincode) Query(function string, args ...interface{}) *ChaincodeQuery
type ChaincodeDiscover ¶
type ChaincodeDiscover struct {
driver.ChaincodeDiscover
}
func (*ChaincodeDiscover) Call ¶
func (i *ChaincodeDiscover) Call() ([]DiscoveredPeer, error)
Call invokes discovery service and returns the discovered peers
func (*ChaincodeDiscover) WithFilterByMSPIDs ¶
func (i *ChaincodeDiscover) WithFilterByMSPIDs(mspIDs ...string) *ChaincodeDiscover
type ChaincodeEndorse ¶
type ChaincodeEndorse struct {
ChaincodeInvocation driver.ChaincodeInvocation
}
func (*ChaincodeEndorse) Call ¶
func (i *ChaincodeEndorse) Call() (*Envelope, error)
func (*ChaincodeEndorse) WithContext ¶ added in v0.3.0
func (i *ChaincodeEndorse) WithContext(context context.Context) *ChaincodeEndorse
func (*ChaincodeEndorse) WithEndorsersByMSPIDs ¶
func (i *ChaincodeEndorse) WithEndorsersByMSPIDs(mspIDs ...string) *ChaincodeEndorse
func (*ChaincodeEndorse) WithEndorsersFromMyOrg ¶
func (i *ChaincodeEndorse) WithEndorsersFromMyOrg() *ChaincodeEndorse
func (*ChaincodeEndorse) WithImplicitCollections ¶
func (i *ChaincodeEndorse) WithImplicitCollections(mspIDs ...string) *ChaincodeEndorse
func (*ChaincodeEndorse) WithInvokerIdentity ¶
func (i *ChaincodeEndorse) WithInvokerIdentity(id view.Identity) *ChaincodeEndorse
func (*ChaincodeEndorse) WithNumRetries ¶ added in v0.2.0
func (i *ChaincodeEndorse) WithNumRetries(numRetries uint) *ChaincodeEndorse
WithNumRetries sets the number of times the chaincode operation should be retried before returning a failure
func (*ChaincodeEndorse) WithRetrySleep ¶ added in v0.2.0
func (i *ChaincodeEndorse) WithRetrySleep(duration time.Duration) *ChaincodeEndorse
WithRetrySleep sets the time interval between each retry
func (*ChaincodeEndorse) WithTransientEntry ¶
func (i *ChaincodeEndorse) WithTransientEntry(k string, v interface{}) *ChaincodeEndorse
func (*ChaincodeEndorse) WithTxID ¶
func (i *ChaincodeEndorse) WithTxID(id TxID) *ChaincodeEndorse
type ChaincodeInvocation ¶
type ChaincodeInvocation struct {
driver.ChaincodeInvocation
}
func (*ChaincodeInvocation) Call ¶
func (i *ChaincodeInvocation) Call() (string, []byte, error)
Call invokes the chaincode function with the passed arguments, and any additional parameter set with the other functions on this struct. It no error occurs, it returns the transaction id and the response payload of the chaincode invocation.
func (*ChaincodeInvocation) WithContext ¶ added in v0.3.0
func (i *ChaincodeInvocation) WithContext(context context.Context) *ChaincodeInvocation
func (*ChaincodeInvocation) WithEndorsersByMSPIDs ¶
func (i *ChaincodeInvocation) WithEndorsersByMSPIDs(mspIDs ...string) *ChaincodeInvocation
func (*ChaincodeInvocation) WithEndorsersFromMyOrg ¶
func (i *ChaincodeInvocation) WithEndorsersFromMyOrg() *ChaincodeInvocation
func (*ChaincodeInvocation) WithInvokerIdentity ¶
func (i *ChaincodeInvocation) WithInvokerIdentity(id view.Identity) *ChaincodeInvocation
func (*ChaincodeInvocation) WithNumRetries ¶ added in v0.2.0
func (i *ChaincodeInvocation) WithNumRetries(numRetries uint) *ChaincodeInvocation
WithNumRetries sets the number of times the chaincode operation should be retried before returning a failure
func (*ChaincodeInvocation) WithRetrySleep ¶ added in v0.2.0
func (i *ChaincodeInvocation) WithRetrySleep(duration time.Duration) *ChaincodeInvocation
WithRetrySleep sets the time interval between each retry
func (*ChaincodeInvocation) WithTransientEntry ¶
func (i *ChaincodeInvocation) WithTransientEntry(k string, v interface{}) *ChaincodeInvocation
type ChaincodeQuery ¶
type ChaincodeQuery struct {
driver.ChaincodeInvocation
}
func (*ChaincodeQuery) Call ¶
func (i *ChaincodeQuery) Call() ([]byte, error)
func (*ChaincodeQuery) WithContext ¶ added in v0.3.0
func (i *ChaincodeQuery) WithContext(context context.Context) *ChaincodeQuery
func (*ChaincodeQuery) WithDiscoveredEndorsersByEndpoints ¶
func (i *ChaincodeQuery) WithDiscoveredEndorsersByEndpoints(endpoints ...string) *ChaincodeQuery
WithDiscoveredEndorsersByEndpoints sets the endpoints to be used to filter the result of discovery. Discovery is used to identify the chaincode's endorsers, if not set otherwise.
func (*ChaincodeQuery) WithEndorsersByMSPIDs ¶
func (i *ChaincodeQuery) WithEndorsersByMSPIDs(mspIDs ...string) *ChaincodeQuery
func (*ChaincodeQuery) WithEndorsersFromMyOrg ¶
func (i *ChaincodeQuery) WithEndorsersFromMyOrg() *ChaincodeQuery
func (*ChaincodeQuery) WithInvokerIdentity ¶
func (i *ChaincodeQuery) WithInvokerIdentity(id view.Identity) *ChaincodeQuery
func (*ChaincodeQuery) WithMatchEndorsementPolicy ¶ added in v0.2.0
func (i *ChaincodeQuery) WithMatchEndorsementPolicy() *ChaincodeQuery
WithMatchEndorsementPolicy enforces that the query is perfomed against a set of peers that satisfy the endorsement policy of the chaincode
func (*ChaincodeQuery) WithNumRetries ¶ added in v0.2.0
func (i *ChaincodeQuery) WithNumRetries(numRetries uint) *ChaincodeQuery
WithNumRetries sets the number of times the chaincode operation should be retried before returning a failure
func (*ChaincodeQuery) WithRetrySleep ¶ added in v0.2.0
func (i *ChaincodeQuery) WithRetrySleep(duration time.Duration) *ChaincodeQuery
WithRetrySleep sets the time interval between each retry
func (*ChaincodeQuery) WithTransientEntry ¶
func (i *ChaincodeQuery) WithTransientEntry(k string, v interface{}) *ChaincodeQuery
func (*ChaincodeQuery) WithTxID ¶
func (i *ChaincodeQuery) WithTxID(id TxID) *ChaincodeQuery
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func GetChannel ¶
func GetChannel(sp view2.ServiceProvider, network, channel string) *Channel
GetChannel returns the requested channel for the passed network
func GetDefaultChannel ¶
func GetDefaultChannel(sp view2.ServiceProvider) *Channel
GetDefaultChannel returns the default channel of the default fns
func NewChannel ¶
func NewChannel(sp view2.ServiceProvider, fns driver.FabricNetworkService, ch driver.Channel) *Channel
func (*Channel) EnvelopeService ¶
func (c *Channel) EnvelopeService() *EnvelopeService
func (*Channel) MSPManager ¶
func (c *Channel) MSPManager() *MSPManager
func (*Channel) MetadataService ¶
func (c *Channel) MetadataService() *MetadataService
type Committer ¶
type Committer struct {
// contains filtered or unexported fields
}
func NewCommitter ¶
func (*Committer) ProcessNamespace ¶
ProcessNamespace registers namespaces that will be committed even if the rwset is not known
func (*Committer) Status ¶
func (c *Committer) Status(txid string) (ValidationCode, []string, error)
Status returns a validation code this committer bind to the passed transaction id, plus a list of dependant transaction ids if they exist.
func (*Committer) SubscribeTxStatusChanges ¶
func (c *Committer) SubscribeTxStatusChanges(txID string, listener TxStatusChangeListener) error
SubscribeTxStatusChanges registers a listener for transaction status changes for the passed transaction id. If the transaction id is empty, the listener will be called for all transactions.
func (*Committer) UnsubscribeTxStatusChanges ¶
func (c *Committer) UnsubscribeTxStatusChanges(txID string, listener TxStatusChangeListener) error
UnsubscribeTxStatusChanges unregisters a listener for transaction status changes for the passed transaction id. If the transaction id is empty, the listener will be called for all transactions.
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
func (*ConfigService) GetString ¶
func (s *ConfigService) GetString(key string) string
type Delivery ¶
type Delivery struct {
// contains filtered or unexported fields
}
Delivery models the Fabric's delivery service
type DeliveryCallback ¶
type DeliveryCallback func(tx *ProcessedTransaction) (bool, error)
type DiscoveredPeer ¶
type DiscoveredPeer = driver.DiscoveredPeer
DiscoveredPeer contains the information of a discovered peer
type Envelope ¶
type Envelope struct {
// contains filtered or unexported fields
}
func (*Envelope) MarshalJSON ¶
func (*Envelope) UnmarshalJSON ¶
type EnvelopeService ¶
type EnvelopeService struct {
// contains filtered or unexported fields
}
func (*EnvelopeService) Exists ¶
func (m *EnvelopeService) Exists(txid string) bool
type EventListener ¶
type EventListener struct {
// contains filtered or unexported fields
}
EventListener models the parameters to use for chaincode listening.
func (*EventListener) ChaincodeEvents ¶
func (e *EventListener) ChaincodeEvents() (chan *committer.ChaincodeEvent, error)
ChaincodeEvents returns a channel from which chaincode events emitted by transaction functions in the specified chaincode can be read.
func (*EventListener) CloseChaincodeEvents ¶
func (e *EventListener) CloseChaincodeEvents() error
CloseChaincodeEvents closes the channel from which chaincode events are read.
func (*EventListener) OnReceive ¶
func (e *EventListener) OnReceive(event events.Event)
type GetIdentityFunc ¶
type GetIdentityFunc func(opts ...IdentityOption) (view.Identity, []byte, error)
type GetStateOpt ¶
type GetStateOpt int
const ( FromStorage GetStateOpt = iota FromIntermediate FromBoth )
type IdentityInfo ¶
type IdentityInfo struct { ID string EnrollmentID string GetIdentity GetIdentityFunc }
type IdentityOption ¶
type IdentityOption func(*IdentityOptions) error
func WithAuditInfo ¶
func WithAuditInfo(ai []byte) IdentityOption
func WithIdemixEIDExtension ¶
func WithIdemixEIDExtension() IdentityOption
type IdentityOptions ¶
func CompileIdentityOptions ¶
func CompileIdentityOptions(opts ...IdentityOption) (*IdentityOptions, error)
type IdentityProvider ¶
type IdentityProvider struct {
// contains filtered or unexported fields
}
func GetDefaultIdentityProvider ¶
func GetDefaultIdentityProvider(sp view2.ServiceProvider) *IdentityProvider
GetDefaultIdentityProvider returns the identity provider of the default fabric network service
func GetIdentityProvider ¶
func GetIdentityProvider(sp view2.ServiceProvider, network string) *IdentityProvider
GetIdentityProvider returns the identity provider for the passed network
func (*IdentityProvider) DefaultIdentity ¶
func (i *IdentityProvider) DefaultIdentity() view.Identity
type Ledger ¶
type Ledger struct {
// contains filtered or unexported fields
}
Ledger models the ledger stored at a remote Fabric peer
func (*Ledger) GetBlockByNumber ¶
GetBlockByNumber fetches a block by number
func (*Ledger) GetBlockNumberByTxID ¶
GetBlockNumberByTxID returns the number of the block where the passed transaction appears
func (*Ledger) GetTransactionByID ¶
func (l *Ledger) GetTransactionByID(txID string) (*ProcessedTransaction, error)
GetTransactionByID retrieves a transaction by id
type LocalMembership ¶
type LocalMembership struct {
// contains filtered or unexported fields
}
func GetDefaultLocalMembership ¶
func GetDefaultLocalMembership(sp view2.ServiceProvider) *LocalMembership
GetDefaultLocalMembership returns the local membership of the default fabric network service
func GetLocalMembership ¶
func GetLocalMembership(sp view2.ServiceProvider, network string) *LocalMembership
GetLocalMembership returns the local membership for the passed network
func (*LocalMembership) AnonymousIdentity ¶
func (s *LocalMembership) AnonymousIdentity() view.Identity
func (*LocalMembership) DefaultIdentity ¶
func (s *LocalMembership) DefaultIdentity() view.Identity
func (*LocalMembership) DefaultSigningIdentity ¶
func (s *LocalMembership) DefaultSigningIdentity() SigningIdentity
func (*LocalMembership) GetIdentityByID ¶
func (s *LocalMembership) GetIdentityByID(id string) (view.Identity, error)
func (*LocalMembership) GetIdentityInfoByIdentity ¶
func (s *LocalMembership) GetIdentityInfoByIdentity(mspType string, id view.Identity) *IdentityInfo
func (*LocalMembership) GetIdentityInfoByLabel ¶
func (s *LocalMembership) GetIdentityInfoByLabel(mspType string, label string) *IdentityInfo
func (*LocalMembership) Refresh ¶
func (s *LocalMembership) Refresh() error
func (*LocalMembership) RegisterIdemixMSP ¶
func (s *LocalMembership) RegisterIdemixMSP(id string, path string, mspID string) error
func (*LocalMembership) RegisterX509MSP ¶
func (s *LocalMembership) RegisterX509MSP(id string, path string, mspID string) error
type MSPManager ¶
type MSPManager struct {
// contains filtered or unexported fields
}
func (*MSPManager) GetMSPIDs ¶
func (c *MSPManager) GetMSPIDs() []string
func (*MSPManager) GetMSPIdentifier ¶
func (c *MSPManager) GetMSPIdentifier(sid []byte) (string, error)
func (*MSPManager) GetVerifier ¶
func (c *MSPManager) GetVerifier(identity view.Identity) (Verifier, error)
type MetadataService ¶
type MetadataService struct {
// contains filtered or unexported fields
}
func (*MetadataService) Exists ¶
func (m *MetadataService) Exists(txid string) bool
func (*MetadataService) LoadTransient ¶
func (m *MetadataService) LoadTransient(txid string) (TransientMap, error)
func (*MetadataService) StoreTransient ¶
func (m *MetadataService) StoreTransient(txid string, transientMap TransientMap) error
type NetworkService ¶
type NetworkService struct { SP view2.ServiceProvider // contains filtered or unexported fields }
NetworkService models a Fabric Network
func GetDefaultFNS ¶
func GetDefaultFNS(sp view2.ServiceProvider) *NetworkService
GetDefaultFNS returns the default Fabric Network Service
func GetFabricNetworkService ¶
func GetFabricNetworkService(sp view2.ServiceProvider, id string) *NetworkService
GetFabricNetworkService returns the Fabric Network Service for the passed id, nil if not found
func NewNetworkService ¶
func NewNetworkService(SP view2.ServiceProvider, fns driver.FabricNetworkService, name string) *NetworkService
func (*NetworkService) Channel ¶
func (n *NetworkService) Channel(id string) (*Channel, error)
Channel returns the channel service for the passed id
func (*NetworkService) Channels ¶
func (n *NetworkService) Channels() []string
Channels returns the channel names
func (*NetworkService) ConfigService ¶
func (n *NetworkService) ConfigService() *ConfigService
func (*NetworkService) DefaultChannel ¶
func (n *NetworkService) DefaultChannel() string
DefaultChannel returns the name of the default channel
func (*NetworkService) IdentityProvider ¶
func (n *NetworkService) IdentityProvider() *IdentityProvider
IdentityProvider returns the identity provider of this network
func (*NetworkService) LocalMembership ¶
func (n *NetworkService) LocalMembership() *LocalMembership
LocalMembership returns the local membership of this network
func (*NetworkService) Ordering ¶
func (n *NetworkService) Ordering() *Ordering
Ordering returns the list of known Orderer nodes
func (*NetworkService) Peers ¶
func (n *NetworkService) Peers() []*grpc.ConnectionConfig
Peers returns the list of known Peer nodes
func (*NetworkService) ProcessorManager ¶
func (n *NetworkService) ProcessorManager() *ProcessorManager
ProcessorManager returns the processor manager of this network
func (*NetworkService) SignerService ¶
func (n *NetworkService) SignerService() *SignerService
SignerService returns the signature service of this network
func (*NetworkService) TransactionManager ¶
func (n *NetworkService) TransactionManager() *TransactionManager
TransactionManager returns the transaction manager of this network
type NetworkServiceProvider ¶
type NetworkServiceProvider struct {
// contains filtered or unexported fields
}
func GetNetworkServiceProvider ¶
func GetNetworkServiceProvider(sp view2.ServiceProvider) *NetworkServiceProvider
func NewNetworkServiceProvider ¶
func NewNetworkServiceProvider(sp view2.ServiceProvider) *NetworkServiceProvider
func (*NetworkServiceProvider) FabricNetworkService ¶
func (nsp *NetworkServiceProvider) FabricNetworkService(id string) (*NetworkService, error)
type Ordering ¶
type Ordering struct {
// contains filtered or unexported fields
}
func (*Ordering) Orderers ¶
func (n *Ordering) Orderers() []*grpc.ConnectionConfig
Orderers returns the list of known Orderer nodes
type ProcessTransaction ¶
type ProcessedTransaction ¶
type ProcessedTransaction struct {
// contains filtered or unexported fields
}
ProcessedTransaction models a transaction that has been processed by Fabric
func (*ProcessedTransaction) Results ¶
func (pt *ProcessedTransaction) Results() []byte
Results returns the rwset marshaled
func (*ProcessedTransaction) TxID ¶
func (pt *ProcessedTransaction) TxID() string
TxID returns the transaction's id
func (*ProcessedTransaction) ValidationCode ¶
func (pt *ProcessedTransaction) ValidationCode() int32
ValidationCode of this transaction
type Processor ¶
type Processor interface {
Process(req Request, tx ProcessTransaction, rws *RWSet, ns string) error
}
type ProcessorManager ¶
type ProcessorManager struct {
// contains filtered or unexported fields
}
func (*ProcessorManager) AddChannelProcessor ¶
func (pm *ProcessorManager) AddChannelProcessor(channel, ns string, p Processor) error
func (*ProcessorManager) AddProcessor ¶
func (pm *ProcessorManager) AddProcessor(ns string, p Processor) error
func (*ProcessorManager) SetDefaultProcessor ¶
func (pm *ProcessorManager) SetDefaultProcessor(p Processor) error
type ProposalResponse ¶
type ProposalResponse struct {
// contains filtered or unexported fields
}
func (*ProposalResponse) Bytes ¶ added in v0.2.0
func (r *ProposalResponse) Bytes() ([]byte, error)
func (*ProposalResponse) Endorser ¶
func (r *ProposalResponse) Endorser() []byte
func (*ProposalResponse) EndorserSignature ¶
func (r *ProposalResponse) EndorserSignature() []byte
func (*ProposalResponse) Payload ¶
func (r *ProposalResponse) Payload() []byte
func (*ProposalResponse) ResponseMessage ¶
func (r *ProposalResponse) ResponseMessage() string
func (*ProposalResponse) ResponseStatus ¶
func (r *ProposalResponse) ResponseStatus() int32
func (*ProposalResponse) Results ¶
func (r *ProposalResponse) Results() []byte
type QueryExecutor ¶
type QueryExecutor struct {
// contains filtered or unexported fields
}
func (*QueryExecutor) Done ¶
func (qe *QueryExecutor) Done()
func (*QueryExecutor) GetState ¶
func (qe *QueryExecutor) GetState(namespace string, key string) ([]byte, error)
func (*QueryExecutor) GetStateMetadata ¶
func (*QueryExecutor) GetStateRangeScanIterator ¶
func (qe *QueryExecutor) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (*ResultsIterator, error)
type RWSet ¶
type RWSet struct {
// contains filtered or unexported fields
}
func (*RWSet) DeleteState ¶
DeleteState deletes the given namespace and key
func (*RWSet) GetReadAt ¶
GetReadAt returns the i-th read (key, value) in the namespace ns of this rwset. The value is loaded from the ledger, if present. If the key's version in the ledger does not match the key's version in the read, then it returns an error.
func (*RWSet) GetStateMetadata ¶
func (*RWSet) GetWriteAt ¶
GetWriteAt returns the i-th write (key, value) in the namespace ns of this rwset.
func (*RWSet) Namespaces ¶
Namespaces returns the namespace labels in this rwset.
type Read ¶
type Read driver.VersionedRead
type ResultsIterator ¶
type ResultsIterator struct {
// contains filtered or unexported fields
}
ResultsIterator models an query result iterator
func (*ResultsIterator) Close ¶
func (r *ResultsIterator) Close()
Close releases resources occupied by the iterator
func (*ResultsIterator) Next ¶
func (r *ResultsIterator) Next() (*Read, error)
Next returns the next item in the result set. The `QueryResult` is expected to be nil when the iterator gets exhausted
type SignedProposal ¶
type SignedProposal struct {
// contains filtered or unexported fields
}
func (*SignedProposal) ChaincodeName ¶
func (p *SignedProposal) ChaincodeName() string
func (*SignedProposal) ChaincodeVersion ¶
func (p *SignedProposal) ChaincodeVersion() string
func (*SignedProposal) ProposalBytes ¶
func (p *SignedProposal) ProposalBytes() []byte
func (*SignedProposal) ProposalHash ¶
func (p *SignedProposal) ProposalHash() []byte
func (*SignedProposal) Signature ¶
func (p *SignedProposal) Signature() []byte
type SignerService ¶
type SignerService struct {
// contains filtered or unexported fields
}
type SigningIdentity ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) AppendParameter ¶
func (t *Transaction) AppendParameter(p []byte)
func (*Transaction) AppendProposalResponse ¶
func (t *Transaction) AppendProposalResponse(response *ProposalResponse) error
func (*Transaction) Bytes ¶
func (t *Transaction) Bytes() ([]byte, error)
func (*Transaction) BytesNoTransient ¶
func (t *Transaction) BytesNoTransient() ([]byte, error)
func (*Transaction) Chaincode ¶
func (t *Transaction) Chaincode() string
func (*Transaction) ChaincodeVersion ¶
func (t *Transaction) ChaincodeVersion() string
func (*Transaction) Channel ¶
func (t *Transaction) Channel() string
func (*Transaction) Close ¶
func (t *Transaction) Close()
func (*Transaction) Creator ¶
func (t *Transaction) Creator() view.Identity
func (*Transaction) Done ¶
func (t *Transaction) Done() error
func (*Transaction) Endorse ¶
func (t *Transaction) Endorse() error
func (*Transaction) EndorseProposal ¶
func (t *Transaction) EndorseProposal() error
func (*Transaction) EndorseProposalResponse ¶
func (t *Transaction) EndorseProposalResponse() error
func (*Transaction) EndorseProposalResponseWithIdentity ¶
func (t *Transaction) EndorseProposalResponseWithIdentity(identity view.Identity) error
func (*Transaction) EndorseProposalWithIdentity ¶
func (t *Transaction) EndorseProposalWithIdentity(identity view.Identity) error
func (*Transaction) EndorseWithIdentity ¶
func (t *Transaction) EndorseWithIdentity(identity view.Identity) error
func (*Transaction) EndorseWithSigner ¶
func (t *Transaction) EndorseWithSigner(identity view.Identity, s Signer) error
func (*Transaction) Envelope ¶ added in v0.2.0
func (t *Transaction) Envelope() (*Envelope, error)
func (*Transaction) FabricNetworkService ¶
func (t *Transaction) FabricNetworkService() *NetworkService
func (*Transaction) From ¶
func (t *Transaction) From(payload *Transaction) (err error)
func (*Transaction) Function ¶
func (t *Transaction) Function() string
func (*Transaction) GetRWSet ¶
func (t *Transaction) GetRWSet() (*RWSet, error)
func (*Transaction) ID ¶
func (t *Transaction) ID() string
func (*Transaction) Network ¶
func (t *Transaction) Network() string
func (*Transaction) Nonce ¶
func (t *Transaction) Nonce() []byte
func (*Transaction) Parameters ¶
func (t *Transaction) Parameters() [][]byte
func (*Transaction) Proposal ¶
func (t *Transaction) Proposal() *Proposal
func (*Transaction) ProposalHasBeenEndorsedBy ¶
func (t *Transaction) ProposalHasBeenEndorsedBy(party view.Identity) error
func (*Transaction) ProposalResponse ¶
func (t *Transaction) ProposalResponse() ([]byte, error)
func (*Transaction) ProposalResponses ¶
func (t *Transaction) ProposalResponses() []*ProposalResponse
func (*Transaction) RWS ¶
func (t *Transaction) RWS() *RWSet
func (*Transaction) Raw ¶
func (t *Transaction) Raw() ([]byte, error)
func (*Transaction) ResetTransient ¶
func (t *Transaction) ResetTransient()
func (*Transaction) Results ¶
func (t *Transaction) Results() ([]byte, error)
func (*Transaction) SetFromBytes ¶
func (t *Transaction) SetFromBytes(raw []byte) error
func (*Transaction) SetFromEnvelopeBytes ¶
func (t *Transaction) SetFromEnvelopeBytes(raw []byte) error
func (*Transaction) SetParameterAt ¶
func (t *Transaction) SetParameterAt(i int, p []byte) error
func (*Transaction) SetProposal ¶
func (t *Transaction) SetProposal(chaincode string, version string, function string, params ...string)
func (*Transaction) SetRWSet ¶
func (t *Transaction) SetRWSet() error
func (*Transaction) SignedProposal ¶
func (t *Transaction) SignedProposal() *SignedProposal
func (*Transaction) StoreTransient ¶
func (t *Transaction) StoreTransient() error
func (*Transaction) Transient ¶
func (t *Transaction) Transient() TransientMap
type TransactionManager ¶
type TransactionManager struct {
// contains filtered or unexported fields
}
func (*TransactionManager) ComputeTxID ¶
func (t *TransactionManager) ComputeTxID(id *TxID) string
func (*TransactionManager) NewEnvelope ¶
func (t *TransactionManager) NewEnvelope() *Envelope
func (*TransactionManager) NewProposalResponseFromBytes ¶
func (t *TransactionManager) NewProposalResponseFromBytes(raw []byte) (*ProposalResponse, error)
func (*TransactionManager) NewTransaction ¶
func (t *TransactionManager) NewTransaction(opts ...TransactionOption) (*Transaction, error)
func (*TransactionManager) NewTransactionFromBytes ¶
func (t *TransactionManager) NewTransactionFromBytes(raw []byte, opts ...TransactionOption) (*Transaction, error)
type TransactionOption ¶
type TransactionOption func(*TransactionOptions) error
func WithChannel ¶
func WithChannel(channel string) TransactionOption
func WithCreator ¶
func WithCreator(creator view.Identity) TransactionOption
func WithNonce ¶
func WithNonce(nonce []byte) TransactionOption
func WithTxID ¶
func WithTxID(txid string) TransactionOption
type TransactionOptions ¶
func CompileTransactionOptions ¶ added in v0.2.0
func CompileTransactionOptions(opts ...TransactionOption) (*TransactionOptions, error)
type TransientMap ¶
func (TransientMap) Exists ¶
func (m TransientMap) Exists(key string) bool
func (TransientMap) Get ¶
func (m TransientMap) Get(id string) []byte
func (TransientMap) GetState ¶
func (m TransientMap) GetState(key string, state interface{}) error
func (TransientMap) IsEmpty ¶
func (m TransientMap) IsEmpty() bool
func (TransientMap) SetState ¶
func (m TransientMap) SetState(key string, state interface{}) error
type TxIDEntry ¶
type TxIDEntry struct { Txid string Code ValidationCode }
type TxIDIterator ¶
type TxIDIterator struct {
fdriver.TxidIterator
}
func (*TxIDIterator) Close ¶
func (t *TxIDIterator) Close()
func (*TxIDIterator) Next ¶
func (t *TxIDIterator) Next() (*TxIDEntry, error)
type TxStatusChangeListener ¶
type TxStatusChangeListener interface { // OnStatusChange is called when the status of a transaction changes OnStatusChange(txID string, status int) error }
TxStatusChangeListener is the interface that must be implemented to receive transaction status change notifications
type ValidationCode ¶
type ValidationCode int
const ( Valid ValidationCode // Transaction is valid and committed Invalid // Transaction is invalid and has been discarded Busy // Transaction does not yet have a validity state Unknown // Transaction is unknown HasDependencies // Transaction is unknown but has known dependencies )
type Vault ¶
type Vault struct {
// contains filtered or unexported fields
}
Vault models a key-value store that can be updated by committing rwsets
func GetVault ¶
func GetVault(sp view2.ServiceProvider, network, channel string) *Vault
GetVault returns the vualt for the requested channel for the passed network
func (*Vault) GetEphemeralRWSet ¶
GetEphemeralRWSet returns an ephemeral RWSet for this ledger whose content is unmarshalled from the passed bytes. If namespaces is not empty, the returned RWSet will be filtered by the passed namespaces
func (*Vault) GetLastTxID ¶
GetLastTxID returns the last transaction id committed
func (*Vault) GetRWSet ¶
GetRWSet returns a RWSet for this ledger whose content is unmarshalled from the passed bytes. A client may obtain more than one such simulator; they are made unique by way of the supplied txid
func (*Vault) NewQueryExecutor ¶
func (c *Vault) NewQueryExecutor() (*QueryExecutor, error)
NewQueryExecutor gives handle to a query executor. A client can obtain more than one 'QueryExecutor's for parallel execution. Any synchronization should be performed at the implementation level if required
func (*Vault) NewRWSet ¶
NewRWSet returns a RWSet for this ledger. A client may obtain more than one such simulator; they are made unique by way of the supplied txid
func (*Vault) StoreTransient ¶
func (c *Vault) StoreTransient(id string, tm TransientMap) error
func (*Vault) TxIDIterator ¶
func (c *Vault) TxIDIterator(pos interface{}) (*TxIDIterator, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
generic/msp/mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
generic/vault/mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
services
|
|
state/cc/query
Module
|