Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelConfigGetter ¶
type ChannelConfigGetter interface { //getchannelconfig返回通道配置的资源 GetChannelConfig(cid string) channelconfig.Resources }
channelconfiggetter允许检索频道配置资源
type ChannelConfigGetterFunc ¶
type ChannelConfigGetterFunc func(cid string) channelconfig.Resources
channelconfiggetterfunc返回通道配置的资源
func (ChannelConfigGetterFunc) GetChannelConfig ¶
func (f ChannelConfigGetterFunc) GetChannelConfig(cid string) channelconfig.Resources
getchannelconfig返回通道配置的资源
type ChannelPolicyManagerGetter ¶
type ChannelPolicyManagerGetter interface { //返回与传递的通道关联的策略管理器 //如果是经理请求的,则为true;如果是默认经理,则为false。 Manager(channelID string) (policies.Manager, bool) }
ChannelPolicyManagerGetter是一个支持接口 访问给定通道的策略管理器
type ChannelVerifier ¶
type ChannelVerifier struct { policies.ChannelPolicyManagerGetter Policy string }
ChannelVerifier在通道上下文中验证签名和消息
func NewChannelVerifier ¶
func NewChannelVerifier(policy string, polMgr policies.ChannelPolicyManagerGetter) *ChannelVerifier
NewChannelVerifier从给定的策略和策略管理器getter返回新的通道验证程序
func (*ChannelVerifier) VerifyByChannel ¶
func (cv *ChannelVerifier) VerifyByChannel(channel string, sd *cb.SignedData) error
VerifyByChannel检查签名是否为消息的有效签名 在对等机的验证密钥下,也在特定通道的上下文中。 如果验证成功,则verify返回nil,表示没有发生错误。 如果peerIdentity为零,则验证失败。
type DiscoverySupport ¶
type DiscoverySupport struct { ChannelConfigGetter Verifier Evaluator }
DiscoverySupport实现用于服务发现的支持 与访问控制有关
func NewDiscoverySupport ¶
func NewDiscoverySupport(v Verifier, e Evaluator, chanConf ChannelConfigGetter) *DiscoverySupport
新建DiscoverySupport创建新的DiscoverySupport
func (*DiscoverySupport) ConfigSequence ¶
func (s *DiscoverySupport) ConfigSequence(channel string) uint64
configSequence返回给定通道的配置序列
func (*DiscoverySupport) EligibleForService ¶
func (s *DiscoverySupport) EligibleForService(channel string, data cb.SignedData) error
合格返回给定对等方是否有资格接收 来自给定通道的发现服务的服务
func (*DiscoverySupport) SatisfiesPrincipal ¶
func (s *DiscoverySupport) SatisfiesPrincipal(channel string, rawIdentity []byte, principal *msp.MSPPrincipal) error
type Evaluator ¶
type Evaluator interface { //Evaluate获取一组SignedData并评估该组签名是否满足策略 Evaluate(signatureSet []*cb.SignedData) error }
评估器评估签名。 它用于评估本地MSP的签名
Click to show internal directories.
Click to hide internal directories.