Documentation ¶
Index ¶
- Constants
- Variables
- func And(lhs, rhs *cb.SignaturePolicy) *cb.SignaturePolicy
- func Envelope(policy *cb.SignaturePolicy, identities [][]byte) *cb.SignaturePolicyEnvelope
- func FromString(policy string) (*common.SignaturePolicyEnvelope, error)
- func NOutOf(n int32, policies []*cb.SignaturePolicy) *cb.SignaturePolicy
- func NewPolicyProvider(deserializer msp.IdentityDeserializer) policies.Provider
- func Or(lhs, rhs *cb.SignaturePolicy) *cb.SignaturePolicy
- func SignedBy(index int32) *cb.SignaturePolicy
- func SignedByAnyAdmin(ids []string) *cb.SignaturePolicyEnvelope
- func SignedByAnyClient(ids []string) *cb.SignaturePolicyEnvelope
- func SignedByAnyMember(ids []string) *cb.SignaturePolicyEnvelope
- func SignedByAnyPeer(ids []string) *cb.SignaturePolicyEnvelope
- func SignedByMspAdmin(mspId string) *cb.SignaturePolicyEnvelope
- func SignedByMspClient(mspId string) *cb.SignaturePolicyEnvelope
- func SignedByMspMember(mspId string) *cb.SignaturePolicyEnvelope
- func SignedByMspPeer(mspId string) *cb.SignaturePolicyEnvelope
- func SignedByNOutOfGivenRole(n int32, role msp.MSPRole_MSPRoleType, ids []string) *cb.SignaturePolicyEnvelope
- func TemplatePolicy(key string, sigPolicyEnv *cb.SignaturePolicyEnvelope) *cb.ConfigGroup
- type EnvelopeBasedPolicyProvider
- type Identity
- type IdentityAndSignature
Constants ¶
View Source
const ( GateAnd = "And" GateOr = "Or" GateOutOf = "OutOf" )
View Source
const ( RoleAdmin = "admin" RoleMember = "member" RoleClient = "client" RolePeer = "peer" RoleOrderer = "orderer" )
Variables ¶
View Source
var AcceptAllPolicy *cb.SignaturePolicyEnvelope
View Source
var MarshaledAcceptAllPolicy []byte
View Source
var MarshaledRejectAllPolicy []byte
View Source
var RejectAllPolicy *cb.SignaturePolicyEnvelope
Functions ¶
func And ¶
func And(lhs, rhs *cb.SignaturePolicy) *cb.SignaturePolicy
func Envelope ¶
func Envelope(policy *cb.SignaturePolicy, identities [][]byte) *cb.SignaturePolicyEnvelope
func FromString ¶
func FromString(policy string) (*common.SignaturePolicyEnvelope, error)
func NOutOf ¶
func NOutOf(n int32, policies []*cb.SignaturePolicy) *cb.SignaturePolicy
func NewPolicyProvider ¶
func NewPolicyProvider(deserializer msp.IdentityDeserializer) policies.Provider
func Or ¶
func Or(lhs, rhs *cb.SignaturePolicy) *cb.SignaturePolicy
func SignedBy ¶
func SignedBy(index int32) *cb.SignaturePolicy
func SignedByAnyAdmin ¶
func SignedByAnyAdmin(ids []string) *cb.SignaturePolicyEnvelope
func SignedByAnyClient ¶
func SignedByAnyClient(ids []string) *cb.SignaturePolicyEnvelope
func SignedByAnyMember ¶
func SignedByAnyMember(ids []string) *cb.SignaturePolicyEnvelope
func SignedByAnyPeer ¶
func SignedByAnyPeer(ids []string) *cb.SignaturePolicyEnvelope
func SignedByMspAdmin ¶
func SignedByMspAdmin(mspId string) *cb.SignaturePolicyEnvelope
func SignedByMspClient ¶
func SignedByMspClient(mspId string) *cb.SignaturePolicyEnvelope
func SignedByMspMember ¶
func SignedByMspMember(mspId string) *cb.SignaturePolicyEnvelope
func SignedByMspPeer ¶
func SignedByMspPeer(mspId string) *cb.SignaturePolicyEnvelope
func SignedByNOutOfGivenRole ¶
func SignedByNOutOfGivenRole(n int32, role msp.MSPRole_MSPRoleType, ids []string) *cb.SignaturePolicyEnvelope
func TemplatePolicy ¶
func TemplatePolicy(key string, sigPolicyEnv *cb.SignaturePolicyEnvelope) *cb.ConfigGroup
Types ¶
type EnvelopeBasedPolicyProvider ¶
type EnvelopeBasedPolicyProvider struct {
Deserializer msp.IdentityDeserializer
}
func (*EnvelopeBasedPolicyProvider) NewPolicy ¶
func (pp *EnvelopeBasedPolicyProvider) NewPolicy(sigPolicy *cb.SignaturePolicyEnvelope) (policies.Policy, error)
type Identity ¶
type Identity interface { SatisfiesPrincipal(principal *mspp.MSPPrincipal) error GetIdentifier() *msp.IdentityIdentifier }
type IdentityAndSignature ¶
Click to show internal directories.
Click to hide internal directories.