Fetch the repository succeeded.
/*
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
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。