cauthdsl

package
v0.0.0-...-95b87ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

type Identity

type Identity interface {
	SatisfiesPrincipal(principal *mspp.MSPPrincipal) error

	GetIdentifier() *msp.IdentityIdentifier
}

type IdentityAndSignature

type IdentityAndSignature interface {
	Identity() (Identity, error)

	Verify() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL