mocks

package
v2.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelPolicyManagerGetter

type ChannelPolicyManagerGetter struct {
	mock.Mock
}

ChannelPolicyManagerGetter is an autogenerated mock type for the ChannelPolicyManagerGetter type

func (*ChannelPolicyManagerGetter) Manager

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

Manager provides a mock function with given fields: channelID

type ChannelPolicyReferenceProvider

type ChannelPolicyReferenceProvider struct {
	mock.Mock
}

ChannelPolicyReferenceProvider is an autogenerated mock type for the ChannelPolicyReferenceProvider type

func (*ChannelPolicyReferenceProvider) NewPolicy

func (_m *ChannelPolicyReferenceProvider) NewPolicy(channelConfigPolicyReference string) (policies.Policy, error)

NewPolicy provides a mock function with given fields: channelConfigPolicyReference

type Identity

type Identity struct {
	mock.Mock
}

Identity is an autogenerated mock type for the Identity type

func (*Identity) Anonymous

func (_m *Identity) Anonymous() bool

Anonymous provides a mock function with given fields:

func (*Identity) ExpiresAt

func (_m *Identity) ExpiresAt() time.Time

ExpiresAt provides a mock function with given fields:

func (*Identity) GetIdentifier

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

GetIdentifier provides a mock function with given fields:

func (*Identity) GetMSPIdentifier

func (_m *Identity) GetMSPIdentifier() string

GetMSPIdentifier provides a mock function with given fields:

func (*Identity) GetOrganizationalUnits

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

GetOrganizationalUnits provides a mock function with given fields:

func (*Identity) SatisfiesPrincipal

func (_m *Identity) SatisfiesPrincipal(principal *protosmsp.MSPPrincipal) error

SatisfiesPrincipal provides a mock function with given fields: principal

func (*Identity) Serialize

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

Serialize provides a mock function with given fields:

func (*Identity) Validate

func (_m *Identity) Validate() error

Validate provides a mock function with given fields:

func (*Identity) Verify

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

Verify provides a mock function with given fields: msg, sig

type IdentityDeserializer

type IdentityDeserializer struct {
	mock.Mock
}

IdentityDeserializer is an autogenerated mock type for the IdentityDeserializer type

func (*IdentityDeserializer) DeserializeIdentity

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

DeserializeIdentity provides a mock function with given fields: serializedIdentity

func (*IdentityDeserializer) IsWellFormed

func (_m *IdentityDeserializer) IsWellFormed(identity *protosmsp.SerializedIdentity) error

IsWellFormed provides a mock function with given fields: identity

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func (*Manager) GetPolicy

func (_m *Manager) GetPolicy(id string) (policies.Policy, bool)

GetPolicy provides a mock function with given fields: id

func (*Manager) Manager

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

Manager provides a mock function with given fields: path

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 []*protoutil.SignedData) error

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

type Policy

type Policy struct {
	mock.Mock
}

Policy is an autogenerated mock type for the Policy type

func (*Policy) Evaluate

func (_m *Policy) Evaluate(signatureSet []*protoutil.SignedData) error

Evaluate provides a mock function with given fields: signatureSet

type SignaturePolicyProvider

type SignaturePolicyProvider struct {
	mock.Mock
}

SignaturePolicyProvider is an autogenerated mock type for the SignaturePolicyProvider type

func (*SignaturePolicyProvider) NewPolicy

func (_m *SignaturePolicyProvider) NewPolicy(signaturePolicy *common.SignaturePolicyEnvelope) (policies.Policy, error)

NewPolicy provides a mock function with given fields: signaturePolicy

Jump to

Keyboard shortcuts

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