implicitpolicy

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ImplicitOrg is used in the collection policy to indicate that the
	// collection policy is for the local peer's MSP
	ImplicitOrg = "IMPLICIT-ORG"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	privdata.CollectionAccessPolicy
	// contains filtered or unexported fields
}

Resolver wraps a collection policy and resolves any occurrence of 'IMPLICIT-ORG' to the local MSP

func NewResolver

func NewResolver(localMSP string, policy privdata.CollectionAccessPolicy) *Resolver

NewResolver returns a new implicit collection policy resolver

func (*Resolver) MemberOrgs

func (p *Resolver) MemberOrgs() map[string]struct{}

MemberOrgs returns the collection's members as MSP IDs. If any of the orgs is set to 'IMPLICIT-ORG' then it is replaced with the ID of the local MSP.

Jump to

Keyboard shortcuts

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