Documentation ¶
Index ¶
- func CartesianProduct(s1, s2 ComparablePrincipalSets) comparablePrincipalSetPairs
- func NewInquireableSignaturePolicy(sigPol *common.SignaturePolicyEnvelope) policies.InquireablePolicy
- type ComparablePrincipal
- type ComparablePrincipalSet
- func (cps ComparablePrincipalSet) Clone() ComparablePrincipalSet
- func (cps ComparablePrincipalSet) Contains(s *ComparablePrincipal) bool
- func (cps ComparablePrincipalSet) IsContainedIn(set ComparablePrincipalSet) bool
- func (cps ComparablePrincipalSet) IsSubset(sets ComparablePrincipalSet) bool
- func (cps ComparablePrincipalSet) String() string
- func (cps ComparablePrincipalSet) ToPrincipalSet() policies.PrincipalSet
- type ComparablePrincipalSets
- func (cps ComparablePrincipalSets) ExcludeIndices(mapping map[int][]int) ComparablePrincipalSets
- func (cps ComparablePrincipalSets) OfMapping(mapping map[int][]int, sets2 ComparablePrincipalSets) comparablePrincipalSetPairs
- func (cps ComparablePrincipalSets) Reduce() ComparablePrincipalSets
- func (cps ComparablePrincipalSets) ToPrincipalSets() policies.PrincipalSets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CartesianProduct ¶
func CartesianProduct(s1, s2 ComparablePrincipalSets) comparablePrincipalSetPairs
CartesianProduct返回由组合组成的ComparablePrincipalsetPairs 在每对可能的可比较原理集合中,第一个元素在s1中, 第二个元素在s2中。
func NewInquireableSignaturePolicy ¶
func NewInquireableSignaturePolicy(sigPol *common.SignaturePolicyEnvelope) policies.InquireablePolicy
NewInquireableSignaturePolicy创建可查询的签名策略, 来自策略和签名策略。
Types ¶
type ComparablePrincipal ¶
type ComparablePrincipal struct {
// contains filtered or unexported fields
}
func NewComparablePrincipal ¶
func NewComparablePrincipal(principal *msp.MSPPrincipal) *ComparablePrincipal
NewComparablePrincipal根据给定的mspprincipal创建了一个可比较的主体。
func (*ComparablePrincipal) IsA ¶
func (cp *ComparablePrincipal) IsA(other *ComparablePrincipal) bool
func (*ComparablePrincipal) IsFound ¶
func (cp *ComparablePrincipal) IsFound(set ...*ComparablePrincipal) bool
func (*ComparablePrincipal) ToOURole ¶
func (cp *ComparablePrincipal) ToOURole() *ComparablePrincipal
func (*ComparablePrincipal) ToRole ¶
func (cp *ComparablePrincipal) ToRole() *ComparablePrincipal
type ComparablePrincipalSet ¶
type ComparablePrincipalSet []*ComparablePrincipal
func NewComparablePrincipalSet ¶
func NewComparablePrincipalSet(set policies.PrincipalSet) ComparablePrincipalSet
func (ComparablePrincipalSet) Clone ¶
func (cps ComparablePrincipalSet) Clone() ComparablePrincipalSet
func (ComparablePrincipalSet) Contains ¶
func (cps ComparablePrincipalSet) Contains(s *ComparablePrincipal) bool
包含返回此ComparablePrincipalset是否包含给定的ComparablePrincipalset。
在x中有一个可比较的主体x,这样x.is a(y)。 由此可知,每个满足x的签名集也满足y。
func (ComparablePrincipalSet) IsContainedIn ¶
func (cps ComparablePrincipalSet) IsContainedIn(set ComparablePrincipalSet) bool
iscontainedIn返回此ComparablePrincipalset是否包含在给定的ComparablePrincipalset中。
如果x中的每个可比较原则集x在y中都有一个可比较原则集y,则y.is a(x)为真。
恒等式,使恒等式满足y,因此也满足x。
func (ComparablePrincipalSet) IsSubset ¶
func (cps ComparablePrincipalSet) IsSubset(sets ComparablePrincipalSet) bool
is subset返回此ComparablePrincipalset是否为给定ComparablePrincipalset的子集
func (ComparablePrincipalSet) String ¶
func (cps ComparablePrincipalSet) String() string
func (ComparablePrincipalSet) ToPrincipalSet ¶
func (cps ComparablePrincipalSet) ToPrincipalSet() policies.PrincipalSet
type ComparablePrincipalSets ¶
type ComparablePrincipalSets []ComparablePrincipalSet
func Merge ¶
func Merge(s1, s2 ComparablePrincipalSets) ComparablePrincipalSets
合并返回基础Principalset包含的可比较Principalset
p1和p2是p1中每个主集p满足ep1的主集,
分别用s1和s2表示从ep1和ep2得出的可比较原则集。
这样,S中的每一个可比较原则都满足EP1和EP2。
func (ComparablePrincipalSets) ExcludeIndices ¶
func (cps ComparablePrincipalSets) ExcludeIndices(mapping map[int][]int) ComparablePrincipalSets
excludeindexs返回一个可比较的Principalset,但没有在键中找到给定的索引
func (ComparablePrincipalSets) OfMapping ¶
func (cps ComparablePrincipalSets) OfMapping(mapping map[int][]int, sets2 ComparablePrincipalSets) comparablePrincipalSetPairs
func (ComparablePrincipalSets) Reduce ¶
func (cps ComparablePrincipalSets) Reduce() ComparablePrincipalSets
func (ComparablePrincipalSets) ToPrincipalSets ¶
func (cps ComparablePrincipalSets) ToPrincipalSets() policies.PrincipalSets
TopPrincipalsets将此可比较的Principalsets转换为Principalsets