3 Star 6 Fork 7

Gitee 极速下载/Hyperledger fabric

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/hyperledger/fabric
Clone or Download
plugin.go 981 Bytes
Copy Edit Raw Blame History
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package plugin
import validation "github.com/hyperledger/fabric/core/handlers/validation/api"
// Name defines the name of the plugin as it appears in the configuration
type Name string
// Mapper maps plugin names to their corresponding factory instance.
// Returns nil if the name isn't associated to any plugin.
type Mapper interface {
FactoryByName(name Name) validation.PluginFactory
}
// MapBasedMapper maps plugin names to their corresponding factories
type MapBasedMapper map[string]validation.PluginFactory
// FactoryByName returns a plugin factory for the given plugin name, or nil if not found
func (m MapBasedMapper) FactoryByName(name Name) validation.PluginFactory {
return m[string(name)]
}
// SerializedPolicy defines a marshaled policy
type SerializedPolicy []byte
// Bytes returns te bytes of the SerializedPolicy
func (sp SerializedPolicy) Bytes() []byte {
return sp
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/fabric.git
git@gitee.com:mirrors/fabric.git
mirrors
fabric
Hyperledger fabric
v2.0.0

Search