mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2017 License: Apache-2.0 Imports: 8 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelPolicyManager

type ChannelPolicyManager struct {
	Policy policies.Policy
}

func (*ChannelPolicyManager) BasePath

func (m *ChannelPolicyManager) BasePath() string

func (*ChannelPolicyManager) GetPolicy

func (m *ChannelPolicyManager) GetPolicy(id string) (policies.Policy, bool)

func (*ChannelPolicyManager) Manager

func (m *ChannelPolicyManager) Manager(path []string) (policies.Manager, bool)

func (*ChannelPolicyManager) PolicyNames

func (m *ChannelPolicyManager) PolicyNames() []string

type ChannelPolicyManagerGetter

type ChannelPolicyManagerGetter struct{}

func (*ChannelPolicyManagerGetter) Manager

func (c *ChannelPolicyManagerGetter) Manager(channelID string) (policies.Manager, bool)

type ChannelPolicyManagerGetterWithManager

type ChannelPolicyManagerGetterWithManager struct {
	Managers map[string]policies.Manager
}

func (*ChannelPolicyManagerGetterWithManager) Manager

type DeserializersManager

type DeserializersManager struct {
	LocalDeserializer    msp.IdentityDeserializer
	ChannelDeserializers map[string]msp.IdentityDeserializer
}

func (*DeserializersManager) Deserialize

func (m *DeserializersManager) Deserialize(raw []byte) (*mspproto.SerializedIdentity, error)

func (*DeserializersManager) GetChannelDeserializers

func (m *DeserializersManager) GetChannelDeserializers() map[string]msp.IdentityDeserializer

func (*DeserializersManager) GetLocalDeserializer

func (m *DeserializersManager) GetLocalDeserializer() msp.IdentityDeserializer

func (*DeserializersManager) GetLocalMSPIdentifier

func (m *DeserializersManager) GetLocalMSPIdentifier() string

type Identity

type Identity struct {
	Msg []byte
}

func (*Identity) GetIdentifier

func (id *Identity) GetIdentifier() *msp.IdentityIdentifier

func (*Identity) GetMSPIdentifier

func (id *Identity) GetMSPIdentifier() string

func (*Identity) GetOrganizationalUnits

func (id *Identity) GetOrganizationalUnits() []*msp.OUIdentifier

func (*Identity) SatisfiesPrincipal

func (id *Identity) SatisfiesPrincipal(*mspproto.MSPPrincipal) error

func (*Identity) Serialize

func (id *Identity) Serialize() ([]byte, error)

func (*Identity) Validate

func (id *Identity) Validate() error

func (*Identity) Verify

func (id *Identity) Verify(msg []byte, sig []byte) error

type IdentityDeserializer

type IdentityDeserializer struct {
	Identity []byte
	Msg      []byte
}

func (*IdentityDeserializer) DeserializeIdentity

func (d *IdentityDeserializer) DeserializeIdentity(serializedIdentity []byte) (msp.Identity, error)

type Policy

type Policy struct {
	Deserializer msp.IdentityDeserializer
}

func (*Policy) Evaluate

func (m *Policy) Evaluate(signatureSet []*common.SignedData) error

Evaluate takes a set of SignedData and evaluates whether this set of signatures satisfies the policy

Jump to

Keyboard shortcuts

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