{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package scc\n\n## Types\n\n```go\ntype PluginConfig struct {\n\tEnabled           bool   `mapstructure:\"enabled\" yaml:\"enabled\"`\n\tName              string `mapstructure:\"name\" yaml:\"name\"`\n\tPath              string `mapstructure:\"path\" yaml:\"path\"`\n\tInvokableExternal bool   `mapstructure:\"invokableExternal\" yaml:\"invokableExternal\"`\n\tInvokableCC2CC    bool   `mapstructure:\"invokableCC2CC\" yaml:\"invokableCC2CC\"`\n}\n```\nPluginConfig SCC plugin configuration\n\n```go\ntype Provider struct {\n\tPeer        peer.Operations\n\tPeerSupport peer.Support\n\tRegistrar   Registrar\n\tSysCCs      []SelfDescribingSysCC\n}\n```\nProvider implements sysccprovider.SystemChaincodeProvider\n\n```go\nfunc NewProvider(pOps peer.Operations, pSup peer.Support, r Registrar) *Provider\n```\nNewProvider creates a new Provider instance\n\n```go\nfunc (p *Provider) DeDeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider)\n```\nDeDeploySysCCs is used in unit tests to stop and remove the system chaincodes before restarting them in the same process. This allows clean start of the system in the same process\n\n```go\nfunc (p *Provider) DeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider)\n```\nDeploySysCCs is the hook for system chaincodes where system chaincodes are registered with the fabric note the chaincode must still be deployed and launched like a user chaincode will be\n\n```go\nfunc (p *Provider) GetApplicationConfig(cid string) (channelconfig.Application, bool)\n```\nGetApplicationConfig returns the configtxapplication.SharedConfig for the channel and whether the Application config exists\n\n```go\nfunc (p *Provider) GetQueryExecutorForLedger(cid string) (ledger.QueryExecutor, error)\n```\nGetQueryExecutorForLedger returns a query executor for the specified channel\n\n```go\nfunc (p *Provider) IsSysCC(name string) bool\n```\nIsSysCC returns true if the supplied chaincode is a system chaincode\n\n```go\nfunc (p *Provider) IsSysCCAndNotInvokableCC2CC(name string) bool\n```\nIsSysCCAndNotInvokableCC2CC returns true if the chaincode is a system chaincode and \\*CANNOT\\* be invoked through a cc2cc invocation\n\n```go\nfunc (p *Provider) IsSysCCAndNotInvokableExternal(name string) bool\n```\nIsSysCCAndNotInvokableExternal returns true if the chaincode is a system chaincode and \\*CANNOT\\* be invoked through a proposal to this peer\n\n```go\nfunc (p *Provider) PolicyManager(channelID string) (policies.Manager, bool)\n```\nReturns the policy manager associated to the passed channel and whether the policy manager exists\n\n```go\nfunc (p *Provider) RegisterSysCC(scc SelfDescribingSysCC)\n```\nRegisterSysCC registers a system chaincode with the syscc provider.\n\n```go\ntype Registrar interface {\n\t// Register registers a system chaincode\n\tRegister(ccid *ccintf.CCID, cc shim.Chaincode) error\n}\n```\nRegistrar provides a way for system chaincodes to be registered\n\n```go\ntype SelfDescribingSysCC interface {\n\t//Unique name of the system chaincode\n\tName() string\n\n\t//Path to the system chaincode; currently not used\n\tPath() string\n\n\t//InitArgs initialization arguments to startup the system chaincode\n\tInitArgs() [][]byte\n\n\t// Chaincode returns the underlying chaincode\n\tChaincode() shim.Chaincode\n\n\t// InvokableExternal keeps track of whether\n\t// this system chaincode can be invoked\n\t// through a proposal sent to this peer\n\tInvokableExternal() bool\n\n\t// InvokableCC2CC keeps track of whether\n\t// this system chaincode can be invoked\n\t// by way of a chaincode-to-chaincode\n\t// invocation\n\tInvokableCC2CC() bool\n\n\t// Enabled a convenient switch to enable/disable system chaincode without\n\t// having to remove entry from importsysccs.go\n\tEnabled() bool\n}\n```\n\n```go\nfunc CreatePluginSysCCs(p *Provider) []SelfDescribingSysCC\n```\nCreatePluginSysCCs creates all of the system chaincodes which are compiled into fabric\n\n```go\ntype SysCCWrapper struct {\n\tSCC *SystemChaincode\n}\n```\n\n```go\nfunc (sccw *SysCCWrapper) Chaincode() shim.Chaincode\n```\n\n```go\nfunc (sccw *SysCCWrapper) Enabled() bool\n```\n\n```go\nfunc (sccw *SysCCWrapper) InitArgs() [][]byte\n```\n\n```go\nfunc (sccw *SysCCWrapper) InvokableCC2CC() bool\n```\n\n```go\nfunc (sccw *SysCCWrapper) InvokableExternal() bool\n```\n\n```go\nfunc (sccw *SysCCWrapper) Name() string\n```\n\n```go\nfunc (sccw *SysCCWrapper) Path() string\n```\n\n```go\ntype SystemChaincode struct {\n\t//Unique name of the system chaincode\n\tName string\n\n\t//Path to the system chaincode; currently not used\n\tPath string\n\n\t//InitArgs initialization arguments to startup the system chaincode\n\tInitArgs [][]byte\n\n\t// Chaincode holds the actual chaincode instance\n\tChaincode shim.Chaincode\n\n\t// InvokableExternal keeps track of whether\n\t// this system chaincode can be invoked\n\t// through a proposal sent to this peer\n\tInvokableExternal bool\n\n\t// InvokableCC2CC keeps track of whether\n\t// this system chaincode can be invoked\n\t// by way of a chaincode-to-chaincode\n\t// invocation\n\tInvokableCC2CC bool\n\n\t// Enabled a convenient switch to enable/disable system chaincode without\n\t// having to remove entry from importsysccs.go\n\tEnabled bool\n}\n```\nSystemChaincode defines the metadata needed to initialize system chaincode when the fabric comes up. SystemChaincodes are installed by adding an entry in importsysccs.go\n\n","path":"github.com/eric-erki/https-hyperledger.org/core/scc","name":"scc","synopsis":"","isRedistributable":true}
