{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package acl\n\n## Types\n\n```go\ntype ChannelConfigGetter interface {\n\t// GetChannelConfig returns the resources of the channel config\n\tGetChannelConfig(cid string) channelconfig.Resources\n}\n```\nChannelConfigGetter enables to retrieve the channel config resources\n\n```go\ntype ChannelConfigGetterFunc func(cid string) channelconfig.Resources\n```\nChannelConfigGetterFunc returns the resources of the channel config\n\n```go\nfunc (f ChannelConfigGetterFunc) GetChannelConfig(cid string) channelconfig.Resources\n```\nGetChannelConfig returns the resources of the channel config\n\n```go\ntype ChannelPolicyManagerGetter interface {\n\t// Returns the policy manager associated to the passed channel\n\t// and true if it was the manager requested, or false if it is the default manager\n\tManager(channelID string) (policies.Manager, bool)\n}\n```\nChannelPolicyManagerGetter is a support interface to get access to the policy manager of a given channel\n\n```go\ntype ChannelVerifier struct {\n\tpolicies.ChannelPolicyManagerGetter\n\tPolicy string\n}\n```\nChannelVerifier verifies a signature and a message on the context of a channel\n\n```go\nfunc NewChannelVerifier(policy string, polMgr policies.ChannelPolicyManagerGetter) *ChannelVerifier\n```\nNewChannelVerifier returns a new channel verifier from the given policy and policy manager getter\n\n```go\nfunc (cv *ChannelVerifier) VerifyByChannel(channel string, sd *cb.SignedData) error\n```\nVerifyByChannel checks that signature is a valid signature of message under a peer's verification key, but also in the context of a specific channel. If the verification succeeded, Verify returns nil meaning no error occurred. If peerIdentity is nil, then the verification fails.\n\n```go\ntype DiscoverySupport struct {\n\tChannelConfigGetter\n\tVerifier\n\tEvaluator\n}\n```\nDiscoverySupport implements support that is used for service discovery that is related to access control\n\n```go\nfunc NewDiscoverySupport(v Verifier, e Evaluator, chanConf ChannelConfigGetter) *DiscoverySupport\n```\nNewDiscoverySupport creates a new DiscoverySupport\n\n```go\nfunc (s *DiscoverySupport) ConfigSequence(channel string) uint64\n```\nConfigSequence returns the configuration sequence of the given channel\n\n```go\nfunc (s *DiscoverySupport) EligibleForService(channel string, data cb.SignedData) error\n```\nEligible returns whether the given peer is eligible for receiving service from the discovery service for a given channel\n\n```go\nfunc (s *DiscoverySupport) SatisfiesPrincipal(channel string, rawIdentity []byte, principal *msp.MSPPrincipal) error\n```\n\n```go\ntype Evaluator interface {\n\t// Evaluate takes a set of SignedData and evaluates whether this set of signatures satisfies the policy\n\tEvaluate(signatureSet []*cb.SignedData) error\n}\n```\nEvaluator evaluates signatures. It is used to evaluate signatures for the local MSP\n\n```go\ntype Verifier interface {\n\t// VerifyByChannel checks that signature is a valid signature of message\n\t// under a peer's verification key, but also in the context of a specific channel.\n\t// If the verification succeeded, Verify returns nil meaning no error occurred.\n\t// If peerIdentity is nil, then the verification fails.\n\tVerifyByChannel(channel string, sd *cb.SignedData) error\n}\n```\nVerifier verifies a signature and a message\n\n","path":"github.com/eric-erki/https-hyperledger.org/discovery/support/acl","name":"acl","synopsis":"","isRedistributable":true}
