Documentation ¶
Index ¶
- func StringsToArgs(args []string) []interface{}
- type Chaincode
- type ChaincodeEndorse
- func (i *ChaincodeEndorse) Call() (*fabric.Envelope, error)
- func (i *ChaincodeEndorse) WithEndorsers(endorsers ...view.Identity)
- func (i *ChaincodeEndorse) WithEndorsersByMSPIDs(ds ...string)
- func (i *ChaincodeEndorse) WithEndorsersFromMyOrg()
- func (i *ChaincodeEndorse) WithSignerIdentity(identity view.Identity) *ChaincodeEndorse
- func (i *ChaincodeEndorse) WithTransientEntry(k string, v interface{})
- func (i *ChaincodeEndorse) WithTxID(txID fabric.TxID) *ChaincodeEndorse
- type ChaincodeInvocation
- type ChaincodeQuery
- func (i *ChaincodeQuery) Call() ([]byte, error)
- func (i *ChaincodeQuery) WithEndorsers(endorsers ...view.Identity)
- func (i *ChaincodeQuery) WithEndorsersByMSPIDs(ds ...string)
- func (i *ChaincodeQuery) WithEndorsersFromMyOrg()
- func (i *ChaincodeQuery) WithMatchEndorsementPolicy()
- func (i *ChaincodeQuery) WithSignerIdentity(identity view.Identity) *ChaincodeQuery
- func (i *ChaincodeQuery) WithTransientEntry(k string, v interface{})
- type Channel
- type EnclaveRegistry
- func (e *EnclaveRegistry) ChaincodeEncryptionKey(cid string) ([]byte, error)
- func (e *EnclaveRegistry) IsAvailable() (bool, error)
- func (e *EnclaveRegistry) IsPrivate(cid string) (bool, error)
- func (e *EnclaveRegistry) ListProvisionedEnclaves(cid string) ([]string, error)
- func (e *EnclaveRegistry) PeerEndpoints(cid string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringsToArgs ¶
func StringsToArgs(args []string) []interface{}
StringsToArgs converts a slice of strings into a slace of interface{}
Types ¶
type Chaincode ¶
type Chaincode struct { Channel *fabric.Channel EnclaveRegistry *EnclaveRegistry InvokerContract invokerContract EndorserContract endorserContract Signer view.Identity IdentityProvider identityProvider ID string }
Chaincode models a Fabric Private Chaincode
func NewChaincode ¶
func NewChaincode( ch *fabric.Channel, er *EnclaveRegistry, invoker invokerContract, endorser endorserContract, id view.Identity, ip identityProvider, cid string, ) *Chaincode
NewChaincode returns a new chaincode instance
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 an object that models an FPC invocation for the passed function and arguments
func (*Chaincode) Query ¶
func (c *Chaincode) Query(function string, args ...interface{}) *ChaincodeQuery
type ChaincodeEndorse ¶
type ChaincodeEndorse struct { *Chaincode // contains filtered or unexported fields }
ChaincodeEndorse models the endorsement of an FPC
func (*ChaincodeEndorse) Call ¶
func (i *ChaincodeEndorse) Call() (*fabric.Envelope, error)
Call invokes the chaincode and returns a Fabric envelope
func (*ChaincodeEndorse) WithEndorsers ¶
func (i *ChaincodeEndorse) WithEndorsers(endorsers ...view.Identity)
func (*ChaincodeEndorse) WithEndorsersByMSPIDs ¶
func (i *ChaincodeEndorse) WithEndorsersByMSPIDs(ds ...string)
func (*ChaincodeEndorse) WithEndorsersFromMyOrg ¶
func (i *ChaincodeEndorse) WithEndorsersFromMyOrg()
func (*ChaincodeEndorse) WithSignerIdentity ¶
func (i *ChaincodeEndorse) WithSignerIdentity(identity view.Identity) *ChaincodeEndorse
func (*ChaincodeEndorse) WithTransientEntry ¶
func (i *ChaincodeEndorse) WithTransientEntry(k string, v interface{})
func (*ChaincodeEndorse) WithTxID ¶
func (i *ChaincodeEndorse) WithTxID(txID fabric.TxID) *ChaincodeEndorse
type ChaincodeInvocation ¶
type ChaincodeInvocation struct { *Chaincode // contains filtered or unexported fields }
ChaincodeInvocation models the invocation of an FPC
func (*ChaincodeInvocation) Call ¶
func (i *ChaincodeInvocation) Call() ([]byte, error)
Call invokes the chaincode and returns the result
type ChaincodeQuery ¶
type ChaincodeQuery struct { *Chaincode // contains filtered or unexported fields }
ChaincodeQuery models the query of an FPC
func (*ChaincodeQuery) Call ¶
func (i *ChaincodeQuery) Call() ([]byte, error)
Call invokes the chaincode and returns the result
func (*ChaincodeQuery) WithEndorsers ¶
func (i *ChaincodeQuery) WithEndorsers(endorsers ...view.Identity)
func (*ChaincodeQuery) WithEndorsersByMSPIDs ¶
func (i *ChaincodeQuery) WithEndorsersByMSPIDs(ds ...string)
func (*ChaincodeQuery) WithEndorsersFromMyOrg ¶
func (i *ChaincodeQuery) WithEndorsersFromMyOrg()
func (*ChaincodeQuery) WithMatchEndorsementPolicy ¶ added in v0.2.0
func (i *ChaincodeQuery) WithMatchEndorsementPolicy()
func (*ChaincodeQuery) WithSignerIdentity ¶
func (i *ChaincodeQuery) WithSignerIdentity(identity view.Identity) *ChaincodeQuery
func (*ChaincodeQuery) WithTransientEntry ¶
func (i *ChaincodeQuery) WithTransientEntry(k string, v interface{})
type Channel ¶
type Channel struct { FabricNetworkService *fabric.NetworkService Channel *fabric.Channel ER *EnclaveRegistry }
Channel models a Fabric channel that supports invocation of a Fabric Private Chaincode
func GetChannel ¶
func GetChannel(sp view.ServiceProvider, network, channelName string) *Channel
GetChannel returns the channel for the passed network and channel name on which to invoke an FPC
func GetDefaultChannel ¶
func GetDefaultChannel(sp view.ServiceProvider) *Channel
GetDefaultChannel returns the default channel on which to invoke an FPC
func (*Channel) Chaincode ¶
Chaincode returns a wrapper around the Fabric Private Chaincode whose name is cid
func (*Channel) EnclaveRegistry ¶
func (p *Channel) EnclaveRegistry() *EnclaveRegistry
EnclaveRegistry returns the enclave registry for this channel
type EnclaveRegistry ¶
type EnclaveRegistry struct { FabricNetworkService *fabric.NetworkService Channel *fabric.Channel }
EnclaveRegistry models the enclave registry
func NewEnclaveRegistry ¶
func NewEnclaveRegistry(fns *fabric.NetworkService, ch *fabric.Channel) *EnclaveRegistry
NewEnclaveRegistry returns a new instance of the enclave registry
func (*EnclaveRegistry) ChaincodeEncryptionKey ¶
func (e *EnclaveRegistry) ChaincodeEncryptionKey(cid string) ([]byte, error)
ChaincodeEncryptionKey returns the encryption key to be used for the passed chaincode id
func (*EnclaveRegistry) IsAvailable ¶
func (e *EnclaveRegistry) IsAvailable() (bool, error)
func (*EnclaveRegistry) ListProvisionedEnclaves ¶
func (e *EnclaveRegistry) ListProvisionedEnclaves(cid string) ([]string, error)
ListProvisionedEnclaves returns the list of provisioned enclaves for the passed chaincode id
func (*EnclaveRegistry) PeerEndpoints ¶
func (e *EnclaveRegistry) PeerEndpoints(cid string) ([]string, error)
PeerEndpoints returns the peer endpoints to use when invoking chaincode cid