mocks

package
v0.0.0-...-8dfe50c Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockChannelPolicyManager

type MockChannelPolicyManager struct {
	MockPolicy policies.Policy
}

func (*MockChannelPolicyManager) GetPolicy

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

func (*MockChannelPolicyManager) Manager

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

type MockChannelPolicyManagerGetter

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

func (*MockChannelPolicyManagerGetter) Manager

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

type MockIdentity

type MockIdentity struct {
	// contains filtered or unexported fields
}

func (*MockIdentity) Anonymous

func (id *MockIdentity) Anonymous() bool

func (*MockIdentity) ExpiresAt

func (id *MockIdentity) ExpiresAt() time.Time

func (*MockIdentity) GetIdentifier

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

func (*MockIdentity) GetMSPIdentifier

func (id *MockIdentity) GetMSPIdentifier() string

func (*MockIdentity) GetOrganizationalUnits

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

func (*MockIdentity) SatisfiesPrincipal

func (id *MockIdentity) SatisfiesPrincipal(p *mspproto.MSPPrincipal) error

func (*MockIdentity) Serialize

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

func (*MockIdentity) Validate

func (id *MockIdentity) Validate() error

func (*MockIdentity) Verify

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

type MockIdentityDeserializer

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

func (*MockIdentityDeserializer) DeserializeIdentity

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

func (*MockIdentityDeserializer) IsWellFormed

type MockMSPPrincipalGetter

type MockMSPPrincipalGetter struct {
	Principal []byte
}

func (*MockMSPPrincipalGetter) Get

type MockPolicy

type MockPolicy struct {
	Deserializer msp.IdentityDeserializer
}

func (*MockPolicy) Evaluate

func (m *MockPolicy) 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